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
|
#!/usr/bin/make -f
# Make the shell exit with an error if an untested command fails.
SHELL+= -e
#export DH_VERBOSE=1
export DH_COMPAT=2
build: build-stamp
build-stamp:
$(checkdir)
$(CC) -O2 -g -o rblcheck rblcheck.c -lresolv
cd docs && sgmltools -b txt rblcheck.sgml
touch build-stamp
clean: checkroot
$(checkdir)
rm -f build-stamp
rm -f rblcheck docs/rblcheck.txt
-cd debian && rm -rf rblcheck files* substvars *debhelper
binary-arch: checkroot build
$(checkdir)
-rm -rf debian/rblcheck
dh_installdirs usr/bin
cp rblcheck debian/rblcheck/usr/bin/
dh_installdocs README NEWS docs/rblcheck.txt
dh_installexamples
rm -rf debian/rblcheck/usr/share/doc/rblcheck/examples/*/CVS/
# dh_installmanpages
dh_undocumented rblcheck.1
dh_installchangelogs ChangeLog
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_builddeb
define checkdir
test -f debian/rules
endef
checkroot:
test root = "`whoami`"
binary: binary-arch
.PHONY: build clean binary-indep binary-arch binary checkroot
|