#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 include /usr/share/quilt/quilt.make #let's help configure to figure out our host/build system DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) 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 CONFFLAGS += --prefix=/usr # svg2png is required to display country flags CONFFLAGS += --enable-svg2png-scaling-flag="8 16 32 48 96" # Force svg2png conversion using rsvg-convert since it is the most reliable # ATM CONFFLAGS += --with-svg2png-use-rsvg-convert # Enable GUIs we want CONFFLAGS += --enable-gui-gtk --enable-gui-internal \ --enable-hildon # Disable python binding CONFFLAGS += --disable-binding-python # Broken switches # gd (run fails) CONFFLAGS += --disable-graphics-gd --disable-graphics-sdl # don't build the samplemap - we don't want to download # stuff while building... CONFFLAGS += --disable-samplemap # Enable garmin CONFFLAGS += --enable-garmin # disable gypsy support as there's no gypsy in Debian CONFFLAGS += --disable-vehicle-gypsy # Avoid floating point calculation for armel ifeq ($(DEB_HOST_ARCH), armel) CONFFLAGS += --enable-avoid-float endif #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: debian/stamp-patched [ -f configure ] || sh autogen.sh LDFLAGS="$(LINKER_FLAGS)" \ CFLAGS="$(CFLAGS)" \ ./configure $(CONFFLAGS) touch $@ 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.in' -o -name Makefile.am -o -print0 | xargs -0 rm -f find $(CURDIR) -name .libs -type d -print0 | xargs -0 rm -rf find $(CURDIR) -name .deps -type d -print0 | xargs -0 rm -rf 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 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/tmp # Remove unused .la files find $(CURDIR)/debian/tmp/usr/lib/navit -name \*.la -print0 | xargs -0 rm -f # Default navit configuration file moved into /etc mv $(CURDIR)/debian/tmp/usr/share/navit/navit.xml \ $(CURDIR)/debian/navit/etc/navit # Handled by debian/navit.docs rm $(CURDIR)/debian/tmp/usr/share/navit/README # Generate icon for Debian menu convert $(CURDIR)/navit/xpm/desktop_icons/128x128/navit.png -resize 32x32 $(CURDIR)/debian/navit-data/usr/share/pixmaps/navit.xpm dh_install # 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 # 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 binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install