File: rules

package info (click to toggle)
pxljr 1.4%2Brepack0-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 352 kB
  • sloc: ansic: 1,968; sh: 105; perl: 54; makefile: 36; python: 8
file content (28 lines) | stat: -rwxr-xr-x 1,285 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/make -f

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

%:
	dh $@ --with autoreconf --with pyppd

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp

override_dh_install:
	dh_install
	
	# Generate PPD files for the HP LaserJet 3500 and 3600
	for n in 3500 3600; do \
		perl -p -e "s:3550(?!\&quot):$${n}:g" $(CURDIR)/debian/printer-driver-pxljr/usr/share/ppd/pxljr/HP-Color_LaserJet_3550-pxljr.ppd > $(CURDIR)/debian/printer-driver-pxljr/usr/share/ppd/pxljr/HP-Color_LaserJet_$${n}-pxljr.ppd ; \
	done
	
	# Allow also PDF as input data format
	perl -p -i -e 's,^\*cupsFilter:\s*\"application/vnd.cups-postscript\s+0\s+foomatic-rip\",*cupsFilter: "application/vnd.cups-postscript 100 foomatic-rip"\n*cupsFilter: "application/vnd.cups-pdf 0 foomatic-rip",' $(CURDIR)/debian/printer-driver-pxljr/usr/share/ppd/pxljr/*.ppd
	
	# Make the page rendering by Ghostscript faster
	perl -p -i -e 's,(\-sDEVICE=ijs),-dNOINTERPOLATE \1,' $(CURDIR)/debian/printer-driver-pxljr/usr/share/ppd/pxljr/*.ppd
	
ifeq ($(derives_from_ubuntu),yes)
	# Install Apport hook on Ubuntu and derivatives
	install -D -m 644 debian/local/apport-hook.py $(CURDIR)/debian/printer-driver-pxljr/usr/share/apport/package-hooks/source_pxljr.py
endif