[med-svn] [biojava-live] 04/14: prepare for release 1.8, add a build.xml for ant build
Andreas Tille
tille at debian.org
Tue Sep 26 08:17:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch 1.9.2
in repository biojava-live.
commit 35308b078b1a463e2b19578caf88f13f2fbcea9a
Author: Olivier Sallou <osallou at debian.org>
Date: Wed May 23 12:34:16 2012 +0000
prepare for release 1.8, add a build.xml for ant build
---
debian/build.xml | 104 ++++++++++++
debian/changelog | 9 +-
debian/control | 17 +-
debian/copyright | 1 +
debian/get-orig-source | 30 ++++
debian/libbiojava-java-doc.install | 3 +
...ibbiojava1.7-java.dirs => libbiojava-java.dirs} | 0
debian/libbiojava-java.docs | 4 -
debian/libbiojava1.8-java.jlibs | 9 ++
debian/rules | 178 ++++++++++-----------
debian/watch | 2 +-
11 files changed, 248 insertions(+), 109 deletions(-)
diff --git a/debian/build.xml b/debian/build.xml
new file mode 100644
index 0000000..c54333d
--- /dev/null
+++ b/debian/build.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" ?>
+<project name="BJLIB" default="jar" basedir=".">
+ <!-- Directory structure -->
+ <property name="build.dir" location="../build/BJLIB"/>
+ <property name="test.dir" location="../buildtest/BJLIB"/>
+ <property name="dist.dir" location="../dist"/>
+ <property name="src.dir" location="src/main/java"/>
+ <property name="resources.dir" location="src/main/resources"/>
+ <property name="test.src.dir" location="src/test/java"/>
+ <property name="test.resources.dir" location="src/test/resources"/>
+ <property name="lib.dir" location="/usr/share/java"/>
+ <property name="docs.dir" location="../javadoc"/>
+ <property name="docs.lib.dir" location="../doc/BJLIB"/>
+ <property name="class.dir" location="${build.dir}/classes"/>
+ <property name="test.class.dir" location="${test.dir}/classes"/>
+
+ <property name="project.name" value="biojava"/>
+ <property name="debug" value="true"/>
+ <property name="optimized" value="true"/>
+ <property name="project.version" value="1.8.2"/>
+ <property environment="env"/>
+ <property name="project.jarfile.name" value="BJLIB.jar"/>
+
+ <property name="class.path" value="${lib.dir}/commons-cli.jar ${lib.dir}/commons-collections.jar ${lib.dir}/commons-dbcp.jar ${lib.dir}/junit.jar ${lib.dir}/commons-pool.jar ${lib.dir}/guava.jar ${lib.dir}/jgrapht0.8.jar"/>
+
+ <path id="compile.classpath">
+ <fileset dir="${lib.dir}">
+ <include name="commons-cli.jar"/>
+ <include name="commons-collections.jar"/>
+ <include name="commons-dbcp.jar"/>
+ <include name="commons-pool.jar"/>
+ <include name="junit.jar"/>
+ <include name="guava.jar"/>
+ <include name="jgrapht0.8.jar"/>
+ </fileset>
+ <fileset dir="${dist.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+
+ <target name="clean">
+ <echo level="info">Cleaning build directories</echo>
+ <delete verbose="true" includeEmptyDirs="true">
+ <fileset dir="${build.dir}" includes="**"/>
+ <fileset dir="${dist.dir}" includes="${project.name}*.jar"/>
+ </delete>
+ </target>
+
+ <target name="javadocs">
+ <mkdir dir="${docs.dir}"/>
+ <mkdir dir="${docs.lib.dir}"/>
+ <javadoc destdir="${docs.lib.dir}" sourcepath="${src.dir}" packagenames="org.*">
+ <link href="http://java.sun.com/j2se/1.6.0/docs/api/"/>
+ </javadoc>
+ </target>
+
+ <target name="compile">
+ <mkdir dir="${class.dir}"/>
+ <mkdir dir="${dist.dir}"/>
+ <javac srcdir="${src.dir}" destdir="${class.dir}" classpathref="compile.classpath" debug="${debug}" optimize="${optimized}" nowarn="true">
+ </javac>
+ <copy todir="${class.dir}" failonerror="false">
+ <fileset dir="${resources.dir}"/>
+ </copy>
+ </target>
+
+ <target name="compile-test">
+ <mkdir dir="${test.class.dir}"/>
+ <javac srcdir="${test.src.dir}" destdir="${test.class.dir}" classpathref="compile.classpath" debug="${debug}" optimize="${optimized}" nowarn="true">
+ </javac>
+ <copy todir="${test.class.dir}" failonerror="false">
+ <fileset dir="${test.resources.dir}"/>
+ </copy>
+ </target>
+
+ <path id="test.classpath">
+ <path refid="compile.classpath"/>
+ <pathelement location="${test.class.dir}" />
+ </path>
+
+ <target name="test" depends="compile-test">
+ <junit haltonfailure="yes" printsummary="yes">
+ <classpath refid="test.classpath"/>
+ <formatter type="plain" usefile="false" />
+ <batchtest>
+ <fileset dir="${test.class.dir}" includes="**/*Test.class" excludes="**/Abstract*.class" />
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="jar" depends="compile">
+ <jar destfile="${dist.dir}/${project.jarfile.name}" basedir="${class.dir}" >
+ <manifest>
+ <attribute name="Built-By" value="Debian-Med team"/>
+ <attribute name="Class-Path" value="${class.path}"/>
+ <attribute name="Specification-Title" value="BioJava"/>
+ <attribute name="Specification-Version" value="${project.version}"/>
+ </manifest>
+ </jar>
+ </target>
+
+</project>
+
diff --git a/debian/changelog b/debian/changelog
index 13dc71b..e19f473 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,13 +1,16 @@
-biojava-live (1:3.0.3-1) UNRELEASED; urgency=low
+biojava-live (1:1.8.2-1) UNRELEASED; urgency=low
* New upstream version
Closes: #65982
+ [ Anreas Tille ]
* debian/upstream:
- Author conform to BibTeX syntax
- Add eprint
- TODO: Use maven_helper
- -- Andreas Tille <tille at debian.org> Wed, 18 Apr 2012 19:39:44 +0200
+ * TODO fix DAS compilation, check doc and lib setup in packages
+ * TODO issue with watch to detect latest release, organized in sub directories
+
+ -- Olivier Sallou <osallou at debian.org> Wed, 18 Apr 2012 19:39:44 +0200
biojava-live (1:1.7.1-2) unstable; urgency=low
diff --git a/debian/control b/debian/control
index 9df3d9b..5283d62 100644
--- a/debian/control
+++ b/debian/control
@@ -4,11 +4,12 @@ Priority: optional
Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
DM-Upload-Allowed: yes
Uploaders: Steffen Moeller <moeller at debian.org>,
- Andreas Tille <tille at debian.org>
+ Andreas Tille <tille at debian.org>,
+ Olivier Sallou <osallou at debian.org>
Build-Depends-Indep: libcommons-dbcp-java (>= 1.1), libhsqldb-java,
libcommons-collections-java (>= 2.1), libcommons-pool-java (>= 1.1),
- libbytecode-java (>= 0.92.cvs.20070925),
- default-jdk, junit4,
+ libcommons-cli-java, libguava-java (>= 11.0.1)
+ default-jdk, junit4,javahelper (>=0.25), libjgrapht-java
ant-optional
Build-Depends: debhelper (>= 9), cdbs, ant
Standards-Version: 3.9.3
@@ -16,7 +17,7 @@ Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/biojava/trunk/
Vcs-Svn: svn://svn.debian.org/debian-med/trunk/packages/biojava/trunk/
Homepage: http://www.biojava.org
-Package: libbiojava1.7-java
+Package: libbiojava1.8-java
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends},
libcommons-pool-java (>= 1.1),
@@ -25,8 +26,6 @@ Depends: ${shlibs:Depends}, ${misc:Depends},
libhsqldb-java,
libbytecode-java
Suggests: java-virtual-machine, libjgrapht-java, libbiojava-java, libbiojava-java-doc
-Conflicts: libbiojava1.6-java
-Replaces: libbiojava1.6-java
Description: Java API to biological data and applications (version 1.7)
This package presents the Open Source Java API to biological databases
and a series of mostly sequence-based algorithms. The APIs are not
@@ -38,9 +37,9 @@ Description: Java API to biological data and applications (version 1.7)
Package: libbiojava-java
Architecture: all
-Depends: libbiojava1.7-java, ${misc:Depends}
-Conflicts: libbiojava1.6-java
-Replaces: libbiojava1.6-java
+Depends: libbiojava1.8-java, ${misc:Depends}
+Conflicts: libbiojava1.7-java
+Replaces: libbiojava1.7-java
Description: Java API to biological data and applications (default version)
BioJava is an open-source project dedicated to providing a Java framework
for processing biological data. It includes objects for manipulating
diff --git a/debian/copyright b/debian/copyright
index 44c54bf..12f1813 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -85,6 +85,7 @@ License: GPL-2+
Files: debian/*
Copyright: 2007-2010, Steffen Moeller <moeller at debian.org>
2011-2012, Andreas Tille <tille at debian.org>
+ 2012, Olivier Sallou <osalllou at debian.org>
License: LGPL-2.1+
On Debian systems, the complete text of the GNU Lesser General Public License
version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'.
diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100755
index 0000000..d56d11e
--- /dev/null
+++ b/debian/get-orig-source
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+set -e
+
+PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+VERSION=`uscan --verbose --force-download --no-symlink |
+ grep "Newest version on remote site is .* local version is .*" |
+ head -n 1 |
+ sed "s/Newest version on remote site is \([a-z0-9.]\+\),.*/\1/"`
+
+mkdir -p ../tarballs
+
+cd ../tarballs
+
+UTAR="biojava-legacy-${VERSION}-src.tar.gz"
+mv ../${UTAR} .
+tar -xzf ${UTAR}
+
+mv biojava-legacy-${VERSION}-src $PKG-${VERSION}.orig # .orig is requested by Developers Reference 3.4.4 §6.7.8.2
+
+cd $PKG-${VERSION}.orig
+ find . -name *.jar | xargs rm -f
+ # remove jar files
+cd ..
+
+BZIP2="--best" tar -cjf ${PKG}_${VERSION}.orig.tar.bz2 ${PKG}-${VERSION}.orig
+rm -rf ${PKG}-${VERSION}.orig
+
+rm ${UTAR}
+
diff --git a/debian/libbiojava-java-doc.install b/debian/libbiojava-java-doc.install
new file mode 100644
index 0000000..be84139
--- /dev/null
+++ b/debian/libbiojava-java-doc.install
@@ -0,0 +1,3 @@
+doc/biojava/* usr/share/doc/libbiojava-java/api
+
+
diff --git a/debian/libbiojava1.7-java.dirs b/debian/libbiojava-java.dirs
similarity index 100%
rename from debian/libbiojava1.7-java.dirs
rename to debian/libbiojava-java.dirs
diff --git a/debian/libbiojava-java.docs b/debian/libbiojava-java.docs
index 8f8625c..e69de29 100644
--- a/debian/libbiojava-java.docs
+++ b/debian/libbiojava-java.docs
@@ -1,4 +0,0 @@
-README
-README.biosql
-resources
-dtd
diff --git a/debian/libbiojava1.8-java.jlibs b/debian/libbiojava1.8-java.jlibs
new file mode 100644
index 0000000..3f2e72b
--- /dev/null
+++ b/debian/libbiojava1.8-java.jlibs
@@ -0,0 +1,9 @@
+dist/biojava-alignment.jar
+dist/biojava-biosql.jar
+dist/biojava-blast.jar
+dist/biojava-bytecode.jar
+dist/biojava-core.jar
+dist/biojava-das.jar
+dist/biojava-gui.jar
+dist/biojava-phylo.jar
+dist/biojava-sequencing.jar
diff --git a/debian/rules b/debian/rules
index 929f2e4..163685f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,97 +4,91 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-# include series of variables to become more version-independent
-# in this debian/rules file.
-include /usr/share/cdbs/1/rules/buildvars.mk
-
-export JAVA_HOME := $(shell /usr/sbin/update-java-alternatives -l | head -1 | cut -d' ' -f 3)
-
-# version are the first two decimals
-SOVERSION=$(shell echo $(DEB_UPSTREAM_VERSION) | cut -f1,2 -d. )
-
-build: build-stamp
-
-build-stamp:
- dh_testdir
- find . -name "*.java" -o -name ReadMe -o -name "*.fa" -o -name "*.html" | xargs -r chmod 644
- # circumvent Debian's difficulties with libjgrapht - deleting all usage of that library
- rm -rf src/org/biojavax/bio/phylo/io/nexus/ \
- src/org/biojavax/bio/phylo/DistanceBasedTreeMethod.java \
- src/org/biojavax/bio/phylo/ParsimonyTreeMethod.java
-
- # Add here commands to compile the package.
- ANT_OPTS="-Xms1024m -Xmx1024m" ant package-biojava
- #ant compile-demos
- ant javadocs-biojava
-
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- # Add here commands to clean up after the build process.
- ant clean
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_prep
- dh_installdirs
-
- cp ant-build/biojava.jar $(CURDIR)/debian/libbiojava$(SOVERSION)-java/usr/share/java/biojava$(DEB_UPSTREAM_VERSION).jar
- d=$(CURDIR)/debian/libbiojava-java-doc/usr/share/doc/libbiojava-java/api; \
- [ -d $$d ] || mkdir -p $$d ; \
- cp -r ant-build/docs/biojava/* $$d
- for i in $(CURDIR)/debian/libbiojava-java*; do \
- if [ -d "$i" ]; then \
- find $i -name ".svn" | xargs -r rm -r ; \
- fi ; \
- done
-
- ant runtests
-
-
-binary-arch:
-# We have nothing to do by default.
-
-binary-indep: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples -plibbiojava-java-demos demos/*
- #dh_installman
- dh_link -p libbiojava-java /usr/share/java/biojava$(DEB_UPSTREAM_VERSION).jar /usr/share/java/biojava.jar
- # thinking about svn snapshots
- if [ "$(SOVERSION)" != "$(DEB_UPSTREAM_VERSION)" ]; then \
- dh_link -p libbiojava$(SOVERSION)-java \
- /usr/share/java/biojava$(DEB_UPSTREAM_VERSION).jar \
- /usr/share/java/biojava$(SOVERSION).jar; \
- fi
- dh_link # use <pkg>.link files for version independant linking
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
+JAVA_HOME=/usr/lib/jvm/default-java
+
+%:
+ dh $@ --with javahelper
+
+
+override_dh_auto_configure:
+ dh_auto_configure
+ sed -e 's/BJLIB/biojava-core/g' debian/build.xml > core/build.xml
+ sed -e 's/BJLIB/biojava-bytecode/g' debian/build.xml > bytecode/build.xml
+ sed -e 's/BJLIB/biojava-alignment/g' debian/build.xml > alignment/build.xml
+ sed -e 's/BJLIB/biojava-biosql/g' debian/build.xml > biosql/build.xml
+ sed -e 's/BJLIB/biojava-blast/g' debian/build.xml > blast/build.xml
+ sed -e 's/BJLIB/biojava-das/g' debian/build.xml > das/build.xml
+ sed -e 's/BJLIB/biojava-gui/g' debian/build.xml > gui/build.xml
+ sed -e 's/BJLIB/biojava-phylo/g' debian/build.xml > phylo/build.xml
+ sed -e 's/BJLIB/biojava-sequencing/g' debian/build.xml > sequencing/build.xml
+
+override_dh_auto_build:
+ cd bytecode && ant jar
+ cd core && ant jar
+ cd alignment && ant jar
+ cd biosql && ant jar
+ cd blast && ant jar
+ cd phylo && ant jar
+ cd sequencing && ant jar
+ cd gui && ant jar
+ cd das && ant jar
+ # make doc
+ rm -rf biojavadoc
+ mkdir biojavadoc
+ cp -r bytecode/* biojavadoc/
+ cp -r core/* biojavadoc/
+ cp -r alignment/* biojavadoc/
+ cp -r biosql/* biojavadoc/
+ cp -r blast/* biojavadoc/
+ cp -r phylo/* biojavadoc/
+ cp -r sequencing/* biojavadoc/
+ cp -r gui/* biojavadoc/
+ cp -r das/* biojavadoc/
+ sed -e 's/BJLIB/biojava/g' debian/build.xml > biojavadoc/build.xml
+ cd biojavadoc && ant javadocs
+ rm -rf biojavadoc
+
+override_dh_auto_test:
+ cd bytecode && ant test
+ cd core && ant test
+ cd alignment && ant test
+ cd biosql && ant test
+ cd blast && ant test
+ cd phylo && ant test
+ cd sequencing && ant test
+ cd gui && ant test
+ cd das && ant test
+
+
+
+
+# find . -name "*.java" -o -name ReadMe -o -name "*.fa" -o -name "*.html" | xargs -r chmod 644
+# circumvent Debian's difficulties with libjgrapht - deleting all usage of that library
+# rm -rf src/org/biojavax/bio/phylo/io/nexus/ \
+# src/org/biojavax/bio/phylo/DistanceBasedTreeMethod.java \
+# src/org/biojavax/bio/phylo/ParsimonyTreeMethod.java
+
+# Add here commands to compile the package.
+# ANT_OPTS="-Xms1024m -Xmx1024m" ant package-biojava
+
+override_dh_clean:
+ dh_clean
+ rm -rf build
+ rm -rf dist
+ rm -rf javadoc
+ rm -rf test
+ rm -f alignment/build.xml
+ rm -f biosql/build.xml
+ rm -f blast/build.xml
+ rm -f bytecode/build.xml
+ rm -f core/build.xml
+ rm -f das/build.xml
+ rm -f gui/build.xml
+ rm -f phylo/build.xml
+ rm -f sequencing/build.xml
+ rm -rf biojavadoc
+
get-orig-source:
- version=$(DEB_UPSTREAM_VERSION).svn.`date +"%Y%m%d"|tr -d '\n'` ; \
- targetdir=biojava-live-$$version ; \
- origtargz=biojava-live_$$version.orig.tar.gz ; \
- cd .. ; \
- svn co svn://code.open-bio.org/biojava/biojava-live/trunk $$targetdir ; \
- find $$targetdir -name ".svn" | xargs -r rm -r ; \
- find $$targetdir -name "*.jar" | xargs -r rm ; \
- tar czf $$origtargz $$targetdir ; \
- rm -rf $$targetdir
-
-.PHONY: build clean binary-indep binary-arch binary install configure get-orig-source
+ debian/get-orig-source
+
diff --git a/debian/watch b/debian/watch
index 36e751b..3b34144 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,2 @@
version=3
-http://biojava.org/wiki/BioJava:Download http://biojava.org/download/bj.*/biojava-([0-9.]+)-all\.tar\.gz
+http://biojava.org/wiki/BioJava:Download_1.8.2 http://biojava.org/download/bj.*/biojava-legacy-(1.[0-9.]+)-src\.tar\.gz
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/biojava-live.git
More information about the debian-med-commit
mailing list