summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 59c7712cfaae63a080ce595616fe61b2bb0ce16f (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
#!/usr/bin/make -f

## uncomment to enable hardening
#export DEB_BUILD_HARDENING=1

cfg_opts := --prefix=/opt/vyatta
cfg_opts += --libdir=/usr/lib
cfg_opts += --includedir=/usr/include
cfg_opts += --mandir=\$${prefix}/share/man
cfg_opts += --infodir=\$${prefix}/share/info
cfg_opts += CFLAGS="$(CFLAGS)"
cfg_opts += LDFLAGS="-Wl,-z,defs"
inst_opts := --sourcedir=debian/tmp

clean:
	dh clean

binary binary-arch binary-indep: install
	rm -f debian/files
	dh binary --before dh_perl
	dh_perl /opt/vyatta/share/perl5 /opt/vyatta/share/perl5/Vyatta
	dh binary --after dh_perl --before dh_gencontrol
	rm -f debian/*/DEBIAN/conffiles
	if [ -f "../.VYATTA_DEV_BUILD" ]; then \
		dh_gencontrol -- -v999.dev; \
	else \
		dh_gencontrol; \
	fi
	dh binary --after dh_gencontrol

build: Makefile
build:
	rm -f debian/*.debhelper*
	dh build --before configure
	dh build --after configure --before dh_auto_test
	dh build --after dh_auto_test

Makefile: Makefile.in
	./configure $(cfg_opts)

Makefile.in: Makefile.am configure.ac
	autoreconf -i --force

install: build
	dh install --before dh_install
	dh_install $(inst_opts)