]> git.itanic.dy.fi Git - maemo-mapper/blob - debian/rules
Administrative changes in preparation for release of Maemo Mapper v2.6.2.
[maemo-mapper] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13
14
15 CFLAGS = -Wall -g
16
17 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18         CFLAGS += -O0
19 else
20         CFLAGS += -O2
21 endif
22
23 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
24         INSTALL_PROGRAM += -s
25 endif
26
27 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
28         CFLAGS += -g -O0 -DDEBUG
29 else
30         CFLAGS += -DNDEBUG
31 endif
32
33 # Check maemo version we are building for
34 MAEMO_VERSION=$(shell pkg-config libosso --modversion | cut -d . -f 1)
35 ifeq ($(MAEMO_VERSION), 1)
36         BUILD_LEGACY = yes
37 else
38         BUILD_LEGACY = no
39 endif
40
41 configure: configure-stamp
42 configure-stamp:
43         # Remove generated help files before building
44         rm -f data/help/*/maemomapper.xml
45         dh_testdir
46         ./autogen.sh
47         # Add here commands to configure the package.
48         CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --disable-static --enable-legacy=$(BUILD_LEGACY)
49         touch configure-stamp
50
51
52 build: build-stamp
53
54 build-stamp: configure-stamp 
55         dh_testdir
56
57         # Add here commands to compile the package.
58         $(MAKE)
59
60         touch build-stamp
61
62 clean:
63         dh_testdir
64         dh_testroot
65         rm -f build-stamp configure-stamp
66
67         # Add here commands to clean up after the build process.
68         -$(MAKE) clean
69
70         dh_clean 
71
72 install: build
73         dh_testdir
74         dh_testroot
75         dh_clean -k 
76         dh_installdirs
77
78         # Add here commands to install the package
79         $(MAKE) install DESTDIR=$(CURDIR)/debian/maemo-mapper
80
81 # Build architecture-independent files here.
82 binary-indep: build install
83 # We have nothing to do by default.
84
85 # Build architecture-dependent files here.
86 binary-arch: build install
87         dh_testdir
88         dh_testroot
89 #       dh_installchangelogs 
90 #       dh_installdocs
91 #       dh_installexamples
92 #       dh_install
93 #       dh_installmenu
94 #       dh_installdebconf       
95 #       dh_installlogrotate
96 #       dh_installemacsen
97 #       dh_installpam
98 #       dh_installmime
99 #       dh_installinit
100 #       dh_installcron
101 #       dh_installinfo
102 #       dh_installman
103         dh_link
104         dh_strip
105         dh_compress
106         dh_fixperms
107 #       dh_perl
108 #       dh_python
109         dh_makeshlibs
110         dh_installdeb
111         dh_shlibdeps
112         dh_gencontrol
113         dh_md5sums
114         dh_builddeb
115
116 binary: binary-indep binary-arch
117 .PHONY: build clean binary-indep binary-arch binary install configure