[med-svn] [mhap] 01/07: Don't hardcode package version or classpath in debian/*
Afif Elghraoui
afif at moszumanska.debian.org
Wed Jul 13 08:09:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
afif pushed a commit to branch master
in repository mhap.
commit 0912580425e7f93a221cd7727b7381ffe8e12174
Author: Afif Elghraoui <afif at ghraoui.name>
Date: Tue Jul 12 23:03:49 2016 -0700
Don't hardcode package version or classpath in debian/*
---
debian/README.Debian | 4 ++--
debian/install | 2 +-
debian/links.in | 2 ++
debian/manifest | 4 ----
debian/manifest.in | 4 ++++
debian/rules | 25 ++++++++++++++++++++++---
6 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/debian/README.Debian b/debian/README.Debian
index cce07ad..41e4ce1 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -4,7 +4,7 @@ mhap for Debian
The plain installation of MHAP gives you a jar file that you must
run with a command like
- $ java -jar mhap-1.6.jar [/arguments/]
+ $ java -jar mhap-<version>.jar [/arguments/]
This Debian package allows you to call mhap as if it were any other program:
@@ -14,4 +14,4 @@ However, if you need to pass special parameters to the JVM (like raising
the memory limit), you may need to use the jar file directly.
The jar file for MHAP can be found in /usr/share/java/
- -- Afif Elghraoui <afif at ghraoui.name>, Sun, 13 Sep 2015 01:11:30 -0700
+ -- Afif Elghraoui <afif at debian.org>, Wed, 13 Jul 2016 00:04:53 -0700
diff --git a/debian/install b/debian/install
index 2707811..e213d58 100644
--- a/debian/install
+++ b/debian/install
@@ -1 +1 @@
-target/mhap-2.0.jar usr/share/java
+target/mhap-*.jar usr/share/java
diff --git a/debian/links.in b/debian/links.in
new file mode 100644
index 0000000..c8e7f19
--- /dev/null
+++ b/debian/links.in
@@ -0,0 +1,2 @@
+/usr/share/java/mhap- at DEB_VERSION_UPSTREAM@.jar /usr/share/java/mhap.jar
+/usr/share/java/mhap- at DEB_VERSION_UPSTREAM@.jar /usr/bin/mhap
diff --git a/debian/manifest b/debian/manifest
deleted file mode 100644
index e77f51d..0000000
--- a/debian/manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/share/java/mhap-2.0.jar:
- Main-Class: edu.umd.marbl.mhap.main.MhapMain
- Class-Path: /usr/share/java/commons-compress.jar /usr/share/java/fastutil.jar /usr/share/java/guava.jar /usr/share/java/jaligner.jar
- Debian-Java-Home: /usr/lib/jvm/java-8-openjdk-*
diff --git a/debian/manifest.in b/debian/manifest.in
new file mode 100644
index 0000000..a1d5486
--- /dev/null
+++ b/debian/manifest.in
@@ -0,0 +1,4 @@
+usr/share/java/mhap- at DEB_VERSION_UPSTREAM@.jar:
+ Main-Class: edu.umd.marbl.mhap.main.MhapMain
+ Class-Path: @CLASSPATH@
+ Debian-Java-Home: /usr/lib/jvm/java-8-openjdk-*
diff --git a/debian/rules b/debian/rules
index 1d84e02..dee2f34 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,14 +2,33 @@
#DH_VERBOSE = 1
-DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
export LC_ALL=C.UTF-8
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(DEB_HOST_ARCH)
+DEB_VERSION_UPSTREAM := $(DEB_VERSION_UPSTREAM:+dfsg=)
+
+cupboard = \
+ commons-compress \
+ fastutil \
+ guava \
+ jaligner \
+ ssw \
+
+CLASSPATH = $(foreach jar,$(strip $(cupboard)),/usr/share/java/$(jar).jar)
+
+%: %.in
+ sed \
+ -e 's|@DEB_VERSION_UPSTREAM@|$(DEB_VERSION_UPSTREAM)|g' \
+ -e 's|@CLASSPATH@|$(CLASSPATH)|g' \
+ $< > $@
%:
dh $@ --with javahelper --buildsystem=maven
-override_dh_link:
- dh_link usr/share/java/mhap-2.0.jar usr/bin/mhap
+override_dh_auto_build: debian/manifest debian/links
+ dh_auto_build
+
+override_dh_clean:
+ dh_clean
+ $(RM) debian/manifest debian/links
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/mhap.git
More information about the debian-med-commit
mailing list