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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
# Create versioned jar file; strip off the debian source revision and package revision
VERSION=$(shell dpkg-parsechangelog | sed -n 's/Version: \(.*\)+[0-9\-]*/\1/p')
# If the user has not explicitly set JAVA_HOME, export sensible value
# to make sure that the correct compiler is used by ant.
JAVA_HOME ?= /usr/lib/jvm/java-gcj
export JAVA_HOME
PREFIX=debian/libjlibeps-java
build: build-stamp
build-stamp:
dh_testdir
mkdir out
mkdir bin
ant -Dbasedir=. -f debian/build.xml compile
ant -Dbasedir=. -f debian/build.xml jar doc
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp
find . -name \*.jar -exec rm -f {} \;
find . -name \*.class -exec rm -f {} \;
rm -rf out bin api
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Build architecture-dependent files here.
binary-arch:
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installdirs -i
cp out/jlibeps.jar $(PREFIX)/usr/share/java/net.sourceforge.jlibeps-$(VERSION).jar
dh_link usr/share/java/net.sourceforge.jlibeps-$(VERSION).jar usr/share/java/net.sourceforge.jlibeps.jar
dh_installchangelogs
dh_installdocs
dh_installman
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
# Be explicit given that there is plenty of confusion about what this target means
get-orig-source: get-latest-source
get-latest-source:
cd $(dir $_).. && \
uscan=$$(uscan --report --dehs --upstream-version 0) && \
uver=$$(echo "$$uscan" | sed -n 's,<upstream-version>\(.*\)</.*>,\1,p') && \
uurl=$$(echo "$$uscan" | sed -n 's,<upstream-url>\(.*\)</.*>,\1,p') && \
echo debian/repackage --upstream-version "$${uver}" "$${uurl}" $(CURDIR) &&\
sh debian/repackage --upstream-version "$${uver}" "$${uurl}" $(CURDIR)
.PHONY: build clean binary-indep binary-arch binary install get-orig-source get-latest-source
|