File: rules

package info (click to toggle)
ifhp 3.5.20-16
  • links: PTS
  • area: main
  • in suites: buster
  • size: 7,812 kB
  • sloc: ansic: 15,006; sh: 12,037; perl: 1,461; makefile: 640; sed: 16
file content (80 lines) | stat: -rwxr-xr-x 1,871 bytes parent folder | download | duplicates (2)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#! /usr/bin/make -f

CFLAGS = `dpkg-buildflags --get CFLAGS`
CXXFLAGS = `dpkg-buildflags --get CXXFLAGS`
LDFLAGS = `dpkg-buildflags --get LDFLAGS`
CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`

CONFFLAGS=\
 --prefix=/usr\
 --mandir=/usr/share/man\
 --sysconfdir=/etc\
 --with-filterdir=/usr/lib/ifhp\
 --disable-gscheck

ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
CONFFLAGS+=--disable-strip
endif

CFLAGS+=-Wno-unused-parameter -Wno-implicit-fallthrough

configure: configure-stamp
configure-stamp:
	dh_testdir
	cp -pf /usr/share/misc/config.sub /usr/share/misc/config.guess .
	DEVFD=/proc/self/fd/3 CFLAGS="$(CFLAGS)" ./configure $(CONFFLAGS) #
	touch $@

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp
	dh_testdir
	$(MAKE) LDFLAGS=$(LDFLAGS)
	touch $@

clean:
	dh_testdir
	dh_testroot
	dh_clean
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f intl/libintl.h
	rm -f configure-stamp build-stamp install-stamp
	rm -f gs_out
	rm -f config.log config.status

install: install-stamp
install-stamp:	build-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) DESTDIR=$(CURDIR)/debian/ifhp install
	# Remove the sample conf file and the UTILS directory (we install them via dh_installexamples)
	cd $(CURDIR)/debian/ifhp; rm -rf etc/ifhp.conf.sample usr/lib/ifhp/UTILS
	touch $@
	mkdir -p debian/ifhp/usr/share/lintian/overrides
	cp debian/ifhp.lintian-overrides debian/ifhp/usr/share/lintian/overrides/ifhp
	rmdir debian/ifhp/usr/bin

binary-indep: install

binary-arch: install
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGES
	dh_installexamples
	dh_installdocs
	dh_installdebconf
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary:	binary-indep binary-arch

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