File: rules

package info (click to toggle)
m2300w 0.51-15
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 2,128 kB
  • sloc: perl: 4,026; ansic: 2,260; xml: 788; sh: 488; makefile: 195; python: 8
file content (22 lines) | stat: -rwxr-xr-x 1,075 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/make -f

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

%:
	dh $@ --with=pyppd

override_dh_auto_install:
	dh_auto_install -- INSTROOT=$(CURDIR)/debian/tmp

override_dh_install:
	dh_install
	# Install the two PPDs and their second version counterpart.
	mkdir -p $(CURDIR)/debian/printer-driver-m2300w/usr/share/ppd/m2300w
	for n in 2300 2400; do \
		mv $(CURDIR)/debian/tmp/usr/share/cups/model/Minolta/magicolor_$${n}W-m$${n}w.ppd $(CURDIR)/debian/printer-driver-m2300w/usr/share/ppd/m2300w/Minolta-magicolor_$${n}W-m$${n}w.ppd ; \
		perl -p -e 's/Minolta/KONICA MINOLTA/g' $(CURDIR)/debian/printer-driver-m2300w/usr/share/ppd/m2300w/Minolta-magicolor_$${n}W-m$${n}w.ppd > $(CURDIR)/debian/printer-driver-m2300w/usr/share/ppd/m2300w/KONICA_MINOLTA-magicolor_$${n}W-m$${n}w.ppd ; \
	done
ifeq ($(derives_from_ubuntu),yes)
	# Install the apport hook on Ubuntu and derivatives
	install -D -m 644 debian/local/apport-hook.py $(CURDIR)/debian/printer-driver-m2300w/usr/share/apport/package-hooks/source_m2300w.py
endif