mirror of
https://github.com/rfc1036/whois.git
synced 2026-01-03 06:15:17 +00:00
61 lines
1.2 KiB
Makefile
Executable File
61 lines
1.2 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
SHELL+= -e
|
|
|
|
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
|
|
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
|
|
export CC := $(DEB_HOST_GNU_TYPE)-gcc
|
|
endif
|
|
|
|
DPKG_EXPORT_BUILDFLAGS = 1
|
|
-include /usr/share/dpkg/buildflags.mk
|
|
|
|
D := $(CURDIR)/debian/whois
|
|
|
|
VERSION := $(shell dpkg-parsechangelog | sed -rn 's/(~deb|~?ubuntu)[0-9]*.*$$//; s/\+.*$$//; /^Version/s/.* //p')
|
|
|
|
build:
|
|
dh_testdir
|
|
$(MAKE) CONFIG_FILE="/etc/whois.conf" HAVE_LIBIDN=1 HAVE_ICONV=1
|
|
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
|
|
$(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_md5sums
|
|
dh_builddeb -- -Zxz
|
|
|
|
binary: binary-arch
|
|
|
|
binary-indep:
|
|
|
|
build-arch: build
|
|
build-indep: build
|
|
|
|
checkroot:
|
|
test root = "`whoami`"
|
|
|
|
.PHONY: binary binary-arch binary-indep build build-arch build-indep clean checkroot
|