]> git.donarmstrong.com Git - unscd.git/blob - debian/rules
Fix FTCBFS: Build twice for help2man and cross. (Closes: #902291)
[unscd.git] / debian / rules
1 #!/usr/bin/make -f
2
3 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
4
5 include /usr/share/dpkg/architecture.mk
6 -include /usr/share/dpkg/buildtools.mk
7 CC_FOR_BUILD ?= $(CC)
8
9 %:
10         dh $@
11
12 override_dh_auto_clean:
13         rm -f nscd
14         dh_auto_clean
15
16 override_dh_auto_build:
17         $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o nscd nscd.c -lsystemd
18         help2man --name 'nscd which does not hang' \
19                 --include debian/help2man \
20                 --no-info \
21                 ./nscd > debian/unscd.man
22         ln -fs unscd.man debian/nscd.man
23 ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
24         $(CC) $(CFLAGS) $(LDFLAGS) -o nscd nscd.c
25 endif
26
27 override_dh_auto_install:
28         install -d debian/unscd/usr/sbin/
29         install -t debian/unscd/usr/sbin/ nscd
30         install -d debian/unscd/etc/
31         install -m644 -t debian/unscd/etc/ debian/nscd.conf
32
33 override_dh_systemd_start:
34         dh_systemd_start --restart-after-upgrade --no-stop-on-upgrade