]> git.ipfire.org Git - people/ms/strongswan.git/blob - packages/strongswan-nm/debian/rules
reintegrated bus-refactoring branch
[people/ms/strongswan.git] / packages / strongswan-nm / debian / rules
1 #!/usr/bin/make -f
2
3 package = strongswan-nm
4 docdir = debian/tmp/usr/share/doc/$(package)
5
6 CC = gcc
7 CFLAGS = -Wall -Wno-format -Wno-pointer-sign -Wno-strict-aliasing -g
8 INSTALL_PROGRAM = install
9
10 ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
11 CFLAGS += -O2
12 endif
13 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
14 INSTALL_PROGRAM += -s
15 endif
16
17 build:
18 $(checkdir)
19 ./configure --disable-aes --disable-des --disable-md5 --disable-sha1 \
20 --disable-sha2 --disable-fips-prf --disable-gmp --disable-stroke \
21 --disable-pluto --disable-tools --disable-updown --enable-openssl \
22 --enable-nm --enable-eap-gtc --enable-agent \
23 --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib
24 $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)"
25 touch build
26
27 clean:
28 $(checkdir)
29 rm -f build
30 [ ! -f Makefile ] || $(MAKE) clean
31 rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars
32
33 binary-indep: checkroot build
34 $(checkdir)
35
36 binary-arch: checkroot build
37 rm -rf debian/tmp
38 install -d debian/tmp/DEBIAN $(docdir)
39 $(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
40 DESTDIR=$$(pwd)/debian/tmp install
41 cp -a NEWS debian/copyright $(docdir)
42 cp -a debian/changelog $(docdir)/changelog.Debian
43 cd $(docdir) && gzip -9 changelog.Debian
44 dpkg-gencontrol -isp
45 chown -R root:root debian/tmp
46 dpkg --build debian/tmp ..
47
48 define checkdir
49 test -f src/charon/daemon.c -a -f debian/rules
50 endef
51
52 binary: binary-indep binary-arch
53
54 checkroot:
55 $(checkdir)
56 test $$(id -u) = 0
57
58 .PHONY: binary binary-arch binary-indep clean checkroot
59