unit-tests: Add test for rekey collision if one CREATE_CHILD_SA response is delayed
[strongswan.git] / packages / maemo-strongswan / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 #
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 #
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets  by Bill Allombert 2001
12
13 # Uncomment this to turn on verbose mode.
14 #export DH_VERBOSE=1
15
16 # This has to be exported to make some magic below work.
17 export DH_OPTIONS
18
19 # These are used for cross-compiling and for saving the configure script
20 # from having to guess our platform (since we know it already)
21 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
22 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
23
24 CONFIG_OPTIONS = \
25         --prefix=/usr --sysconfdir=/etc \
26         --disable-scepclient --disable-pki --disable-scripts \
27         --disable-fips-prf --disable-pubkey --disable-attr \
28         --disable-constraints --disable-revocation \
29         --disable-sha1 --disable-sha2 --disable-aes --disable-des \
30         --disable-md5 --disable-gmp --disable-pgp --disable-dnskey \
31         --enable-openssl --enable-monolithic --enable-eap-identity \
32         --enable-eap-md5 --enable-eap-mschapv2 --enable-maemo
33
34 CFLAGS = -Wall -g -Wno-format -Wno-pointer-sign -Wno-strict-aliasing -Wno-sign-compare -Wno-unused-parameter
35
36 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
37         CFLAGS += -O0
38 else
39         CFLAGS += -O2
40 endif
41
42 ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
43         INSTALL_PROGRAM += -s
44 endif
45
46 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
47         NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
48         MAKEFLAGS += -j$(NUMJOBS)
49 endif
50
51 # Use hardware floating point
52 ifneq (,$(findstring vfp,$(DEB_BUILD_OPTIONS)))
53         CFLAGS += -mfpu=vfp -mfloat-abi=softfp
54 endif
55
56 config.status: configure
57         dh_testdir
58         ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info $(CONFIG_OPTIONS) CFLAGS="$(CFLAGS)"
59         #LDFLAGS="-Wl,-z,defs"
60
61
62 #Architecture
63 build: build-arch build-indep
64
65 build-arch: build-arch-stamp
66 build-arch-stamp:  config.status
67         $(MAKE)
68         touch $@
69
70 build-indep: build-indep-stamp
71 build-indep-stamp:  config.status
72         # Add here commands to compile the indep part of the package.
73         #$(MAKE) doc
74         touch $@
75
76 clean:
77         dh_testdir
78         dh_testroot
79         rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
80
81         -$(MAKE) distclean
82 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
83         cp -f /usr/share/misc/config.sub config.sub
84 endif
85 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
86         cp -f /usr/share/misc/config.guess config.guess
87 endif
88
89         dh_clean
90
91 install: build
92         dh_testdir
93         dh_testroot
94         dh_clean -k
95         dh_installdirs
96
97         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
98
99         dh_install --list-missing --sourcedir=debian/tmp
100
101 # Must not depend on anything. This is to be called by
102 # binary-arch/binary-indep
103 # in another 'make' thread.
104 binary-common:
105         dh_testdir
106         dh_testroot
107         dh_installchangelogs NEWS
108         dh_installdocs
109         dh_installexamples
110 #       dh_installmenu
111 #       dh_installdebconf
112 #       dh_installlogrotate
113 #       dh_installemacsen
114 #       dh_installpam
115 #       dh_installmime
116 #       dh_python
117 #       dh_installinit
118 #       dh_installcron
119 #       dh_installinfo
120         dh_installman
121         dh_link
122         dh_strip
123         dh_compress
124         dh_fixperms
125 #       dh_perl
126         dh_makeshlibs
127         dh_installdeb
128         dh_shlibdeps
129         dh_gencontrol
130         dh_md5sums
131         dh_builddeb
132
133 # Build architecture independent packages using the common target.
134 binary-indep: build-indep install
135         $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
136
137 # Build architecture dependent packages using the common target.
138 binary-arch: build-arch install
139         $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
140
141 binary: binary-arch binary-indep
142 .PHONY: build clean binary-indep binary-arch binary install