added postinst script to trigger udev
[collab-maint/lcdproc.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 # Note: Read /usr/share/doc/autotools-dev/README.Debian.gz
7
8 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
9 CONFOPTS += --enable-debug
10 endif
11
12 EXTRADRIVERS := $(shell cut -d/ -f5 $(CURDIR)/debian/lcdproc-extra-drivers.install)
13
14 DRIVERS = all,!irman,!svga
15
16 # --with autotools_dev will update/restore config.sub and config.guess
17 %:
18         dh $@ --verbose --with autotools_dev --with cme_upgrade
19
20 override_dh_auto_configure:
21 # from /usr/share/doc/autotools-dev/examples/rules.gz
22         perl -pi -e 's!DriverPath.*!DriverPath=/usr/lib/$(DEB_BUILD_MULTIARCH)/lcdproc/!;' LCDd.conf
23         chmod +x debian/autogen.sh
24         debian/autogen.sh
25 # Add here commands to configure the package.
26         dh_auto_configure -- \
27                 --enable-stat-nfs \
28                 --enable-stat-smbfs \
29                 --enable-drivers="$(DRIVERS)" \
30                 --enable-libusb \
31                 --enable-seamless-hbars \
32                 --enable-testmenus \
33                 --enable-permissive-menu-goto \
34                 --enable-lcdproc-menus \
35                 $(CONFOPTS)
36
37 override_dh_installman:
38         dh_installman --language=C
39
40 override_dh_strip:
41         dh_strip --dbg-package=lcdproc-dbg
42
43 override_dh_installinit:
44         dh_installinit --name=LCDd -- start 60 2 3 4 5 . stop 60 0 1 6 .
45
46 override_dh_install:
47         dh_install $(foreach lib,$(EXTRADRIVERS),--exclude=$(lib)) --exclude LCDd.conf -plcdproc
48         dh_install --autodest  -plcdproc-extra-drivers
49         dh_install --remaining-packages --list-missing