Codebase list pnm2ppa / debian/1.13-4 debian / rules
debian/1.13-4

Tree @debian/1.13-4 (Download .tar.gz)

rules @debian/1.13-4raw · history · blame

#!/usr/bin/make -f

derives_from_ubuntu := $(shell (dpkg-vendor --derives-from Ubuntu && echo "yes") || echo "no")

CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
CFLAGS += -DLANG_ENG -Wall

%:
	dh $@ --parallel --builddirectory=build/

override_dh_auto_install:
	dh_auto_install --builddirectory=build/ --destdir=debian/printer-driver-pnm2ppa/
	# Move the configuration file from /etc to /usr/share
	mv debian/printer-driver-pnm2ppa/etc/pnm2ppa.conf debian/printer-driver-pnm2ppa/usr/share/pnm2ppa/

override_dh_install:
	dh_install
	# Make sure update-magicfilters is executable
	chmod +x debian/printer-driver-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/printer-driver-pnm2ppa/usr/share/apport/package-hooks/source_pnm2ppa.py
endif

override_dh_installdocs: 
	dh_installdocs
	# Remove useless or redundant files
	cd debian/printer-driver-pnm2ppa/usr/share/doc/printer-driver-pnm2ppa/;\
		rm en/CREDITS;\
		rm en/INSTALL.BEOS;\
		rm en/INSTALL.CALDERA;\
		rm en/INSTALL.MANDRAKE*;\
		rm en/INSTALL.REDHAT*;\
		rm en/INSTALL.SOLARIS;\
		rm en/INSTALL.SUSE;\
		rm en/INSTALL;\
		rm en/LICENSE;\
		rm en/README;\
		rm en/RELEASE-NOTES;\
		rm en/TODO;\
		rm en/pnm2ppa.1;\
		rm pl/INSTALACJA;\
		rm pl/INSTALACJA.SUSE