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
|
#!/usr/bin/make -f
# -*- makefile -*-
SRC_PACKAGE = brailleutils
PACKAGE = $(SRC_PACKAGE)
LIBPACKAGE = lib$(PACKAGE)-java
SRC_VERSION = 1.2.3
TARBALL = $(SRC_PACKAGE)_$(SRC_VERSION).orig.tar.xz
.PHONY: get-orig-source override_dh_auto_clean override_dh_auto_build override_dh_installchangelogs override_dh_install
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@ --with maven_repo_helper
override_dh_auto_clean:
-rm -rf ant-build/output/*
override_dh_install:
mh_installjar -p$(LIBPACKAGE) -l debian/pom.xml ant-build/output/dist/brailleUtils-core.jar
dh_install
override_dh_auto_build:
ant -DuseExternalJarsOnLinux=true
override_dh_installchangelogs:
dh_installchangelogs doc/changes.txt
get-orig-source:
rm -rf get-orig-source $(TARBALL)
mkdir get-orig-source
svn export http://brailleutils.googlecode.com/svn/tags/release_1.2.3/ \
get-orig-source/$(SRC_PACKAGE)-$(SRC_VERSION).orig
# Remove $SRC/lib/* and $SRC/ant-build/resources, because it's not necessary in Debian, dependencies are in Debian itself available
rm -rf get-orig-source/$(SRC_PACKAGE)-$(SRC_VERSION).orig/lib/*
rm -rf get-orig-source/$(SRC_PACKAGE)-$(SRC_VERSION).orig/ant-build/resources
tar cJf $(TARBALL) -C get-orig-source $(SRC_PACKAGE)-$(SRC_VERSION).orig
rm -rf get-orig-source
# policy 4.9 forbids this:
#mv $(TARBALL) ..
#/usr/share/maven-repo/org/daisy/libs/libbrailleutils-java/libbrailleutils-java-debian.jar /usr/share/java/$(PACKAGE).jar
#understand that command:
#java -cp build/$(PACKAGE)-debian.jar:$(CLASSPATH) $(JAVA_OPTIONS) org.debian.maven.repo.POMCleaner --no-parent --has-package-version --rules=debian/maven.rules pom.xml \
# debian/.mh/$(PACKAGE)-debian.pom debian/.mh/pom.properties
|