* scale all gui icons
[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=/opt/navit \
23                              --sysconfdir=/etc
24
25 # scale all gui icons
26 DEB_CONFIGURE_EXTRA_FLAGS += --enable-svg2png-scaling="32 48 64" \
27                              --enable-svg2png-scaling-flag="16 24 32" \
28                              --enable-svg2png-scaling-nav="16 32 48 64"
29
30 # Force svg2png conversion using rsvg-convert since it is the most reliable
31 # ATM
32 DEB_CONFIGURE_EXTRA_FLAGS += --with-svg2png-use-rsvg-convert
33
34 # Enable GUIs we want
35 DEB_CONFIGURE_EXTRA_FLAGS += --enable-gui-internal \
36              --enable-hildon \
37              --disable-gui-sdl
38
39 # Disable python binding
40 DEB_CONFIGURE_EXTRA_FLAGS += --disable-binding-python
41
42 # Broken switches
43 # gd (run fails)
44 DEB_CONFIGURE_EXTRA_FLAGS += --disable-graphics-gd --disable-graphics-sdl
45
46 # don't build the samplemap - we don't want to download
47 # stuff while building...
48 DEB_CONFIGURE_EXTRA_FLAGS += --disable-samplemap
49
50 # Disable garmin
51 DEB_CONFIGURE_EXTRA_FLAGS += --disable-garmin
52
53 # no gpsd and  no gypsy-lib in maemo
54 DEB_CONFIGURE_EXTRA_FLAGS += --disable-vehicle-gpsd \
55              --enable-vehicle-gypsy \
56              --enable-vehicle-maemo
57
58 # Avoid floating point calculation for armel
59 ifeq ($(DEB_HOST_ARCH), armel)
60   DEB_CONFIGURE_EXTRA_FLAGS += --enable-avoid-float
61 endif
62
63 #let's take care of optimization + debug builds
64 CFLAGS += -Wall -g
65 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
66         CFLAGS += -O0
67 else
68         CFLAGS += -O2
69 endif
70
71 post-patches::
72                 AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9  autoreconf --install -I m4
73
74 clean::
75         # Add here commands to clean up after the build process.
76         [ ! -f Makefile ] || $(MAKE) distclean
77         find $(CURDIR) -name Makefile.in -print0 | xargs -0 rm -f
78         find $(CURDIR)/intl -mindepth 1 -name VERSION -o -type f -print0 | xargs -0 rm -f
79         find $(CURDIR)/po -mindepth 1 -name '*.po.in' -o -name Makefile.am -o -print0 | xargs -0 rm -rf
80         find $(CURDIR) -name .libs -type d -print0 | xargs -0 rm -rf
81         find $(CURDIR) -name .deps -type d -print0 | xargs -0 rm -rf
82         rm -f ABOUT-NLS INSTALL aclocal.m4 compile config.guess \
83               config.h.in config.rpath config.sub configure depcomp \
84               install-sh missing mkinstalldirs ltmain.sh
85         rm -rf autom4te.cache m4
86
87
88