]> git.itanic.dy.fi Git - maemo-mapper/blob - debian/rules
6f365e4219d49d050266f971290393ca59a9a5b8
[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         dh_testdir
44         ./autogen.sh
45         # Add here commands to configure the package.
46         CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --disable-static --enable-legacy=$(BUILD_LEGACY)
47         touch configure-stamp
48
49
50 build: build-stamp
51
52 build-stamp: configure-stamp 
53         dh_testdir
54
55         # Add here commands to compile the package.
56         $(MAKE)
57
58         touch build-stamp
59
60 clean:
61         dh_testdir
62         dh_testroot
63         rm -f build-stamp configure-stamp
64
65         # Add here commands to clean up after the build process.
66         -$(MAKE) clean
67
68         dh_clean 
69
70 install: build
71         dh_testdir
72         dh_testroot
73         dh_clean -k 
74         dh_installdirs
75
76         # Add here commands to install the package
77         $(MAKE) install DESTDIR=$(CURDIR)/debian/maemo-mapper
78
79 # Build architecture-independent files here.
80 binary-indep: build install
81 # We have nothing to do by default.
82
83 # Build architecture-dependent files here.
84 binary-arch: build install
85         dh_testdir
86         dh_testroot
87 #       dh_installchangelogs 
88 #       dh_installdocs
89 #       dh_installexamples
90 #       dh_install
91 #       dh_installmenu
92 #       dh_installdebconf       
93 #       dh_installlogrotate
94 #       dh_installemacsen
95 #       dh_installpam
96 #       dh_installmime
97 #       dh_installinit
98 #       dh_installcron
99 #       dh_installinfo
100 #       dh_installman
101         dh_link
102         dh_strip
103         dh_compress
104         dh_fixperms
105 #       dh_perl
106 #       dh_python
107         dh_makeshlibs
108         dh_installdeb
109         dh_shlibdeps
110         dh_gencontrol
111         dh_md5sums
112         dh_builddeb
113
114 binary: binary-indep binary-arch
115 .PHONY: build clean binary-indep binary-arch binary install configure