[pkg-java] r7029 - in trunk/tika: . debian

janpascal-guest at alioth.debian.org janpascal-guest at alioth.debian.org
Sat Sep 20 22:05:41 UTC 2008


Author: janpascal-guest
Date: 2008-09-20 22:05:40 +0000 (Sat, 20 Sep 2008)
New Revision: 7029

Added:
   trunk/tika/debian/
   trunk/tika/debian/build.xml
   trunk/tika/debian/changelog
   trunk/tika/debian/compat
   trunk/tika/debian/control
   trunk/tika/debian/copyright
   trunk/tika/debian/get-orig-source
   trunk/tika/debian/rules
Log:
Initial upload of tika packaging

Added: trunk/tika/debian/build.xml
===================================================================
--- trunk/tika/debian/build.xml	                        (rev 0)
+++ trunk/tika/debian/build.xml	2008-09-20 22:05:40 UTC (rev 7029)
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project default="jar" name="tika" basedir="..">
+  <property name="defaulttargetdir" value="target">
+  </property>
+  <property name="libdir" value="/usr/share/java">
+  </property>
+  <property name="classesdir" value="target/classes">
+  </property>
+  <property name="testclassesdir" value="target/test-classes">
+  </property>
+  <property name="testclassesdir" value="target/test-classes">
+  </property>
+  <property name="testreportdir" value="target/test-reports">
+  </property>
+  <property name="distdir" value="dist">
+  </property>
+  <property name="javadocdir" value="dist/docs/api">
+  </property>
+  <property name="final.name" value="tika-0.2-SNAPSHOT">
+  </property>
+  <target name="init" description="o Initializes some properties">
+    <condition property="noget">
+      <equals arg2="only" arg1="${build.sysclasspath}">
+      </equals>
+    </condition>
+    <!--Test if JUNIT is present in ANT classpath-->
+
+    <available property="Junit.present" classname="junit.framework.Test">
+    </available>
+  </target>
+  <target name="compile" description="o Compile the code">
+    <mkdir dir="${classesdir}">
+    </mkdir>
+    <javac destdir="${classesdir}" deprecation="true" debug="true"
+    optimize="true" excludes="**/package.html" source="1.5" target="1.5">
+      <src>
+        <pathelement location="src/main/java">
+        </pathelement>
+      </src>
+    </javac>
+    <mkdir dir="${classesdir}/META-INF">
+    </mkdir>
+    <copy todir="${classesdir}/META-INF">
+      <fileset dir=".">
+        <include name="NOTICE.txt">
+        </include>
+      </fileset>
+    </copy>
+    <copy todir="${classesdir}/org/apache/tika">
+         <fileset dir="src/main/resources">
+           <include name="**/*"/>
+         </fileset>
+    </copy>
+  </target>
+  <target name="jar" description="o Create the jar" depends="compile,test">
+    <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
+    </jar>
+  </target>
+  <target name="clean" description="o Clean up the generated directories">
+    <delete dir="${defaulttargetdir}">
+    </delete>
+    <delete dir="${distdir}">
+    </delete>
+  </target>
+  <target name="dist" description="o Create a distribution" depends="jar, javadoc">
+    <mkdir dir="dist">
+    </mkdir>
+    <copy todir="dist">
+      <fileset dir="${defaulttargetdir}" includes="*.jar">
+      </fileset>
+      <fileset dir="${basedir}" includes="LICENSE*, README*">
+      </fileset>
+    </copy>
+  </target>
+  <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
+    <fail message="There were test failures.">
+    </fail>
+  </target>
+  <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
+    <mkdir dir="${testreportdir}">
+    </mkdir>
+    <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
+      <sysproperty key="basedir" value="${basedir}"/>
+      <formatter type="xml">
+      </formatter>
+      <formatter usefile="false" type="plain">
+      </formatter>
+      <classpath>
+        <pathelement path="${testclassesdir}">
+        </pathelement>
+        <pathelement path="${classesdir}">
+        </pathelement>
+        <pathelement path="src/test/resources"/>
+        <pathelement path="${libdir}/asm3.jar"/>
+        <pathelement path="${libdir}/commons-codec.jar"/>
+        <pathelement path="${libdir}/commons-io.jar"/>
+        <pathelement path="${libdir}/commons-lang.jar"/>
+        <pathelement path="${libdir}/commons-logging.jar"/>
+        <pathelement path="${libdir}/jakarta-poi.jar"/>
+        <pathelement path="${libdir}/jakarta-poi-scratchpad.jar"/>
+        <pathelement path="${libdir}/icu4j.jar"/>
+        <pathelement path="${libdir}/log4j-1.2.jar"/>
+        <pathelement path="${libdir}/nekohtml.jar"/>
+        <pathelement path="${libdir}/pdfbox.jar"/>
+        <pathelement path="${libdir}/xercesImpl.jar"/>
+      </classpath>
+      <batchtest todir="${testreportdir}">
+        <fileset dir="src/test/java">
+          <include name="**/*Test.java">
+          </include>
+        </fileset>
+      </batchtest>
+    </junit>
+  </target>
+  <target name="junit-present" unless="Junit.present" depends="init">
+    <echo>================================= WARNING ================================</echo>
+    <echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
+    <echo>==========================================================================</echo>
+  </target>
+  <target name="compile-tests" if="Junit.present" depends="junit-present,compile">
+    <mkdir dir="${testclassesdir}">
+    </mkdir>
+    <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+      <src>
+        <pathelement location="src/test/java">
+        </pathelement>
+      </src>
+      <classpath>
+        <pathelement path="${classesdir}">
+        </pathelement>
+      </classpath>
+    </javac>
+  </target>
+  <target name="javadoc" description="o Generate javadoc">
+    <mkdir dir="${javadocdir}">
+    </mkdir>
+    <tstamp>
+      <format pattern="2005-yyyy" property="year">
+      </format>
+    </tstamp>
+    <property name="copyright" value="Copyright &amp;copy;  The Apache Software Foundation. All Rights Reserved.">
+    </property>
+    <property name="title" value="TIKA 0.2-SNAPSHOT API">
+    </property>
+    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/main/java" packagenames="org.apache.tika.*">
+      <classpath>
+      </classpath>
+    </javadoc>
+  </target>
+</project>

