[med-svn] [libgoby-java] 03/10: Poke bit around with build system with not much success

Andreas Tille tille at debian.org
Mon Dec 25 13:26:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository libgoby-java.

commit 6102b20716ce256f8feb5c57070803247d0a1006
Author: Andreas Tille <tille at debian.org>
Date:   Tue Dec 18 22:18:34 2012 +0000

    Poke bit around with build system with not much success
---
 debian/buildsupport/README               |   6 ++
 debian/buildsupport/build.xml            |  66 +++++++++++++
 debian/buildsupport/gitant/git-tasks.xml | 160 +++++++++++++++++++++++++++++++
 debian/changelog                         |   2 +-
 debian/control                           |  10 +-
 debian/rules                             |  18 +++-
 6 files changed, 255 insertions(+), 7 deletions(-)

diff --git a/debian/buildsupport/README b/debian/buildsupport/README
new file mode 100644
index 0000000..924a309
--- /dev/null
+++ b/debian/buildsupport/README
@@ -0,0 +1,6 @@
+The content of this directory is somehow missing in Git.
+However, the files were included inside the zip file
+   http://chagall.med.cornell.edu/goby/releases/archive/release-goby_2.1.1/goby_2.1.1-src.zip
+and copied here for convenience.
+
+In the rules file we care for linking to the files if needed
diff --git a/debian/buildsupport/build.xml b/debian/buildsupport/build.xml
new file mode 100644
index 0000000..f6bed18
--- /dev/null
+++ b/debian/buildsupport/build.xml
@@ -0,0 +1,66 @@
+<project name="buildsupport" basedir="..">
+    <dirname property="buildsupport.basedir" file="${ant.file.buildsupport}"/>
+    <property name="build.basedir" location="${buildsupport.basedir}/.."/>
+
+    <tstamp>
+        <!-- current time for buildstamp purposes -->
+        <format property="buildstamp" pattern="yyyyMMddHHmmss"/>
+    </tstamp>
+    <tstamp>
+        <format property="year" pattern="yyyy"/>
+    </tstamp>
+
+    <property environment="env"/>
+    <property name="classes" location="${build.basedir}/classes"/>
+    <property name="lib" location="${build.basedir}/lib"/>
+    <property name="src" location="${build.basedir}/src"/>
+    <property name="javadocs" location="${build.basedir}/javadocs"/>
+    <property name="logs" location="${build.basedir}/logs"/>
+    <property name="config" location="${build.basedir}/config"/>
+
+    <taskdef resource="net/sf/antcontrib/antlib.xml" onerror="fail">
+        <classpath>
+            <pathelement location="${buildsupport.basedir}/ant-contrib/ant-contrib.jar"/>
+        </classpath>
+    </taskdef>
+    <import file="gitant/git-tasks.xml"/>
+    <path id="maven-ant-tasks.classpath" path="${buildsupport.basedir}/maven-ant/maven-ant-tasks-2.1.3.jar"/>
+    <!-- Maven ant support -->
+    <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
+             uri="antlib:org.apache.maven.artifact.ant"
+             classpathref="maven-ant-tasks.classpath"/>
+
+    <osfamily property="osfamily"/>
+
+    <property name="svnant-lib" location="${buildsupport.basedir}/svnant"/>
+    <property name="svnhost" value="pbtech-vc.med.cornell.edu"/>
+
+    <path id="svnant.classpath">
+        <fileset dir="${svnant-lib}">
+            <include name="*.jar"/>
+        </fileset>
+    </path>
+    <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath"/>
+
+    <target name="init">
+        <tstamp/>
+        <mkdir dir="${classes}"/>
+        <!--  Create the logs directory -->
+        <mkdir dir="${logs}"/>
+    </target>
+
+    <target name="clean">
+        <delete dir="${classes}"/>
+        <delete dir="${logs}"/>
+        <delete dir="${javadocs}"/>
+    </target>
+
+    <macrodef name="writeln" description="Write message to file and append a line ending character">
+        <attribute name="file" description="File to write to"/>
+        <attribute name="message" description="The line to write"/>
+        <attribute name="append" default="true" description="Whether or not to append to an existing file"/>
+        <sequential>
+            <echo file="@{file}" append="@{append}" message="@{message}${line.separator}"/>
+        </sequential>
+    </macrodef>
+</project>
diff --git a/debian/buildsupport/gitant/git-tasks.xml b/debian/buildsupport/gitant/git-tasks.xml
new file mode 100644
index 0000000..a963d3b
--- /dev/null
+++ b/debian/buildsupport/gitant/git-tasks.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0"?>
+<!-- ======================================================================
+     ANT Macrodef Build Script
+
+     - Runs various GitHub tasks
+
+     Author: Newtriks <simon at newtriks.com>
+     Date: 6th March 2010
+
+     This script is based on code written by:
+     
+     Mark Lowe <melowe at gmail.com>
+	 Tom Robinson <http://tlrobinson.net>
+	 
+	 Scripts ripped from:
+		
+	 <http://tlrobinson.net/blog/2008/11/13/ant-tasks-for-git/>
+	 and Comment by Timo on the above URL
+     
+	====================================================================== -->
+<project>
+	<!-- = = = = = = = = = = = = = = = = =
+	     macrodef: git
+	     = = = = = = = = = = = = = = = = = -->
+	<macrodef name="git">
+		<attribute name = "command" />
+		<attribute name = "dir" default = "" />
+		<element name = "args" optional = "true" />
+		<sequential>
+				<echo file="GIT_COMMAND_LOG" message="git @{command} &#xa;"
+					append="yes" />
+				<exec executable = "git" dir = "@{dir}" logerror="true" >
+					<arg value = "@{command}" />
+					<args/>
+				</exec>
+		</sequential>
+	</macrodef>
+
+	<macrodef name = "git-init">
+		<attribute name = "repository" />
+		<sequential>
+			<git command = "init">
+				<args>
+					<arg value = "@{repository}" />
+				</args>
+			</git>
+		</sequential>
+	</macrodef>
+    <macrodef name = "git-export">
+            <attribute name = "revision" />
+            <attribute name = "destinationDirectory" />
+            <sequential>
+              <exec executable = "${buildsupport.basedir}/gitant/git-export.sh"  logerror="true" >
+					<arg value = "@{revision}" />
+					<arg value = "@{destinationDirectory}" />
+				</exec>
+            </sequential>
+        </macrodef>
+
+	<macrodef name = "git-add">
+		<attribute name = "path" />
+		<attribute name = "target" />
+		<sequential>
+			<git command = "add" dir="@{path}">
+				<args>
+					<arg value = "@{target}" /> 
+				</args>
+			</git>
+		</sequential>
+	</macrodef>
+
+	<macrodef name = "git-commit">
+		<attribute name = "path" />
+		<attribute name = "message" />
+		<sequential>
+			<git command="commit" dir="@{path}">
+				<args>
+					<arg value= "@{message}" />
+				</args>
+			</git>
+		</sequential>
+	</macrodef>
+
+	<macrodef name = "git-clone-pull">
+		<attribute name = "repository" />
+		<attribute name = "dest" />
+		<sequential>
+			<git command = "clone">
+				<args>
+					<arg value = "@{repository}" />
+					<arg value = "@{dest}" />
+				</args>
+			</git>
+			<git command = "pull" dir = "@{dest}" />
+		</sequential>
+	</macrodef>
+
+	<macrodef name = "git-remote-add">
+		<attribute name = "path" />
+		<attribute name = "branch" />
+		<attribute name = "repository" />
+		<sequential>
+			<echo file="DUMP" message="branch: @{branch} repos: @{repository}"/>
+			<git command = "remote"  dir="@{path}">
+				<args>
+					<arg value = "add" />
+					<arg value = "@{branch}" />
+					<arg value = "@{repository}" />
+				</args>
+			</git>
+		</sequential>
+	</macrodef>
+
+	<macrodef name = "git-push">
+		<attribute name = "path" />
+		<attribute name = "branch" />
+		<attribute name = "head" />
+		<sequential>
+			<git command = "push" dir="@{path}">
+				<args>
+					<arg value = "@{branch}" />
+					<arg value = "@{head}" />
+				</args>
+			</git>
+		</sequential>
+	</macrodef>
+
+	<macrodef name="test">
+		<attribute name = "path" default="hello" />
+		<sequential>
+			<fail message="fail">
+				<condition>
+					<not>
+						<contains string="@{path}" substring="hello" />
+					</not>
+				</condition>
+			</fail>
+		</sequential>
+	</macrodef>
+
+	<macrodef name="git-revision">
+		<attribute name="path" />
+		<attribute name="output" />
+		<sequential>
+			<exec executable="git" outputproperty="head" dir = "@{path}">
+				<arg value="rev-parse" />
+				<arg value="HEAD" />
+			</exec>
+			<echo file="GIT_REVISION_LOG" message="Found revision: ${head}"/>
+			<exec executable="git" outputproperty="dirty">
+				<arg value="diff" />
+				<arg value="--shortstatt" />
+			</exec>
+			<condition property="@{output}" value="${head}" else="${head} (dirty)">
+				<equals arg1="${dirty}" arg2="" />
+			</condition>
+		</sequential>
+	</macrodef>
+
+</project>
diff --git a/debian/changelog b/debian/changelog
index 3bdb978..9d4ffdb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-goby-framework (2.1.1-1) UNRELEASED; urgency=low
+goby-framework (2.1.1+dfsg-1) UNRELEASED; urgency=low
 
   * Initial release (Closes: #<bug>)
 
diff --git a/debian/control b/debian/control
index 72e7ea6..3bb04c2 100644
--- a/debian/control
+++ b/debian/control
@@ -3,15 +3,19 @@ Section: science
 Priority: optional
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Uploaders: Andreas Tille <tille at debian.org>
-Build-Depends: debhelper (>= 9)
+Build-Depends: debhelper (>= 9), javahelper (>=0.25), default-jdk, ant, ant-contrib,
+ libjbzip2-java, libcommons-collections3-java, libcommons-configuration-java,
+ libcommons-exec-java, libcommons-io-java, libcommons-lang-java, libcommons-logging-java,
+ libcommons-math-java, liblog4j1.2-java
 Standards-Version: 3.9.4
-Homepage: <homepage>
+Homepage: http://campagnelab.org/software/goby/
 Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/goby-framework/trunk/
 Vcs-Svn: svn://svn.debian.org/debian-med/trunk/packages/goby-framework/trunk/
 
 Package: libgoby-java
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${java:Depends}
+Recommends: ${java:Recommends}
 Description: store next-generation sequencing data and intermediary analysis results
  Goby is a next-gen data management framework designed to facilitate the
  implementation of efficient data analysis pipelines.
diff --git a/debian/rules b/debian/rules
index 955b149..5436e4b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,7 +3,19 @@
 # DH_VERBOSE := 1
 
 %:
-	dh $@
+	dh $@ --with javahelper
+
+override_dh_auto_clean:
+	rm -rf buildsupport/*
+	ln -s ../debian/buildsupport/build.xml buildsupport/build.xml
+	ln -s ../debian/buildsupport/gitant buildsupport/gitant
+	dh_auto_clean
+	rm -rf buildsupport/*
+
+override_dh_auto_configure:
+	dh_auto_configure
+	ln -s ../debian/buildsupport/build.xml buildsupport/build.xml
+	ln -s ../debian/buildsupport/gitant buildsupport/gitant
 
 # Remark: The following uscan command requires devscripts > 2.12.4 which is not
 #         yet released at the time of this package release.  The code can be obtained
@@ -11,5 +23,5 @@
 #   git clone git://tille@git.debian.org/git/users/tille/devscripts.git
 #         and then use scripts/uscan.pl
 get-orig-source:
-        mkdir -p ../tarballs
-        uscan --verbose --force-download --repack-compression xz --destdir ../tarballs
+	mkdir -p ../tarballs
+	uscan --verbose --force-download --repack-compression xz --destdir ../tarballs

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libgoby-java.git



More information about the debian-med-commit mailing list