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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# see FEATURE AREAS in dpkg-buildflags(1)
include /usr/share/dpkg/architecture.mk
DEB_BUILD_MAINT_OPTIONS=hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
# Note: Read /usr/share/doc/autotools-dev/README.Debian.gz
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CONFOPTS += --enable-debug
endif
EXTRADRIVERS := $(shell cut -d/ -f5 $(CURDIR)/debian/lcdproc-extra-drivers.install)
DRIVERS = all,!irman,!svga
%:
dh $@ --verbose --with=cme-upgrade
override_dh_auto_configure:
perl -p -i.pristine -e 's!DriverPath.*!DriverPath=/usr/lib/$(DEB_BUILD_MULTIARCH)/lcdproc/!;' LCDd.conf
# live patch to use date of last changelog entry as build date
DEBBUILDDATE=$$(perl -ne 'if (/ --.*?>\s+(.*)/) {print "$$1\n"; exit}' debian/changelog ) && \
export DEBBUILDDATE && \
perl -p -i.pristine -e 's!__DATE__!"$$ENV{DEBBUILDDATE}"!;' clients/lcdproc/main.c server/main.c
# Add here commands to configure the package.
dh_auto_configure -- \
--enable-stat-nfs \
--enable-stat-smbfs \
--enable-drivers="$(DRIVERS)" \
--enable-libusb \
--enable-libusb-1-0 \
--enable-seamless-hbars \
--enable-testmenus \
--enable-permissive-menu-goto \
--enable-lcdproc-menus \
$(CONFOPTS)
override_dh_clean:
# restore the files that were tweaked in override_dh_auto_configure
for i in $$(find . -name '*.pristine'); do mv $$i $${i%%.pristine} ; done
dh_clean
override_dh_installman:
dh_installman --language=C
override_dh_install:
dh_install $(foreach lib,$(EXTRADRIVERS),--exclude=$(lib)) --exclude LCDd.conf -plcdproc
dh_install --autodest -plcdproc-extra-drivers
dh_install --remaining-packages
|