[med-svn] [picard-tools] 05/05: Rework the packaging due to the new sources layout

Vincent Danjean vdanjean at debian.org
Mon Sep 7 23:48:17 UTC 2015


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

vdanjean pushed a commit to branch master
in repository picard-tools.

commit 47ecf0065352290fa4da98dbb8684bfc38077874
Author: Vincent Danjean <vdanjean at debian.org>
Date:   Tue Sep 8 01:46:36 2015 +0200

    Rework the packaging due to the new sources layout
---
 debian/PicardCommandLine.1                        |  22 ++
 debian/bin/PicardCommandLine                      |  15 ++
 debian/bin/picard-tools                           |  79 ------
 debian/changelog                                  |   7 +
 debian/control                                    | 115 ++++++---
 debian/libpicard-java-doc.javadoc                 |   1 +
 debian/libpicard-java.classpath                   |   1 +
 debian/libpicard-java.jlibs                       |   1 +
 debian/libsam-java.install                        |   1 -
 debian/patches/00-for-upstream-fix-testsuite      |  24 ++
 debian/patches/01-build.xml                       | 298 ++++++++++++++++++----
 debian/patches/02-snappy-java-compatibility.patch |  24 --
 debian/patches/series                             |   3 +-
 debian/patches/use_libjbzip2-java                 |  47 ----
 debian/picard-tools.1                             |  58 -----
 debian/picard-tools.README.Debian                 |   8 -
 debian/picard-tools.classpath                     |   1 -
 debian/picard-tools.install                       |   4 +-
 debian/picard-tools.links                         |   2 +
 debian/picard-tools.manpages                      |   2 +-
 debian/rules                                      |  28 +-
 21 files changed, 425 insertions(+), 316 deletions(-)

