X-Git-Url: https://git.donarmstrong.com/?p=unscd.git;a=blobdiff_plain;f=debian%2Frules;h=d45f9e4fc6ed610aefb2314a4fd0663d7d35bc18;hp=5d8a66e071c3b830a922776c1b1e7313ea33da30;hb=dbe1e927564c778b20a2a6f0377fc5deb6ed3aef;hpb=4d69ff4e04f86d361a5b225aa936990a1401cab2 diff --git a/debian/rules b/debian/rules index 5d8a66e..d45f9e4 100755 --- a/debian/rules +++ b/debian/rules @@ -1,67 +1,22 @@ #!/usr/bin/make -f -#DH_VERBOSE = 1 - - -PREFIX=$(shell pwd)/debian/unscd/ - -CFLAGS = -Wall -g - -INSTALL=install - -ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - - -build: build-stamp -build-stamp: - dh_testdir - - gcc $(CFLAGS) -o nscd nscd.c - - touch $@ - -clean: - dh_testdir - dh_testroot - - rm -f build-stamp +%: + dh $@ --with systemd +override_dh_auto_clean: rm -f nscd - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - $(INSTALL) -d $(PREFIX)/usr/sbin/ - $(INSTALL) -t $(PREFIX)/usr/sbin/ nscd - $(INSTALL) -d $(PREFIX)/etc/ - $(INSTALL) -t $(PREFIX)/etc/ debian/nscd.conf - -binary-indep: - -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installman - dh_installinit - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-arch -.PHONY: build clean binary-arch binary-indep binary install + dh_auto_clean + +override_dh_auto_build: + gcc $(CFLAGS) $(LDFLAGS) -o nscd nscd.c + help2man --name 'nscd which does not hang' \ + --include debian/help2man \ + --no-info \ + ./nscd > debian/unscd.man + ln -fs unscd.man debian/nscd.man + +override_dh_auto_install: + install -d debian/unscd/usr/sbin/ + install -t debian/unscd/usr/sbin/ nscd + install -d debian/unscd/etc/ + install -m644 -t debian/unscd/etc/ debian/nscd.conf