1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
#!/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)
PROJ_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://')
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_clean:
dh_clean src/org_proj4_PJ_Type.h
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 -- do_javah jar_it do_make_help
dh_auto_build
override_dh_auto_test:
dh_auto_test || echo "Ignoring test failures"
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/.
cp $(CURDIR)/src/org_proj4_PJ_Type.h $(CURDIR)/debian/tmp/usr/include/.
# Fix manpages
for man in $(CURDIR)/debian/tmp/usr/share/man/man1/*.1 $(CURDIR)/debian/tmp/usr/share/man/man3/*.3; \
do \
sed -i -e 's/^\.nr LL 5.5i$$/\.\\"/' $$man; \
done
# Fixating man section in pj_init.3
sed -i -e 's/\(.TH PJ_INIT\) 3U\(.*\)/\1 3\2/' $(CURDIR)/debian/tmp/usr/share/man/man3/pj_init.3
# 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
# Remove doxygen jquery.js copy in favor of libjs-jquery
rm -f $(CURDIR)/debian/*/usr/share/doc/libproj-java/html/jquery.js
override_dh_install:
dh_install --list-missing
override_dh_installdocs:
dh_installdocs AUTHORS NEWS README
override_dh_makeshlibs:
dh_makeshlibs -- -v$(PROJ_VERSION)
|