diff --git a/debian/PicardCommandLine.1 b/debian/PicardCommandLine.1
new file mode 100644
index 0000000..2c1683c
--- /dev/null
+++ b/debian/PicardCommandLine.1
@@ -0,0 +1,22 @@
+.TH PicardCommandLine "1" "September 2015" "picard-tools 1.138" "User Commands"
+.SH NAME
+PicardCommandLine \- manipulate SAM and BAM files
+.SH SYNOPSIS
+\fBPicardCommandLine\fR \fICOMMAND\fR [\fIOPTION\fR]...
+.SH DESCRIPTION
+SAM (Sequence Alignment/Map) format is a generic format for storing
+large nucleotide sequence alignments.
+
+Picard Tools includes lots of utilities to manipulate SAM and BAM files.
+The whole list with a short description can be obtained by running
+\fBPicardCommandLine \-h\fR.
+
+Description of the options and parameters of all commands can be obtained
+by running \fBPicardCommandLine COMMAND \-h\fR.
+
+.SH "REPORTING BUGS"
+samtools-devel at lists.sourceforge.net
+.SH COPYRIGHT
+Copyright 2010 The Broad Institute
+.SH "SEE ALSO"
+http://broadinstitute.github.io/picard/
diff --git a/debian/bin/PicardCommandLine b/debian/bin/PicardCommandLine
new file mode 100755
index 0000000..72769ba
--- /dev/null
+++ b/debian/bin/PicardCommandLine
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -eu
+PRG="$(basename -- "$0")"
+case "$PRG" in
+picard-tools)
+	echo 1>&2 'Warning: picard-tools is deprecated and should be replaced by PicardCommandLine'
+	;;
+PicardCommandLine)
+	;;
+*)
+	set -- "$PRG" "$@"
+	;;
+esac
+
+exec java ${JAVA_OPTIONS-} -XX:MaxPermSize=256m -jar /usr/share/java/picard.jar "$@"
diff --git a/debian/bin/picard-tools b/debian/bin/picard-tools
deleted file mode 100755
index eaf192f..0000000
--- a/debian/bin/picard-tools
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-set -eu
-if [ `basename -- $0` = picard-tools ]; then
-	if [ $# = 0 ]; then
-		cat 1>&2 <<EOF
-picard-tools: missing command argument
-Try \`picard-tools --help' for more information.
-EOF
-		exit 1
-	fi
-	command=`basename -- $1`
-	shift
-else
-	command=`basename $0`
-fi
-
-case $command in
-	AddOrReplaceReadGroups)         main=net.sf.picard.sam.AddOrReplaceReadGroups;;
-	AddCommentsToBam)               main=net.sf.picard.sam.AddCommentsToBam;;
-	BamIndexStats)                  main=net.sf.picard.sam.BamIndexStats;;
-	BamToBfq)                       main=net.sf.picard.fastq.BamToBfq;;
-	BuildBamIndex)                  main=net.sf.picard.sam.BuildBamIndex;;
-	CalculateHsMetrics)             main=net.sf.picard.analysis.directed.CalculateHsMetrics;;
-	CheckIlluminaDirectory)         main=net.sf.picard.illumina.CheckIlluminaDirectory;;
-	CleanSam)                       main=net.sf.picard.sam.CleanSam;;
-	CollectAlignmentSummaryMetrics) main=net.sf.picard.analysis.CollectAlignmentSummaryMetrics;;
-	CollectGcBiasMetrics)           main=net.sf.picard.analysis.CollectGcBiasMetrics;;
-	CollectInsertSizeMetrics)       main=net.sf.picard.analysis.CollectInsertSizeMetrics;;
-	CollectMultipleMetrics)         main=net.sf.picard.analysis.CollectMultipleMetrics;;
-	CollectRnaSeqMetrics)           main=net.sf.picard.analysis.CollectRnaSeqMetrics;;
-	CollectTargetedPcrMetrics)      main=net.sf.picard.analysis.CollectTargetedPcrMetrics;;
-	CollectWgsMetrics)              main=net.sf.picard.analysis.CollectWgsMetrics;;
-	CompareSAMs)                    main=net.sf.picard.sam.CompareSAMs;;
-	CreateSequenceDictionary)       main=net.sf.picard.sam.CreateSequenceDictionary;;
-	DownsampleSam)                  main=net.sf.picard.sam.DownsampleSam;;
-	EstimateLibraryComplexity)      main=net.sf.picard.sam.EstimateLibraryComplexity;;
-	ExtractIlluminaBarcodes)        main=net.sf.picard.illumina.ExtractIlluminaBarcodes;;
-	ExtractSequences)               main=net.sf.picard.reference.ExtractSequences;;
-	FastqToSam)                     main=net.sf.picard.sam.FastqToSam;;
-	FilterSamReads)                 main=net.sf.picard.sam.FilterSamReads;;
-	FixMateInformation)             main=net.sf.picard.sam.FixMateInformation;;
-	IlluminaBasecallsToFastq)       main=net.sf.picard.illumina.IlluminaBasecallsToFastq;;
-	IlluminaBasecallsToSam)         main=net.sf.picard.illumina.IlluminaBasecallsToSam;;
-	IntervalListTools)              main=net.sf.picard.util.IntervalList;;
-	MarkDuplicates)                 main=net.sf.picard.sam.MarkDuplicates;;
-	MeanQualityByCycle)             main=net.sf.picard.analysis.MeanQualityByCycle;;
-	MergeBamAlignment)              main=net.sf.picard.sam.MergeBamAlignment;;
-	MergeSamFiles)                  main=net.sf.picard.sam.MergeSamFiles;;
-	MergeVcfs)                      main=net.sf.picard.vcf.MergeVcfs;;
-	NormalizeFasta)                 main=net.sf.picard.reference.NormalizeFasta;;
-	QualityScoreDistribution)       main=net.sf.picard.analysis.QualityScoreDistribution;;
-	ReorderSam)                     main=net.sf.picard.sam.ReorderSam;;
-	ReplaceSamHeader)               main=net.sf.picard.sam.ReplaceSamHeader;;
-	RevertSam)                      main=net.sf.picard.sam.RevertSam;;
-	SamFormatConverter)             main=net.sf.picard.sam.SamFormatConverter;;
-	SamToFastq)                     main=net.sf.picard.sam.SamToFastq;;
-	SortSam)                        main=net.sf.picard.sam.SortSam;;
-	SplitVcfs)                      main=net.sf.picard.vcf.SplitVcfs;;
-	ValidateSamFile)                main=net.sf.picard.sam.ValidateSamFile;;
-	VcfFormatConverter)             main=net.sf.picard.vcf.VcfFormatConverter;;
-	ViewSam)                        main=net.sf.picard.sam.ViewSam;;
-
-	--help)
-		cat <<EOF
-Usage: picard-tools COMMAND [OPTION]...
-See \`man picard-tools' for a list of COMMANDs.
-EOF
-		exit 0;;
-	--version)
-		cat <<EOF
-picard-tools
-Copyright 2010 The Broad Institute
-EOF
-		exit 0;;
-	*) echo 1>&2 picard-tools: unrecognized command "'$command'"; exit 1
-esac
-
-p=/usr/share/java
-exec java ${JAVA_OPTIONS-} -XX:MaxPermSize=256m -cp $p/jbzip2.jar:$p/picard.jar:$p/sam.jar:$p/cofoja.jar:$p/commons-jexl2.jar $main "$@"
diff --git a/debian/changelog b/debian/changelog
index 8bb0db2..e6e3b91 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+picard-tools (1.138+dfsg.1-1) UNRELEASED; urgency=medium
+
+  * New release from new upstream location (github). Closes: #798051
+  * Full reorganization of the packaging
+
+ -- Vincent Danjean <vdanjean at debian.org>  Sun, 06 Sep 2015 23:40:49 +0200
+
 picard-tools (1.113-2) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/control b/debian/control
index ddf3f96..8019247 100644
--- a/debian/control
+++ b/debian/control
@@ -8,54 +8,97 @@ Section: science
 Priority: optional
 Build-Depends: ant,
                default-jdk,
-               testng,
-               libsnappy-java,
                debhelper (>= 9),
-               libjbzip2-java,
-               libcofoja-java,
-               libcommons-jexl2-java,
                javahelper,
-               python
+               libhtsjdk-java,
+               libguava-java,
+               testng,
+# required for tests:
+               libjcommander-java,
+               r-base-core,
+               ant-optional,
+# required for links and dependencies in documentation:
+               default-jdk-doc,
+               libhtsjdk-java-doc,
+               libguava-java-doc,
 Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-med/picard-tools.git
 Vcs-Git: git://anonscm.debian.org/debian-med/picard-tools.git
 Homepage: http://broadinstitute.github.io/picard/
 
-Package: libsam-java
-Architecture: all
-Section: java
-Depends: ${misc:Depends}
-Suggests: picard-tools
-Description: Java library to manipulate SAM and BAM files
- SAM (Sequence Alignment/Map) format is a generic format for storing
- large nucleotide sequence alignments.
-
 Package: picard-tools
 Architecture: all
 Depends: default-jre | java6-runtime,
          ${misc:Depends},
-         libsam-java (>= ${source:Version}),
-         ${python:Depends},
-         libjbzip2-java,
-         libcofoja-java,
-         libcommons-jexl2-java
-Suggests: python,
-          r-base-core
+         libpicard-java (= ${binary:Version})
 Description: Command line tools to manipulate SAM and BAM files
  SAM (Sequence Alignment/Map) format is a generic format for storing
  large nucleotide sequence alignments. Picard Tools includes these
  utilities to manipulate SAM and BAM files:
- BamToBfq                        IlluminaBasecallsToSam
- BuildBamIndex                   MarkDuplicates
- CalculateHsMetrics              MeanQualityByCycle
- CleanSam                        MergeBamAlignment
- CollectAlignmentSummaryMetrics  MergeSamFiles
- CollectGcBiasMetrics            NormalizeFasta
- CollectInsertSizeMetrics        QualityScoreDistribution
- CollectRnaSeqMetrics            ReplaceSamHeader
- CompareSAMs                     RevertSam
- CreateSequenceDictionary        SamFormatConverter
- ExtractIlluminaBarcodes         SamToFastq
- EstimateLibraryComplexity       SortSam
- FastqToSam                      ValidateSamFile
- FixMateInformation              ViewSam
+  AddCommentsToBam                  FifoBuffer
+  AddOrReplaceReadGroups            FilterSamReads
+  BaitDesigner                      FilterVcf
+  BamIndexStats                     FixMateInformation
+  BamToBfq                          GatherBamFiles
+  BedToIntervalList                 GatherVcfs
+  BuildBamIndex                     GenotypeConcordance
+  CalculateHsMetrics                IlluminaBasecallsToFastq
+  CalculateReadGroupChecksum        IlluminaBasecallsToSam
+  CheckIlluminaDirectory            LiftOverIntervalList
+  CheckTerminatorBlock              LiftoverVcf
+  CleanSam                          MakeSitesOnlyVcf
+  CollectAlignmentSummaryMetrics    MarkDuplicates
+  CollectBaseDistributionByCycle    MarkDuplicatesWithMateCigar
+  CollectGcBiasMetrics              MarkIlluminaAdapters
+  CollectHiSeqXPfFailMetrics        MeanQualityByCycle
+  CollectIlluminaBasecallingMetrics MergeBamAlignment
+  CollectIlluminaLaneMetrics        MergeSamFiles
+  CollectInsertSizeMetrics          MergeVcfs
+  CollectJumpingLibraryMetrics      NormalizeFasta
+  CollectMultipleMetrics            PositionBasedDownsampleSam
+  CollectOxoGMetrics                QualityScoreDistribution
+  CollectQualityYieldMetrics        RenameSampleInVcf
+  CollectRawWgsMetrics              ReorderSam
+  CollectRnaSeqMetrics              ReplaceSamHeader
+  CollectRrbsMetrics                RevertOriginalBaseQualitiesAndAddMateCigar
+  CollectSequencingArtifactMetrics  RevertSam
+  CollectTargetedPcrMetrics         SamFormatConverter
+  CollectVariantCallingMetrics      SamToFastq
+  CollectWgsMetrics                 ScatterIntervalsByNs
+  CompareMetrics                    SortSam
+  CompareSAMs                       SortVcf
+  ConvertSequencingArtifactToOxoG   SplitSamByLibrary
+  CreateSequenceDictionary          SplitVcfs
+  DownsampleSam                     UpdateVcfSequenceDictionary
+  EstimateLibraryComplexity         ValidateSamFile
+  ExtractIlluminaBarcodes           VcfFormatConverter
+  ExtractSequences                  VcfToIntervalList
+  FastqToSam                        ViewSam
+
+Package: libpicard-java
+Architecture: all
+Section: java
+Depends: ${misc:Depends}, ${java:Depends}
+Recommends: ${java:Recommends}, r-base-core
+Suggests: picard-tools
+Replaces: picard-tools (<< 1.114)
+Breaks: picard-tools (<< 1.114)
+Description: Java library to manipulate SAM and BAM files
+ SAM (Sequence Alignment/Map) format is a generic format for storing
+ large nucleotide sequence alignments. This library provides classes to
+ manipulate SAM and BAM files.
+ .
+ A command line wrapper for this library is provided in the picard-tools
+ package.
+
+Package: libpicard-java-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends}, ${java:Depends}
+Recommends: ${java:Recommends}
+Description: Documentation for the java picard library
+ SAM (Sequence Alignment/Map) format is a generic format for storing
+ large nucleotide sequence alignments. The picard java library provides classes
+ to manipulate SAM and BAM files.
+ .
+ This package contains the javadoc of the picard java library.
diff --git a/debian/libpicard-java-doc.javadoc b/debian/libpicard-java-doc.javadoc
new file mode 100644
index 0000000..11bb89a
--- /dev/null
+++ b/debian/libpicard-java-doc.javadoc
@@ -0,0 +1 @@
+javadoc/picard	/usr/share/doc/libpicard-java/api/
diff --git a/debian/libpicard-java.classpath b/debian/libpicard-java.classpath
new file mode 100644
index 0000000..b901165
--- /dev/null
+++ b/debian/libpicard-java.classpath
@@ -0,0 +1 @@
+usr/share/java/picard.jar /usr/share/java/htsjdk.jar /usr/share/java/guava.jar /usr/share/java/testng.jar
diff --git a/debian/libpicard-java.jlibs b/debian/libpicard-java.jlibs
new file mode 100644
index 0000000..491cfdc
--- /dev/null
+++ b/debian/libpicard-java.jlibs
@@ -0,0 +1 @@
+dist/picard.jar
diff --git a/debian/libsam-java.install b/debian/libsam-java.install
deleted file mode 100644
index 6379168..0000000
--- a/debian/libsam-java.install
+++ /dev/null
@@ -1 +0,0 @@
-dist/sam-*.jar usr/share/java
diff --git a/debian/patches/00-for-upstream-fix-testsuite b/debian/patches/00-for-upstream-fix-testsuite
new file mode 100644
index 0000000..40ecf11
--- /dev/null
+++ b/debian/patches/00-for-upstream-fix-testsuite
@@ -0,0 +1,24 @@
+Description: Fix a bug in the testsuite
+ This patch fixes the number of arguments of the
+ testIlluminaDataProviderMissingDatas function.
+Origin: vendor
+Forwarded: no
+--- a/src/tests/java/picard/illumina/parser/IlluminaDataProviderTest.java
++++ b/src/tests/java/picard/illumina/parser/IlluminaDataProviderTest.java
+@@ -259,10 +259,12 @@ public class IlluminaDataProviderTest {
+     }
+ 
+     @Test(dataProvider = "badData", expectedExceptions = {PicardException.class, IllegalArgumentException.class})
+-    public void testIlluminaDataProviderMissingDatas(final int lane,
+-                                                     final IlluminaDataType[] actualDts,
+-                                                     final String illuminaConfigStr,
+-                                                     final File basecallsDirectory)
++    public void testIlluminaDataProviderMissingDatas(
++            final String testName, final int lane, final int size,
++            final List<Integer> tiles,
++            final IlluminaDataType[] actualDts,
++            final String illuminaConfigStr,
++            final File basecallsDirectory)
+             throws Exception {
+         final IlluminaDataProviderFactory factory = new IlluminaDataProviderFactory(basecallsDirectory, lane, new ReadStructure(illuminaConfigStr), bclQualityEvaluationStrategy, actualDts);
+         factory.makeDataProvider();
diff --git a/debian/patches/01-build.xml b/debian/patches/01-build.xml
index 9031c63..a7cc494 100644
--- a/debian/patches/01-build.xml
+++ b/debian/patches/01-build.xml
@@ -1,59 +1,259 @@
 Description: Modifies the upstream build system.
  This patch changes the path to the javac compiler, enables the use
- of the system's testng library, and adds a new target for preparing
- the sam and picard jar files and installing the extra R scripts
- from src/scripts/net/sf/picard/analysis/.
+ of the system java libraries, remove in-place htsjdk clone and compile,
+ and get htsjdk version from system jar.
 Origin: vendor
 Forwarded: no
---- a/build.xml
-+++ b/build.xml
-@@ -23,7 +23,7 @@
-   ~ THE SOFTWARE.
-   -->
- 
--<project name="picard-public" basedir="." default="all">
-+<project name="picard-public" basedir="." default="jar">
- 
-     <property name="src" value="src/java"/>
-     <property name="src.scripts" value="src/scripts"/>
-@@ -53,7 +53,7 @@
-     <property name="test.debug.port" value="5005" />  <!-- override on the command line if desired -->
- 
-     <property environment="env"/>
--    <property name="java6.home" value="${env.JAVA6_HOME}"/>
-+    <property name="java6.home" value="${env.JAVA_HOME}"/>
- 
-     <condition  property="isUnix">
-         <os family="unix"/>
-@@ -72,6 +72,11 @@
-             <fileset dir="${lib}">
-                 <include name="**/*.jar"/>
-             </fileset>
+Index: picard-tools/build.xml
+===================================================================
+--- picard-tools.orig/build.xml
++++ picard-tools/build.xml
+@@ -42,17 +42,16 @@
+     <property name="htsjdk_git_url" value="git at github.com:samtools/htsjdk.git"/>
+     <!-- TODO: get this from the build.xml in htsjdk -->
+     <property name="htsjdk-classes" value="htsjdk/classes"/>
++    <property name="htsjdk-jar" value="/usr/share/java/htsjdk.jar"/>
+ 
+     <property name="javac.target" value="1.6"/>
+     <property name="javac.debug" value="true"/>
+ 
+     <!-- Get GIT hash, if available, otherwise leave it blank.  -->
+-    <exec executable="git" outputproperty="repository.revision" failifexecutionfails="true" errorproperty="">
+-        <arg value="log"/>
+-        <arg value="-1"/>
+-        <arg value="--pretty=format:%H_%at"/>
+-    </exec>
+-    <property name="repository.revision" value=""/>
++    <!-- For Debian, do not use GIT hash (it would be the one from the
++         packaging repo), but use the "dfsg" string as sources are
++         repacked -->
++    <property name="repository.revision" value="dfsg"/>
+     <property name="picard-version" value="1.138"/>
+     <property name="command-line-html-dir" value="${dist}/html"/>
+     <property name="testng.verbosity" value="2"/>
+@@ -77,23 +76,17 @@
+     <!-- INIT -->
+     <target name="init">
+         <path id="classpath">
+-            <fileset dir="${htsjdk_lib_dir}">
+-                <include name="*.jar"/>
+-                <include name="**/*.jar"/>
+-            </fileset>
+-            <!-- for the specific HTSJDK library JARs -->
+-            <fileset dir="${htsjdk}/lib">
+-                <include name="*.jar"/>
+-                <include name="**/*.jar"/>
+-            </fileset>
+-            <fileset dir="${lib}">
+-        	    <include name="**/*.jar"/>
+-        	  </fileset>
++            <!-- for the HTSJDK library JAR -->
++            <pathelement path="/usr/share/java/htsjdk.jar"/>
++            <!-- other system required installed JARs -->
++            <pathelement path="/usr/share/java/guava.jar"/>
 +            <pathelement path="/usr/share/java/testng.jar"/>
-+            <pathelement path="/usr/share/java/snappy-java.jar"/>
-+            <pathelement path="/usr/share/java/jbzip2.jar"/>
-+            <pathelement path="/usr/share/java/cofoja.jar"/>
-+            <pathelement path="/usr/share/java/commons-jexl2.jar"/>
          </path>
-         <path  id="metrics.classpath">
+         <path id="metrics.classpath">
++            <pathelement path="/usr/share/java/htsjdk.jar"/>
++            <pathelement path="/usr/share/java/guava.jar"/>
              <pathelement path="${classpath}"/>
-@@ -205,8 +210,9 @@
-         <mkdir dir="${dist}"/>
-         <jar destfile="${dist}/picard-${picard-version}.jar" compress="no">
-             <fileset dir="${classes}" includes ="net/sf/picard/**/*.*"/>
-+            <fileset dir="${classes}" includes="org/broad/tribble/**/*.*"/>
-+            <fileset dir="${classes}" includes="org/broadinstitute/variant/**/*.*"/>
-             <fileset dir="${src.scripts}" includes="**/*.R"/>
--            <zipfileset src="${lib}/apache-ant-1.8.2-bzip2.jar"/>
-             <manifest>
-                 <attribute name="Implementation-Version" value="${picard-version}(${repository.revision})"/>
-                 <attribute name="Implementation-Vendor" value="Broad Institute"/>
-@@ -236,6 +242,8 @@
-         </copy>
+             <pathelement location="${classes}"/>
+-            <pathelement location="${htsjdk}/classes"/>
+         </path>
+ 
+     </target>
+@@ -107,23 +100,13 @@
+         <delete dir="javadoc"/>
+     </target>
+ 
+-    <target name="clean" description="Clean local build products and also nested project" depends="clean-local, clean-htsjdk"/>
++    <target name="clean" description="Clean local build products and also nested project" depends="clean-local"/>
+ 
+     <!-- HTS-JDK -->
+     <target name="set-htsjdk-version">
+         <!-- set the htsjdk version -->
+-        <ant antfile="build.xml" dir="${htsjdk}" target="write-version-property" inheritall="false"/>
+-        <loadfile property="htsjdk-version" srcFile="${htsjdk}/htsjdk.version.properties">
+-            <filterchain>
+-                <linecontains>
+-                    <contains value="htsjdk-version="/>
+-                </linecontains>
+-                <tokenfilter>
+-                    <replacestring from="htsjdk-version=" to=""/>
+-                </tokenfilter>
+-                <striplinebreaks/>
+-            </filterchain>
+-        </loadfile>
++        <loadmf jar="${htsjdk-jar}" prefix="htsjdk-mf."/>
++        <property name="htsjdk-version" value="${htsjdk-mf.Implementation-Version}"/>
+     </target>
+ 
+     <target name="clone-htsjdk" description="Clone HTS-JDK sources from Sourceforge">
+@@ -165,13 +148,13 @@
+             description="Compile files without cleaning">
+     </target>
+ 
+-    <target name="compile-src" depends="compile-htsjdk, compile-picard" description="Compile files without cleaning"/>
++    <target name="compile-src" depends="compile-picard" description="Compile files without cleaning"/>
+ 
+     <target name="compile-picard" depends="init" description="Compile picard files without cleaning">
+         <compile-src includes="picard/**/*.*" />
      </target>
  
-+<target name="jar" depends="sam-jar, picard-jar" />
+-    <target name="compile-tests" depends="compile-htsjdk-tests, compile-picard-tests" description="Compile test files without cleaning"/>
++    <target name="compile-tests" depends="compile-picard-tests" description="Compile test files without cleaning"/>
+ 
+     <target name="compile-picard-tests" depends="init" description="Compile picard test files without cleaning">
+         <compile-tests includes="picard/**/*.*"/>
+@@ -199,6 +182,7 @@
+                 <pathelement path="${classes}"/>
+                 <pathelement path="${classes.test}"/>
+                 <pathelement path="${scripts}"/>
++                <pathelement path="/usr/share/java/jcommander.jar"/>
+             </classpath>
+             <classfileset dir="${classes.test}">
+                 <include name="**/Test*.class"/>
+@@ -234,6 +218,7 @@
+                 <pathelement path="${classes}"/>
+                 <pathelement path="${classes.test}"/>
+                 <pathelement path="${scripts}"/>
++                <pathelement path="/usr/share/java/jcommander.jar"/>
+             </classpath>
+             <classfileset dir="${classes.test}">
+                 <include name="**/${name}.class"/>
+@@ -258,21 +243,17 @@
+     	</unzip>
+     </target>
+ 	
+-    <target name="picard-jar" depends="compile, process-external-jars"
++    <target name="picard-jar" depends="compile, process-external-jars, set-htsjdk-version"
+         description="Builds the main executable picard.jar">
+        <mkdir dir="${dist}"/>
+        <mkdir dir="${dist.tmp}"/>
+        <unjar dest="${dist.tmp}">
+            <fileset dir="${lib}" />
+-           <fileset dir="${htsjdk_lib_dir}">
+-               <include name="*.jar"/>
+-           </fileset>
+        </unjar>
+ 
+         <jar destfile="${dist}/picard.jar" compress="no">
+             <fileset dir="${classes}" includes="picard/**/*.*, META-INF/**/*"/>
+             <fileset dir="${src.scripts}" includes="**/*.R"/>
+-            <fileset dir="${htsjdk-classes}" includes ="${htsjdk}/*/**/*.*"/>
+             <fileset dir="${dist.tmp}" includes="**/*"/>
+ 	          <fileset dir="${jar_opt}" includes="**/*"/>
+ 
+@@ -319,43 +300,17 @@
+                 <fileset dir="${lib}">
+                     <include name="**/*.jar"/>
+                 </fileset>
+-                <fileset dir="${htsjdk}/dist">
+-                    <include name="**/*.jar"/>
+-                </fileset>
+-                <fileset dir="${htsjdk}/lib">
+-                    <include name="**/*.jar"/>
+-                </fileset>
++                <pathelement path="/usr/share/java/htsjdk.jar"/>
++                <pathelement path="/usr/share/java/guava.jar"/>
++                <pathelement path="/usr/share/java/testng.jar"/>
+             </classpath>
+-            <link href="http://java.sun.com/j2se/1.6.0/docs/api/"/>
++            <link href="/usr/share/doc/default-jdk-doc/api/"/>
++            <link href="/usr/share/doc/libhtsjdk-java/api/"/>
++            <link href="/usr/share/doc/libguava-java/api/"/>
+             <fileset dir="${src}" defaultexcludes="yes">
+                 <include name="**/*.java"/>
+             </fileset>
+         </javadoc>
+-        <javadoc
+-                destdir="javadoc/htsjdk"
+-                packagenames="htsjdk*"
+-                windowtitle="HTSJDK API Documentation"
+-                doctitle="<h1>HTSJDK API Documentation</h1>"
+-                author="true"
+-                protected="true"
+-                use="true"
+-                version="true"
+-                failonerror="true"
+-                excludepackagenames="picard*">
+-            <classpath>
+-                <pathelement location="${java.home}/../lib/tools.jar"/>
+-                <fileset dir="${lib}">
+-                    <include name="**/*.jar"/>
+-                </fileset>
+-                <fileset dir="${htsjdk}/lib">
+-                    <include name="**/*.jar"/>
+-                </fileset>
+-            </classpath>
+-            <link href="http://java.sun.com/j2se/1.6.0/docs/api/"/>
+-            <fileset dir="${htsjdk_src}" defaultexcludes="yes">
+-                <include name="**/*.java"/>
+-            </fileset>
+-        </javadoc>
+         <mkdir dir="${command-line-html-dir}"/>
+         <javadoc doclet="picard.util.MetricsDoclet"
+                  docletpathref="metrics.classpath"
+@@ -366,13 +321,12 @@
+                 <fileset dir="${lib}">
+                     <include name="**/*.jar"/>
+                 </fileset>
+-                <fileset dir="${htsjdk}/dist">
+-                    <include name="**/*.jar"/>
+-                </fileset>
++                <pathelement path="/usr/share/java/htsjdk.jar"/>
++                <pathelement path="/usr/share/java/guava.jar"/>
++                <pathelement path="/usr/share/java/testng.jar"/>
+             </classpath>
+             <fileset dir=".">
+                 <include name="${src}/**/*.java"/>
+-                <include name="${htsjdk_src}/**/*.java"/>
+             </fileset>
+             <arg line="-f ${command-line-html-dir}/picard-metric-definitions.html"/>
+         </javadoc>
+@@ -477,6 +431,9 @@
+                   failonerror="true">
+                 <classpath>
+                     <pathelement location="${dist}/picard.jar"/>
++                    <pathelement path="/usr/share/java/htsjdk.jar"/>
++                    <pathelement path="/usr/share/java/guava.jar"/>
++                    <pathelement path="/usr/share/java/testng.jar"/>
+                 </classpath>
+             </java>
+         </sequential>
+@@ -498,6 +455,9 @@
+                   failonerror="true">
+                 <classpath>
+                     <pathelement location="${dist}/picard.jar"/>
++                    <pathelement path="/usr/share/java/htsjdk.jar"/>
++                    <pathelement path="/usr/share/java/guava.jar"/>
++                    <pathelement path="/usr/share/java/testng.jar"/>
+                 </classpath>
+                 <arg value="@{main-class}"/>
+             </java>
+@@ -561,4 +521,25 @@
+             </javac>
+         </sequential>
+     </macrodef>
 +
-     <target name="javadoc" depends="init" description="Generates the project javadoc.">
-         <javadoc
-                 sourcepath="${src}"
++    <!--
++    From http://mail-archives.apache.org/mod_mbox/ant-user/200812.mbox/%3C9EE86F1965E19E499C80DE52AC807B5502A477D1@z011021.bk.fin.local%3E
++    Loads entries from a manifest file.
++    @jar     The jar from where to read
++    @prefix  A prefix to prepend
++    -->
++    <macrodef name="loadmf">
++        <attribute name="jar"/>
++        <attribute name="prefix" default=""/>
++        <sequential>
++            <loadproperties>
++                <!-- Load the manifest entries -->
++                <zipentry zipfile="@{jar}" name="META-INF/MANIFEST.MF"/>
++                <!-- Add the prefix -->
++                <filterchain>
++                    <prefixlines prefix="@{prefix}"/>
++                </filterchain>
++            </loadproperties>
++        </sequential>
++    </macrodef>
+ </project>
diff --git a/debian/patches/02-snappy-java-compatibility.patch b/debian/patches/02-snappy-java-compatibility.patch
deleted file mode 100644
index ebe08ab..0000000
--- a/debian/patches/02-snappy-java-compatibility.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Description: Fix the compatibility with the latest version of snappy-java.
- The fix is Debian specific and assumes the native library is always available
- (which is true in Debian).
-Author: Emmanuel Bourg <ebourg at apache.org>
-Forwarded: not-needed
---- a/src/java/net/sf/samtools/util/SnappyLoader.java
-+++ b/src/java/net/sf/samtools/util/SnappyLoader.java
-@@ -24,7 +24,6 @@
- package net.sf.samtools.util;
- 
- import net.sf.samtools.SAMException;
--import org.xerial.snappy.LoadSnappy;
- import org.xerial.snappy.SnappyInputStream;
- 
- import java.io.InputStream;
-@@ -83,7 +82,7 @@
-             // Don't try to call any Snappy code until classes have been found via reflection above.
-             boolean tmpSnappyAvailable;
-             try {
--                if (!LoadSnappy.load()) {
-+                if (false) {
-                     if (verbose) System.err.println("Snappy dll failed to load.");
-                     tmpSnappyAvailable = false;
-                 }
diff --git a/debian/patches/series b/debian/patches/series
index ec86589..2082a43 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
-use_libjbzip2-java
+00-for-upstream-fix-testsuite
 01-build.xml
-02-snappy-java-compatibility.patch
diff --git a/debian/patches/use_libjbzip2-java b/debian/patches/use_libjbzip2-java
deleted file mode 100644
index f8d9570..0000000
--- a/debian/patches/use_libjbzip2-java
+++ /dev/null
@@ -1,47 +0,0 @@
-Subject: use libjbzip2-java classes
-Description: Debian package for this class
- is libjbzip2-java, need to update package
- name
-Author: Olivier Sallou <osallou at debian.org>
-Last-Updated: 2012-08-31
-Forwarded: not-needed
---- a/src/java/net/sf/picard/io/IoUtil.java
-+++ b/src/java/net/sf/picard/io/IoUtil.java
-@@ -35,8 +35,8 @@
- import java.util.zip.GZIPInputStream;
- import java.util.zip.GZIPOutputStream;
- 
--import org.apache.tools.bzip2.CBZip2InputStream;
--import org.apache.tools.bzip2.CBZip2OutputStream;
-+import org.itadaki.bzip2.BZip2InputStream;
-+import org.itadaki.bzip2.BZip2OutputStream;
- 
- /**
-  * A class for utility methods that wrap or aggregate functionality in Java IO.
-@@ -235,12 +235,12 @@
- 
-         try {
-             final FileInputStream fis = new FileInputStream(file);
--            if(fis.read() != 66 || fis.read() != 90) { //Read magic number 'BZ' or else CBZip2InputStream will complain about it
-+            if(fis.read() != 66 || fis.read() != 90) { //Read magic number 'BZ' or else BZip2InputStream will complain about it
-                 fis.close();
-                 throw new PicardException(file.getAbsolutePath() + " is not a BZIP file.");
-             }
- 
--            return new CBZip2InputStream(fis);
-+            return new BZip2InputStream(fis, false);
-         }
-         catch (IOException ioe) {
-             throw new PicardException("Error opening file: " + file.getName(), ioe);
-@@ -351,9 +351,9 @@
-         try {
- 
-             final FileOutputStream fos = new FileOutputStream(file, append);
--            fos.write(66); //write magic number 'BZ' because CBZip2OutputStream does not do it for you
-+            fos.write(66); //write magic number 'BZ' because BZip2OutputStream does not do it for you
-             fos.write(90);
--            return IOUtil.maybeBufferOutputStream(new CBZip2OutputStream(fos));
-+            return IOUtil.maybeBufferOutputStream(new BZip2OutputStream(fos));
-         }
-         catch (IOException ioe) {
-             throw new PicardException("Error opening file for writing: " + file.getName(), ioe);
diff --git a/debian/picard-tools.1 b/debian/picard-tools.1
deleted file mode 100644
index 35f7995..0000000
--- a/debian/picard-tools.1
+++ /dev/null
@@ -1,58 +0,0 @@
-.TH picard-tools "1" "July 2013" "picard-tools 1.95" "User Commands"
-.SH NAME
-picard-tools \- manipulate SAM and BAM files
-.SH SYNOPSIS
-\fBpicard-tools\fR \fICOMMAND\fR [\fIOPTION\fR]...
-.SH DESCRIPTION
-SAM (Sequence Alignment/Map) format is a generic format for storing
-large nucleotide sequence alignments.
-
-Picard Tools includes these utilities to manipulate SAM and BAM files:
- AddOrReplaceReadGroups
- BamToBfq
- BamIndexStats
- BuildBamIndex
- CalculateHsMetrics
- CleanSam
- CollectAlignmentSummaryMetrics
- CollectGcBiasMetrics
- CollectInsertSizeMetrics
- CollectMultipleMetrics
- CollectTargetedPcrMetrics
- CollectRnaSeqMetrics
- CompareSAMs
- CreateSequenceDictionary
- DownsampleSam
- ExtractIlluminaBarcodes
- EstimateLibraryComplexity
- FastqToSam
- FilterSamReads
- FixMateInformation
- IlluminaBasecallsToFastq
- IlluminaBasecallsToSam
- CheckIlluminaDirectory
- IntervalListTools
- MarkDuplicates
- MeanQualityByCycle
- MergeBamAlignment
- MergeSamFiles
- MergeVcfs
- NormalizeFasta
- ExtractSequences
- QualityScoreDistribution
- ReorderSam
- ReplaceSamHeader
- RevertSam
- SamFormatConverter
- SamToFastq
- SortSam
- VcfFormatConverter
- SplitVcfs
- ValidateSamFile
- ViewSam
-.SH "REPORTING BUGS"
-samtools-devel at lists.sourceforge.net
-.SH COPYRIGHT
-Copyright 2010 The Broad Institute
-.SH "SEE ALSO"
-http://picard.sourceforge.net/
diff --git a/debian/picard-tools.README.Debian b/debian/picard-tools.README.Debian
deleted file mode 100644
index 4bf8cf0..0000000
--- a/debian/picard-tools.README.Debian
+++ /dev/null
@@ -1,8 +0,0 @@
-The Python script ‘explain_sam_flags.py’ is distributed in
-‘/usr/share/picard-tools/’ as a convenience for the users, but
-the package does not depend on it. You can install the default
-Python version in Debian with the following command:
-
-apt-get install python
-
- -- Charles Plessy <plessy at debian.org>  Tue, 06 Jul 2010 16:29:56 +0900
diff --git a/debian/picard-tools.classpath b/debian/picard-tools.classpath
deleted file mode 100644
index 947e7e2..0000000
--- a/debian/picard-tools.classpath
+++ /dev/null
@@ -1 +0,0 @@
-usr/share/java/picard.jar /usr/share/java/commons-jexl2.jar /usr/share/java/cofoja.jar /usr/share/java/jbzip2.jar /usr/share/java/sam.jar
diff --git a/debian/picard-tools.install b/debian/picard-tools.install
index 66e8bf9..e08bd7b 100644
--- a/debian/picard-tools.install
+++ b/debian/picard-tools.install
@@ -1,3 +1 @@
-debian/bin/picard-tools usr/bin
-dist/picard-*.jar usr/share/java
-src/scripts/explain_sam_flags.py usr/share/picard-tools
+debian/bin/PicardCommandLine usr/bin
diff --git a/debian/picard-tools.links b/debian/picard-tools.links
new file mode 100644
index 0000000..2ea5a5e
--- /dev/null
+++ b/debian/picard-tools.links
@@ -0,0 +1,2 @@
+usr/bin/PicardCommandLine usr/bin/picard-tools
+usr/share/man/man1/PicardCommandLine.1 usr/share/man/man1/picard-tools.1
diff --git a/debian/picard-tools.manpages b/debian/picard-tools.manpages
index 7ea7892..6eedbe1 100644
--- a/debian/picard-tools.manpages
+++ b/debian/picard-tools.manpages
@@ -1 +1 @@
-debian/picard-tools.1
+debian/PicardCommandLine.1
diff --git a/debian/rules b/debian/rules
index e3b7747..42536d8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,20 +1,34 @@
 #!/usr/bin/make -f
 
+export DH_VERBOSE=1
 export DH_OPTIONS
 
 export ANT_HOME=/usr/share/ant
 export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
 
 %:
-	dh  $@ --with javahelper,python2
-
-override_dh_auto_build:
-	dh_auto_build -- -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5
+	dh  $@ --with javahelper
 
 override_dh_auto_configure:
 	[ -d lib ] || mkdir lib # This empty directory is lost in the packages's Git clone.
 	dh_auto_configure
 
-override_dh_link:
-	dh_link	-p libsam-java usr/share/java/sam-$(SRC_VERSION).jar usr/share/java/sam.jar
-	dh_link	-p picard-tools usr/share/java/picard-$(SRC_VERSION).jar usr/share/java/picard.jar
+override_dh_auto_build:
+	dh_auto_build -- \
+		-Dant.build.javac.source=1.5 \
+		-Dant.build.javac.target=1.5 \
+		-Djavac.target=1.5 \
+		-Ddebug=true \
+		picard-jar javadoc
+
+override_dh_auto_test:
+	dh_auto_build -- \
+		-Dant.build.javac.source=1.5 \
+		-Dant.build.javac.target=1.5 \
+		-Djavac.target=1.5 \
+		-Ddebug=true \
+		test
+
+override_jh_installlibs:
+	jh_installlibs --version-strip='[+]dfsg\.[0-9]*'
+

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



More information about the debian-med-commit mailing list