Added: trunk/tika/debian/changelog
===================================================================
--- trunk/tika/debian/changelog	                        (rev 0)
+++ trunk/tika/debian/changelog	2008-09-20 22:05:40 UTC (rev 7029)
@@ -0,0 +1,5 @@
+tika (0.2-SNAPSHOT+svn694330-1) UNRELEASED; urgency=low
+
+  * Initial release (Closes: #499606).
+
+ -- Jan-Pascal van Best <janpascal at vanbest.org>  Sat, 20 Sep 2008 13:59:35 +0200

Added: trunk/tika/debian/compat
===================================================================
--- trunk/tika/debian/compat	                        (rev 0)
+++ trunk/tika/debian/compat	2008-09-20 22:05:40 UTC (rev 7029)
@@ -0,0 +1 @@
+5

Added: trunk/tika/debian/control
===================================================================
--- trunk/tika/debian/control	                        (rev 0)
+++ trunk/tika/debian/control	2008-09-20 22:05:40 UTC (rev 7029)
@@ -0,0 +1,51 @@
+Source: tika
+Section: libs
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
+Uploaders: Jan-Pascal van Best <janpascal at vanbest.org>
+DM-Upload-Allowed: yes
+Build-Depends: debhelper (>= 5.0.0), cdbs (>=0.4.48),
+ openjdk-6-jdk, ant-optional (>= 1.6.5), junit (>= 3.8.1),
+ libasm3-java,
+ libcommons-codec-java,
+ libcommons-io-java,
+ libcommons-lang-java,
+ libcommons-logging-java,
+ libicu4j-java,
+ libjakarta-poi-java,
+ liblog4j1.2-java,
+ libnekohtml-java,
+ libpdfbox-java,
+ libxerces2-java
+Standards-Version: 3.8.0
+Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/tika
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/tika
+Homepage: http://incubator.apache.org/tika/
+
+Package: libtika-java
+Architecture: all
+Depends: openjdk-6-jre | java2-runtime,
+ libasm3-java,
+ libcommons-codec-java,
+ libcommons-io-java,
+ libcommons-lang-java,
+ libcommons-logging-java,
+ libicu4j-java,
+ libjakarta-poi-java,
+ liblog4j1.2-java,
+ libnekohtml-java,
+ libpdfbox-java,
+ libxerces2-java
+Suggests: java-virtual-machine
+Description: a Java library for extracting textual information from various documents
+ libtika-java is NOT the Apache Commons library for working with csv (comma
+ separated value) files. FIXME
+
+Package: libtika-java-doc
+Section: doc
+Architecture: all
+Description: API documentation for libtika-java
+ libtika-java is NOT the Apache library for  
+ FIXME
+ .
+ This package contains the API documentation for libtika-java.

Added: trunk/tika/debian/copyright
===================================================================
--- trunk/tika/debian/copyright	                        (rev 0)
+++ trunk/tika/debian/copyright	2008-09-20 22:05:40 UTC (rev 7029)
@@ -0,0 +1,29 @@
+This package was debianized by Jan-Pascal van Best <janpascal at vanbest.org> on
+Fri Sep 19 14:07:08 CEST 2008
+
+It was downloaded using subversion from the Subversion repository at
+http://svn.apache.org/repos/asf/incubator/tika/trunk
+
+Use 
+  debian/rules get-orig-source 
+to download the source from this location and re-create the .orig.tar.gz.
+
+Copyright Holder: Copyright 2007-2008 The Apache Software Foundation
+
+Authors:
+      Rida Benjelloun <eridabenjelloun at apache.org>
+      Keith Bennett <kbennett at apache.org>
+      Doug Cutting <cutting at apache.org>
+      Bertrand Delacretaz <bdelacretaz at apache.org>
+      Mark Harwood <mharwood at apache.org>
+      Chris A. Mattmann <mattmann at apache.org>
+      Sami Siren <siren at apache.org>
+      Jukka Zitting <jukka at apache.org>
+
+Apache Tika is licensed under the Apache License, version 2.0. On Debian
+systems, the complete text of the Apache License, version 2.0, can
+be found in `/usr/share/common-licenses/Apache-2.0'.
+
+The Debian packaging (the files under debian/) is
+Copyright 2008 Jan-Pascal van Best <janpascal at vanbest.org>. It is
+also licensed under the terms of the Apache License, version 2.0.

Added: trunk/tika/debian/get-orig-source
===================================================================
--- trunk/tika/debian/get-orig-source	                        (rev 0)
+++ trunk/tika/debian/get-orig-source	2008-09-20 22:05:40 UTC (rev 7029)
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Retrieves the svn revision indicated in the Debian changelog from the Apache
+# subversion repository and builds the .orig.tar.gz file.
+
+REVISION=`dpkg-parsechangelog | grep "^Version:" | grep -o "+svn[0-9]\+" | grep -o "[0-9]\+"`
+BASEURL="http://svn.apache.org/repos/asf/incubator/tika/trunk"
+
+TEMPDIR=`mktemp -d`
+DESTDIR=$PWD/..
+
+cd $TEMPDIR
+echo "Checking out revision $REVISION from $BASEURL to $TEMPDIR"
+svn co -q -r $REVISION "$BASEURL" 
+
+cd trunk
+REVISION=`svn info | grep "^Revision:" | grep -o "[0-9]\+"`
+DESTFILE="${DESTDIR}/tika_0.2~SNAPSHOT+svn${REVISION}.orig.tar.gz"
+
+echo "Creating $DESTFILE"
+tar czf "$DESTFILE" --exclude=".svn" .
+
+echo "Cleaning up $TEMPDIR"
+rm -rf "$TEMPDIR"
+
+LATEST_UPSTREAM_REVISION=`svn info -R $BASEURL | grep -i "last changed rev:" | grep -o "[0-9]\+" | sort -n | tail -n 1`
+echo "Using revision $REVISION; Latest revision in upstream repository: $LATEST_UPSTREAM_REVISION"


Property changes on: trunk/tika/debian/get-orig-source
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/tika/debian/rules
===================================================================
--- trunk/tika/debian/rules	                        (rev 0)
+++ trunk/tika/debian/rules	2008-09-20 22:05:40 UTC (rev 7029)
@@ -0,0 +1,49 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/ant.mk
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# Use OpenJDK
+JAVA_HOME = /usr/lib/jvm/java-6-openjdk
+
+DEB_ANT_BUILD_TARGET = init compile jar javadoc
+DEB_ANT_BUILDFILE = debian/build.xml
+
+# Needed for running the unit tests
+DEB_JARS = ant-junit junit \
+	/usr/share/java/commons-codec.jar /usr/share/java/commons-lang.jar /usr/share/java/commons-logging.jar \
+	/usr/share/java/log4j-1.2.jar /usr/share/java/pdfbox.jar /usr/share/java/commons-io.jar \
+	/usr/share/java/asm3.jar /usr/share/java/jakarta-poi.jar /usr/share/java/jakarta-poi-scratchpad.jar \
+	/usr/share/java/icu4j.jar /usr/share/java/nekohtml.jar /usr/share/java/xercesImpl.jar
+
+# Upstream version information
+UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | grep -o "^.*svn[0-9]\+")
+UPSTREAM_RELEASE := $(shell echo $(UPSTREAM_VERSION) | grep -o "^[^+]\+")
+UPSTREAM_BASENAME = $(DEB_SOURCE_PACKAGE)-$(UPSTREAM_RELEASE)
+
+install/libtika-java::
+	install -m 0644 -D target/$(UPSTREAM_BASENAME).jar $(CURDIR)/debian/libtika-java/usr/share/java/tika-$(UPSTREAM_VERSION).jar
+	dh_link /usr/share/java/tika-$(UPSTREAM_VERSION).jar /usr/share/java/tika.jar
+
+install/libtika-java-doc::
+	install -d $(CURDIR)/debian/libtika-java-doc/usr/share/doc/libtika-java-doc
+	cp -r dist/docs/api $(CURDIR)/debian/libtika-java-doc/usr/share/doc/libtika-java-doc/
+
+remove-source:
+	rm -f *.txt pom.xml KEYS
+	rm -rf debian/patched
+	rm -rf src target dist
+
+restore-from-source: remove-source
+	echo $(DEB_VERSION)
+	tar xzf ../tika_$(UPSTREAM_VERSION).orig.tar.gz
+
+get-orig-source:
+	debian/get-orig-source
+
+upload:
+	cd .. ; dupload -t mentors tika_$(DEB_VERSION)_$(DEB_HOST_ARCH).changes


Property changes on: trunk/tika/debian/rules
___________________________________________________________________
Name: svn:executable
   + *




More information about the pkg-java-commits mailing list