summaryrefslogtreecommitdiff
path: root/debian/rules
blob: fa9c8991baee946241b5a15a62e0aa3f6e80ce75 (plain)
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
50
51
52
53
54
#!/usr/bin/make -f
SHELL+= -e

-include /usr/share/dpkg/architecture.mk
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

build:
	dh_testdir
	$(MAKE) CONFIG_FILE="/etc/whois.conf" HAVE_ICONV=1
	touch $@

clean:
	dh_testdir
	-rm -f build
	$(MAKE) distclean
	dh_clean

binary-arch: build
	dh_testdir
	dh_testroot
	dh_prep

	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

binary: binary-arch

binary-indep:

build-arch: build
build-indep: build

.PHONY: binary binary-arch binary-indep build build-arch build-indep clean