maemo: Explicitly list the installed files.
[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 --libexecdir=/usr/lib \
26         --disable-tools --disable-scripts \
27         --disable-sha1 --disable-sha2 --disable-aes --disable-des \
28         --disable-md5 --disable-gmp --disable-pgp --disable-dnskey \
29         --enable-openssl --enable-monolithic --enable-eap-identity \
30         --enable-eap-md5 --enable-eap-mschapv2 --enable-maemo
31
32 CFLAGS = -Wall -g -Wno-format -Wno-pointer-sign -Wno-strict-aliasing -Wno-sign-compare -Wno-unused-parameter
33
34 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
35         CFLAGS += -O0
36 else
37         CFLAGS += -O2
38 endif
39
40 ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
41         INSTALL_PROGRAM += -s
42 endif
43
44 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
45         NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
46         MAKEFLAGS += -j$(NUMJOBS)
47 endif
48
49 # Use hardware floating point
50 ifneq (,$(findstring vfp,$(DEB_BUILD_OPTIONS)))
51         CFLAGS += -mfpu=vfp -mfloat-abi=softfp
52 endif
53
54 config.status: configure
55         dh_testdir
56         ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info $(CONFIG_OPTIONS) CFLAGS="$(CFLAGS)" 
57         #LDFLAGS="-Wl,-z,defs"
58
59
60 #Architecture 
61 build: build-arch build-indep
62
63 build-arch: build-arch-stamp
64 build-arch-stamp:  config.status
65         $(MAKE)
66         touch $@
67
68 build-indep: build-indep-stamp
69 build-indep-stamp:  config.status
70         # Add here commands to compile the indep part of the package.
71         #$(MAKE) doc
72         touch $@
73
74 clean:
75         dh_testdir
76         dh_testroot
77         rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
78
79         -$(MAKE) distclean
80 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
81         cp -f /usr/share/misc/config.sub config.sub
82 endif
83 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
84         cp -f /usr/share/misc/config.guess config.guess
85 endif
86
87         dh_clean 
88
89 install: build
90         dh_testdir
91         dh_testroot
92         dh_clean -k
93         dh_installdirs
94
95         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
96
97         dh_install --list-missing --sourcedir=debian/tmp
98
99 # Must not depend on anything. This is to be called by
100 # binary-arch/binary-indep
101 # in another 'make' thread.
102 binary-common:
103         dh_testdir
104         dh_testroot
105         dh_installchangelogs NEWS
106         dh_installdocs
107         dh_installexamples
108 #       dh_installmenu
109 #       dh_installdebconf       
110 #       dh_installlogrotate     
111 #       dh_installemacsen
112 #       dh_installpam
113 #       dh_installmime
114 #       dh_python
115 #       dh_installinit
116 #       dh_installcron
117 #       dh_installinfo
118         dh_installman
119         dh_link
120         dh_strip
121         dh_compress 
122         dh_fixperms
123 #       dh_perl
124         dh_makeshlibs
125         dh_installdeb
126         dh_shlibdeps
127         dh_gencontrol
128         dh_md5sums
129         dh_builddeb
130
131 # Build architecture independant packages using the common target.
132 binary-indep: build-indep install
133         $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
134
135 # Build architecture dependant packages using the common target.
136 binary-arch: build-arch install
137         $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
138
139 binary: binary-arch binary-indep
140 .PHONY: build clean binary-indep binary-arch binary install