summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 2ec5912d0a195b39c095fcbcb2c9c272f6057f00 (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
#!/usr/bin/make -f

DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

%:
	dh ${@} --parallel

override_dh_auto_configure:
	LDFLAGS="${LDFLAGS} -static" dh_auto_configure -- --exec-prefix=/

override_dh_auto_install:
	dh_auto_install -- DESTDIR=$(CURDIR)/debian/zutils

	# removing unused files
	rm -f debian/zutils/usr/share/info/dir*

override_dh_builddeb:
	dh_builddeb -- -Zxz

override_dh_gencontrol:
ifeq (kfreebsd,$(DEB_HOST_ARCH_OS))
	dh_gencontrol -- -Vbuilt-using="glibc (= $$(dpkg-query --show --showformat='$${source:Version}' libc0.1-dev))"
else
	dh_gencontrol -- -Vbuilt-using="glibc (= $$(dpkg-query --show --showformat='$${source:Version}' libc6-dev))"
endif

override_dh_strip:
	dh_strip --dbg-package=zutils-dbg