#!/usr/bin/make -f # Made with the aid of dh_make, by Craig Small # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. # Some lines taken from debmake, by Cristoph Lameter. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS # Enable hardening build flags export DEB_BUILD_MAINT_OPTIONS=hardening=+all DEB_HOST_MULTIARCH?=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) include /usr/share/dpkg/pkg-info.mk UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//') JAVA_HOME = /usr/lib/jvm/default-java CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS) LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) CFLAGS=$(shell dpkg-buildflags --get CFLAGS) ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g endif # `nostrip' handled by dh_strip... CFLAGS += -I$(JAVA_HOME)/include/linux datumgrids: datumgrids-stamp datumgrids-stamp: unshar -c -d $(CURDIR)/nad $(CURDIR)/debian/datumgrids.shar unshar -c -d $(CURDIR)/nad $(CURDIR)/debian/datumgrids-ch.shar touch $@ %: if [ "$@" != "datumgrids" -a "$@" != "datumgrids-stamp" ]; then \ dh $@ --with autoreconf --parallel ; \ fi override_dh_auto_clean: ( cd $(CURDIR)/nad && cat $(CURDIR)/debian/datumgrids.list $(CURDIR)/debian/datumgrids-ch.list | xargs rm -f ) dh_auto_clean -Sant -Djniwrap dh_auto_clean override_dh_auto_configure: datumgrids dh_auto_configure -- --with-jni=$(JAVA_HOME)/include override_dh_auto_build: dh_auto_build -Sant -Djniwrap -- javadoc dh_auto_build override_dh_auto_test: # Ignore test failures on problematic architectures only ifneq (,$(filter $(DEB_BUILD_ARCH),i386 hurd-i386 hppa ia64 kfreebsd-i386 powerpc)) dh_auto_test || echo "Ignoring test failures" else dh_auto_test endif override_dh_auto_install: dh_auto_install cp $(CURDIR)/src/projects.h $(CURDIR)/debian/tmp/usr/include/. cp $(CURDIR)/src/org_proj4_PJ.h $(CURDIR)/debian/tmp/usr/include/. # Empty dependency_libs in .la files sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'` # Remove useless autogenreated doxygen files rm -f $(CURDIR)/jniwrap/docs/html/*.md5 override_dh_install: dh_install --list-missing override_dh_installdocs: dh_installdocs -A AUTHORS NEWS README override_dh_makeshlibs: dh_makeshlibs -- -v$(UPSTREAM_VERSION)