Codebase list pnm2ppa / 94447fcf-95c3-487f-ba5c-304605c44018/main debian / rules
94447fcf-95c3-487f-ba5c-304605c44018/main

Tree @94447fcf-95c3-487f-ba5c-304605c44018/main (Download .tar.gz)

rules @94447fcf-95c3-487f-ba5c-304605c44018/mainraw · history · blame

#!/usr/bin/make -f

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

export DEB_CFLAGS_MAINT_APPEND += -DLANG_ENG -Wall

%:
	dh $@ --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
	# Remove empty directories
	rm -Rf debian/printer-driver-pnm2ppa/usr/share/doc/pnm2ppa