* enabel vehicle-maemo and vehicle-gypsy
[navit-package] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode. 
4 #export DH_VERBOSE=1
5
6 include /usr/share/cdbs/1/rules/patchsys-quilt.mk
7 include /usr/share/cdbs/1/rules/debhelper.mk
8 include /usr/share/cdbs/1/class/autotools.mk
9
10 DEB_DESTDIR = $(CURDIR)/debian/tmp
11
12 #let's help configure to figure out our host/build system
13 DEB_HOST_ARCH   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
14 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
15 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
17   DEB_CONFIGURE_EXTRA_FLAGS += --build $(DEB_HOST_GNU_TYPE)
18 else
19   DEB_CONFIGURE_EXTRA_FLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
20 endif
21
22 DEB_CONFIGURE_EXTRA_FLAGS += --prefix=/usr
23 # svg2png is required to display country flags
24 DEB_CONFIGURE_EXTRA_FLAGS += --enable-svg2png-scaling-flag="8 16 32"
25
26 # Force svg2png conversion using rsvg-convert since it is the most reliable
27 # ATM
28 DEB_CONFIGURE_EXTRA_FLAGS += --with-svg2png-use-rsvg-convert
29
30 # Enable GUIs we want
31 DEB_CONFIGURE_EXTRA_FLAGS += --enable-gui-internal \
32              --enable-hildon \
33              --disable-gui-sdl
34
35 # Disable python binding
36 DEB_CONFIGURE_EXTRA_FLAGS += --disable-binding-python
37
38 # Broken switches
39 # gd (run fails)
40 DEB_CONFIGURE_EXTRA_FLAGS += --disable-graphics-gd --disable-graphics-sdl
41
42 # don't build the samplemap - we don't want to download
43 # stuff while building...
44 DEB_CONFIGURE_EXTRA_FLAGS += --disable-samplemap
45
46 # Disable garmin
47 DEB_CONFIGURE_EXTRA_FLAGS += --disable-garmin
48
49 # no gpsd and  no gypsy-lib in maemo
50 DEB_CONFIGURE_EXTRA_FLAGS += --disable-vehicle-gpsd \
51              --enable-vehicle-gypsy \
52              --enable-vehicle-maemo
53
54 # Avoid floating point calculation for armel
55 ifeq ($(DEB_HOST_ARCH), armel)
56   DEB_CONFIGURE_EXTRA_FLAGS += --enable-avoid-float
57 endif
58
59 #let's take care of optimization + debug builds
60 CFLAGS += -Wall -g
61 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
62         CFLAGS += -O0
63 else
64         CFLAGS += -O2
65 endif
66
67 post-patches::
68                 AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9  autoreconf --install -I m4
69
70 binary-install/navit::
71         # Remove unused .la files
72         find $(CURDIR)/debian/tmp/usr/lib/navit -name \*.la -print0 | xargs -0 rm -f
73
74         # Default navit configuration file moved into /etc
75         mv $(CURDIR)/debian/tmp/usr/share/navit/navit.xml \
76            $(CURDIR)/debian/navit/etc/navit
77
78         # Handled by debian/navit.docs
79         rm $(CURDIR)/debian/tmp/usr/share/navit/README
80
81 clean::
82         # Add here commands to clean up after the build process.
83         [ ! -f Makefile ] || $(MAKE) distclean
84         find $(CURDIR) -name Makefile.in -print0 | xargs -0 rm -f
85         find $(CURDIR)/intl -mindepth 1 -name VERSION -o -type f -print0 | xargs -0 rm -f
86         find $(CURDIR)/po -mindepth 1 -name '*.po.in' -o -name Makefile.am -o -print0 | xargs -0 rm -rf
87         find $(CURDIR) -name .libs -type d -print0 | xargs -0 rm -rf
88         find $(CURDIR) -name .deps -type d -print0 | xargs -0 rm -rf
89         rm -f ABOUT-NLS INSTALL aclocal.m4 compile config.guess \
90               config.h.in config.rpath config.sub configure depcomp \
91               install-sh missing mkinstalldirs ltmain.sh
92         rm -rf autom4te.cache m4
93
94
95