diff --git a/debian/rules b/debian/rules index 8b36727..9eeebc0 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,6 @@ #!/usr/bin/make -f -#export DH_VERBOSE=1 + +derives_from_ubuntu := $(shell (dpkg-vendor --derives-from Ubuntu && echo "yes") || echo "no") CFLAGS=-DLANG_EN -O2 -Wall @@ -15,6 +16,10 @@ dh_install # Make sure update-magicfilters is executable chmod +x debian/pnm2ppa/usr/share/pnm2ppa/update-magicfilter +ifeq ($(derives_from_ubuntu),yes) + # Install the apport hook on Ubuntu and derivatives + install -D -m 644 debian/ubuntu/apport-hook.py $(CURDIR)/debian/pnm2ppa/usr/share/apport/package-hooks/source_pnm2ppa.py +endif override_dh_installdocs: dh_installdocs diff --git a/debian/ubuntu/apport-hook.py b/debian/ubuntu/apport-hook.py new file mode 100644 index 0000000..3ad85d3 --- /dev/null +++ b/debian/ubuntu/apport-hook.py @@ -0,0 +1,11 @@ +'''apport package hook for pnm2ppa + +(c) 2009 Canonical Ltd. +Author: Brian Murray +''' + +from apport.hookutils import * + +def add_info(report): + attach_hardware(report) + attach_printing(report)