File: rules

package info (click to toggle)
pnm2ppa 1.13-8
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,704 kB
  • ctags: 480
  • sloc: ansic: 7,505; sh: 4,222; makefile: 125; python: 8
file content (44 lines) | stat: -rwxr-xr-x 1,466 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/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 $@ --parallel --builddirectory=build/ --with autotools_dev,autoreconf

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