whois/debian/rules
2013-03-30 02:31:36 +01:00

53 lines
899 B
Makefile
Executable File

#!/usr/bin/make -f
SHELL+= -e
#export DH_VERBOSE=1
D := $(shell pwd)/debian/whois
VERSION := $(shell dpkg-parsechangelog | sed -n 's/\+.*$$//; /^Version/s/.* //p')
build:
dh_testdir
$(MAKE) \
OPTS="-O2 -g -DCONFIG_FILE=\\\"/etc/whois.conf\\\"" \
HAVE_LIBIDN=1
cd po && $(MAKE) whois.pot
touch $@
clean:
dh_testdir
-rm -f build
$(MAKE) distclean
dh_clean
binary-arch: checkroot build
dh_testdir
dh_clean
# sanity check
egrep -q '^#define VERSION "$(VERSION)"$$' config.h
dh_installdirs usr/bin
install whois mkpasswd $D/usr/bin/
cd po && $(MAKE) install BASEDIR=$D
dh_installman whois.1 mkpasswd.1
dh_installdocs README
dh_installchangelogs
dh_strip
dh_compress
dh_fixperms
dh_shlibdeps
dh_installdeb
dh_gencontrol
dh_builddeb
binary: binary-arch
binary-indep:
checkroot:
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep build clean checkroot