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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
derives_from_ubuntu := $(shell (dpkg-vendor --derives-from Ubuntu && echo "yes") || echo "no")
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
else
NUMJOBS = 4
endif
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- --with-drivers=NOOBSOLETES,NOEMPTYCMDLINE
override_dh_install:
- find debian/tmp/ -executable -type f -print0 | xargs -0 chmod -x
- find $(CURDIR)/debian/tmp/usr/share/foomatic/db/source/PPD -type f \! -name '*.ppd.gz' -print0 | xargs -0 rm
( cd $(CURDIR)/debian/tmp/usr/share/foomatic/db/source/driver; \
rm ppmtomd.xml; \
rm lpstyl.xml; \
rm pbm2lwxl.xml; \
rm bjc800j.xml; \
rm pbm2l7k.xml; \
rm lm1100.xml; \
rm pbm2l2030.xml; \
rm c2070.xml; \
rm drv_x125.xml; \
rm pentaxpj.xml; \
rm ml85p.xml; \
)
for f in `find $(CURDIR)/debian/tmp/usr/share/foomatic/db/source/PPD -name '*.ppd.gz'`; do gzip -cd $$f | perl -p -e 's/^\*CloseUI(\s+)/*CloseUI:\1/' | perl -p -e 's/\*1284DeviceId/*1284DeviceID/' | gzip --best> $$f.tmp; rm $$f; mv $$f.tmp $$f; done
dh_install
dh_missing --list-missing
mkdir -p $(CURDIR)/debian/foomatic-db-compressed-ppds/usr/share/ppd/
FOOMATICDB=$(CURDIR)/debian/foomatic-db/usr/share/foomatic foomatic-compiledb -j $(NUMJOBS) -t ppd -d $(CURDIR)/debian/foomatic-db-compressed-ppds/usr/share/ppd/foomatic-ppd `ls -1 $(CURDIR)/debian/foomatic-db/usr/share/foomatic/db/source/driver/*.xml | perl -p -e 's:^.*db/source/driver/(\S*)\.xml\s*$$:\1\n:'`
dh_pyppd -popenprinting-ppds
dh_pyppd -pfoomatic-db-compressed-ppds
for package in foomatic-db foomatic-db-compressed-ppds openprinting-ppds; do \
install -D -m 644 debian/$$package.ppd-updater $(CURDIR)/debian/$$package/usr/share/cups/ppd-updaters/$$package; \
done
ifeq ($(derives_from_ubuntu),yes)
install -D -m 644 debian/ubuntu/apport-hook.py $(CURDIR)/debian/foomatic-db-compressed-ppds/usr/share/apport/package-hooks/source_foomatic-db.py
endif
|