Uploaded initial version.
[guivpn] / trunk / vpngui / debian / rules
1 #!/usr/bin/make -f
2
3 #DEB_DH_INSTALL_SOURCEDIR=debian/tmp
4
5 #include /usr/share/cdbs/1/rules/debhelper.mk
6 #include /usr/share/cdbs/1/class/autotools.mk
7
8 #DEB_CONFIGURE_USER_FLAGS += --prefix=/usr --enable-maintainer-mode 
9 #DEB_DH_STRIP_ARGS=--dbg-package=osso-maesync-plugin-dbg
10
11 #ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
12 #       DEB_CONFIGURE_EXTRA_FLAGS=--enable-debug
13 #endif
14
15
16 #debian/stamp-autotools-files:
17 #       NOCONFIGURE=t ./autogen.sh
18 #       touch debian/stamp-autotools-files
19 ###############Rakesh##########
20 #####!/usr/bin/make -f
21 # -*- makefile -*-
22 # Sample debian/rules that uses debhelper.
23 # GNU copyright 1997 to 1999 by Joey Hess.
24
25 # Uncomment this to turn on verbose mode.
26 #export DH_VERBOSE=1
27
28
29 # These are used for cross-compiling and for saving the configure script
30 # from having to guess our platform (since we know it already)
31 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
32 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
33
34
35 CFLAGS = -Wall -g
36
37 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
38         CFLAGS += -O0
39 else
40         CFLAGS += -O2
41 endif
42 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
43         INSTALL_PROGRAM += -s
44 endif
45
46 # shared library versions, option 1
47 version=2.0.5
48 major=2
49 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
50 #version=`ls src/.libs/lib*.so.* | \
51 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
52 #major=`ls src/.libs/lib*.so.* | \
53 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
54
55 config.status: configure
56         dh_testdir
57         # Add here commands to configure the package.
58         CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-fonts-dir=\$${prefix}/share/fonts/hildon --disable-dependency-tracking --enable-debug
59
60
61 build: build-stamp
62 build-stamp:  config.status
63         dh_testdir
64
65         # Add here commands to compile the package.
66         $(MAKE)
67
68         touch build-stamp
69
70 clean:
71         dh_testdir
72         dh_testroot
73         rm -f build-stamp 
74
75         # Add here commands to clean up after the build process.
76         -$(MAKE) distclean
77 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
78         cp -f /usr/share/misc/config.sub config.sub
79 endif
80 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
81         cp -f /usr/share/misc/config.guess config.guess
82 endif
83
84
85         dh_clean 
86         
87 vpn_images := \
88     vpngui-on.png \
89     vpngui-on-small.png \
90     vpngui-off.png \
91     vpngui-pending.png \
92     vpngui-pending-small.png 
93     
94 install: build
95         dh_testdir
96         dh_testroot
97         dh_clean -k 
98         dh_installdirs
99
100         #vpn images
101         install -d $(CURDIR)/debian/tmp/usr/share/pixmaps/hiro-vpn
102         for im in $(vpn_images); do \
103         cp -a ./$$im $(CURDIR)/debian/tmp/usr/share/pixmaps/hiro-vpn/$$im ; \
104         done
105         
106         install -d $(CURDIR)/debian/tmp/usr/share/vpngui 
107         cp -a ./DISCLAIMER $(CURDIR)/debian/tmp/usr/share/vpngui/DISCLAIMER ; 
108         
109         # Add here commands to install the package into debian/tmp
110         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
111
112         # Clean up some stuff
113         find $(CURDIR)/debian/tmp/usr/lib/ -type f -name '*.*a' -print0 \
114                         | \xargs -0 rm -f
115                                     
116
117 # Build architecture-independent files here.
118 binary-indep: build install
119 # We have nothing to do by default.
120
121 # Build architecture-dependent files here.
122 binary-arch: build install
123         dh_testdir
124         dh_testroot
125         dh_installchangelogs 
126 #       dh_installexamples
127         dh_installdocs
128         dh_install --sourcedir=debian/tmp -v
129 #       dh_installmenu
130 #       dh_installdebconf       
131 #       dh_installlogrotate
132 #       dh_installemacsen
133 #       dh_installpam
134 #       dh_installmime
135 #       dh_installinit
136 #       dh_installcron
137 #       dh_installinfo
138         dh_installman
139         dh_installdeb
140         dh_link
141         dh_strip --dbg-package=vpngui
142         dh_compress
143         dh_fixperms
144 #       dh_perl 
145 #       dh_python
146         dh_makeshlibs
147         dh_shlibdeps -V
148         dh_gencontrol
149         dh_md5sums
150         maemo-optify
151         dh_builddeb
152
153 binary: binary-indep binary-arch
154 .PHONY: build clean binary-indep binary-arch binary install