summaryrefslogtreecommitdiff
path: root/ucspi-tcp6-deb/debian/rules
blob: d5122ea7faf6ceabe2c871c596086f97164256b8 (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
#!/usr/bin/make -f
# You must remove unused comment lines for the released package.
export DH_VERBOSE = 1
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

UPSTREAM_VERSION := $(shell dpkg-parsechangelog --show-field Version | cut -d- -f1)

get-orig-source:
	uscan --download-current-version --no-symlink
	tar -xf ../ucspi-tcp6-$(UPSTREAM_VERSION).tgz --strip-components=2
	mv ucspi-tcp6-$(UPSTREAM_VERSION)/ ucspi-tcp6
	rm ucspi-tcp6/conf-* ucspi-tcp6/INSTALL.md
	rm -r ucspi-tcp6/package/
	tar -czf ../ucspi-tcp6_$(UPSTREAM_VERSION).orig.tar.gz ucspi-tcp6
	rm -r ucspi-tcp6/

%:
	dh $@ --buildsystem=none

override_dh_auto_clean:
	-tar -xkf ../ucspi-tcp6_$(UPSTREAM_VERSION).orig.tar.gz --strip-components=1
	rm -f conf-cc
	rm -f conf-ld
	rm -f src/home
	$(MAKE) -C src clean

override_dh_auto_configure:
	echo "$(CC) -Iinclude `pkg-config -cflags qlibs` $(CFLAGS)" >conf-cc
	echo $(CC) >conf-ld
	touch src/home

override_dh_auto_build:
	$(MAKE) -C src default