#!/usr/bin/make -f
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
-include /usr/share/quilt/quilt.make
+# svg2png is required to display country flags
+DEB_CONFIGURE_EXTRA_FLAGS += --enable-svg2png-scaling-flag="8 16 32 48 96"
-
-#let's help configure to figure out our host/build system
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
- CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
-else
- CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
-endif
-
-#disable gypsy support as there's no gypsy in Debian
-CONFFLAGS += --disable-gypsy
-
-#use posix threads
-CONFFLAGS += --enable-threads
-
-#configure options for paths to use
-CONFFLAGS += --prefix=/usr --docdir=/usr/share/doc/navit
+#OpenGL is broken
+DEB_CONFIGURE_EXTRA_FLAGS += --disable-gui-clutter
#don't build the samplemap - we don't want to download
#stuff while building...
-CONFFLAGS += --disable-samplemap
-
-#OpenGL is broken
-CONFFLAGS += --disable-gui-clutter
-
-#let's take care of optimization + debug builds
-CFLAGS += -Wall -g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-config-stamp: $(QUILT_STAMPFN)
- [ -f configure ] || sh autogen.sh
- LDFLAGS="$(LINKER_FLAGS)" \
- CFLAGS="$(CFLAGS)" \
- ./configure $(CONFFLAGS)
- touch $@
+DEB_CONFIGURE_EXTRA_FLAGS += --disable-samplemap
+#disable gypsy support as there's no gypsy in Debian
+DEB_CONFIGURE_EXTRA_FLAGS += --disable-gypsy
-build: build-stamp
-build-stamp: config-stamp
- dh_testdir
-
- $(MAKE)
-
- touch $@
-
-clean: clean-patched unpatch
-clean-patched:
- dh_testdir
- dh_testroot
- rm -f build-stamp config-stamp
-
- # Add here commands to clean up after the build process.
- [ ! -f Makefile ] || $(MAKE) distclean
- find $(CURDIR) -name Makefile.in -print0 | xargs -0 rm -f
- find $(CURDIR)/intl -mindepth 1 -name VERSION -o -type f -print0 | xargs -0 rm -f
- find $(CURDIR)/po -mindepth 1 -name '*.po' -o -name Makefile.am -o -print0 | xargs -0 rm -f
- find $(CURDIR)/navit/xpm -mindepth 1 -maxdepth 1 -name '*.xpm' -o -name 'osd_*.png' -o -type f -name '*.png' -print0 | xargs -0 rm -f
- rm -f ABOUT-NLS INSTALL aclocal.m4 compile config.guess \
- config.h.in config.rpath config.sub configure depcomp \
- install-sh missing mkinstalldirs ltmain.sh
- rm -rf autom4te.cache m4
- rm -f navit/graphics/cogl/graphics_cogl.loT
-
- dh_clean
-
-install:
-install: build
- dh_testdir
- dh_testroot
- dh_prep
- dh_installdirs
-
- # Add here commands to install the package into debian/tmp.
- $(MAKE) install DESTDIR=$(CURDIR)/debian/navit
-
- mv $(CURDIR)/debian/navit/usr/share/navit/navit.xml \
- $(CURDIR)/debian/navit/etc/navit
+#use posix threads
+DEB_CONFIGURE_EXTRA_FLAGS += --enable-threads
- mv $(CURDIR)/debian/navit/usr/share/navit/README \
- $(CURDIR)/debian/navit/usr/share/doc/navit
+DEB_CONFIGURE_SCRIPT_ENV += CFLAGS="-Wall"
- dh_install
+DEB_DH_INSTALLINIT_ARGS = -- start 20 S .
-# Build architecture-independent files here.
-binary-indep: build install
- dh_testdir -i
- dh_testroot -i
- dh_installchangelogs -i
- dh_installdocs -i
- dh_installexamples -i
-# dh_installmenu -i
-# dh_installdebconf -i
-# dh_installlogrotate -i
-# dh_installemacsen -i
-# dh_installcatalogs -i
-# dh_installpam -i
-# dh_installmime -i
-# dh_installinit -i
-# dh_installcron -i
-# dh_installinfo -i
-# dh_installwm -i
-# dh_installudev -i
-# dh_lintian -i
-# dh_undocumented -i
- dh_installman -i
- dh_link -i
- dh_compress -i
- dh_fixperms -i
-# dh_perl -i
-# dh_python -i
- dh_installdeb -i
- dh_gencontrol -i
- dh_md5sums -i
- dh_builddeb -i
+# Yes... I know... Quite ugly!
+post-patches:: post-patches-stamp
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir -a
- dh_testroot -a
- dh_installchangelogs -a
- dh_installdocs -a
- dh_installexamples -a
- dh_installmenu -a
-# dh_installdebconf -a
-# dh_installlogrotate -a
-# dh_installemacsen -a
-# dh_installcatalogs -a
-# dh_installpam -a
-# dh_installmime -a
-# dh_installinit -a
-# dh_installcron -a
-# dh_installinfo -a
-# dh_installwm -a
-# dh_installudev -a
-# dh_lintian -a
-# dh_undocumented -a
- dh_installman -a
- dh_strip -a
- dh_link -a
- dh_compress -a
- dh_fixperms -a
-# dh_perl -a
-# dh_python -a
-# dh_makeshlibs -a
- dh_installdeb -a
- dh_shlibdeps -a
- dh_gencontrol -a
- dh_md5sums -a
- dh_builddeb -a
+post-patches-stamp: Makefile.in
+ touch aclocal.m4
+ touch config.h.in
+ touch configure
+ find $(CURDIR) -name Makefile.in -exec touch {} \;
+ touch post-patches-stamp
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+clean::
+ rm -f post-patches-stamp