[pkg-java] r3020 - in trunk/javacc/debian: . patches

Paul Cager paulcager-guest at alioth.debian.org
Wed Feb 28 23:10:41 CET 2007


Author: paulcager-guest
Date: 2007-03-01 00:10:41 +0100 (Thu, 01 Mar 2007)
New Revision: 3020

Added:
   trunk/javacc/debian/patches/
   trunk/javacc/debian/patches/00list
   trunk/javacc/debian/patches/executables.dpatch
   trunk/javacc/debian/patches/javacctarget.dpatch
Modified:
   trunk/javacc/debian/changelog
   trunk/javacc/debian/control
   trunk/javacc/debian/rules
Log:
Converted to use dpatch

Modified: trunk/javacc/debian/changelog
===================================================================
--- trunk/javacc/debian/changelog	2007-02-27 11:33:02 UTC (rev 3019)
+++ trunk/javacc/debian/changelog	2007-02-28 23:10:41 UTC (rev 3020)
@@ -11,6 +11,7 @@
   * Created watch file
   * Split into separate "-doc" binary package
   * Added a doc-base
+  * Converted diff.gz patches into dpatch format
 
  -- Paul Cager <paul-debian at home.paulcager.org>  Wed,  7 Feb 2007 11:34:45 +0000
 

Modified: trunk/javacc/debian/control
===================================================================
--- trunk/javacc/debian/control	2007-02-27 11:33:02 UTC (rev 3019)
+++ trunk/javacc/debian/control	2007-02-28 23:10:41 UTC (rev 3020)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Nicolas Sabouret <nico at debian.org>, Paul Cager <paul-debian at home.paulcager.org>
-Build-Depends: debhelper (>= 5), ant
+Build-Depends: debhelper (>= 5), ant, dpatch (>= 2.0)
 Build-Depends-Indep: java-gcj-compat-dev (>= 1.0.65), libxerces2-java, docbook-to-man
 Standards-Version: 3.7.2
 

Added: trunk/javacc/debian/patches/00list
===================================================================
--- trunk/javacc/debian/patches/00list	2007-02-27 11:33:02 UTC (rev 3019)
+++ trunk/javacc/debian/patches/00list	2007-02-28 23:10:41 UTC (rev 3020)
@@ -0,0 +1,2 @@
+executables.dpatch
+javacctarget.dpatch

Added: trunk/javacc/debian/patches/executables.dpatch
===================================================================
--- trunk/javacc/debian/patches/executables.dpatch	2007-02-27 11:33:02 UTC (rev 3019)
+++ trunk/javacc/debian/patches/executables.dpatch	2007-02-28 23:10:41 UTC (rev 3020)
@@ -0,0 +1,48 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## executables.dpatch by Paul Cager <paul-debian at home.paulcager.org>
+##
+## DP: Change executables to look for Jar in /usr/share/java
+
+ at DPATCH@
+diff -urNad javacc_4.0+cvs20070207~/bin/javacc javacc_4.0+cvs20070207/bin/javacc
+--- javacc_4.0+cvs20070207~/bin/javacc	2005-04-30 08:08:06.000000000 +0100
++++ javacc_4.0+cvs20070207/bin/javacc	2007-02-28 22:36:33.000000000 +0000
+@@ -1,9 +1,5 @@
+ #!/bin/sh
+-JAR="`dirname $0`/lib/javacc.jar"
+-
+-case "`uname`" in
+-     CYGWIN*) JAR="`cygpath --windows -- "$JAR"`" ;;
+-esac
++JAR=/usr/share/java/javacc.jar
+ 
+ java -classpath "$JAR" javacc "$@"
+ 
+diff -urNad javacc_4.0+cvs20070207~/bin/jjdoc javacc_4.0+cvs20070207/bin/jjdoc
+--- javacc_4.0+cvs20070207~/bin/jjdoc	2005-04-30 08:08:07.000000000 +0100
++++ javacc_4.0+cvs20070207/bin/jjdoc	2007-02-28 22:36:50.000000000 +0000
+@@ -1,9 +1,5 @@
+ #!/bin/sh
+-JAR="`dirname $0`/lib/javacc.jar"
+-
+-case "`uname`" in
+-     CYGWIN*) JAR="`cygpath --windows -- "$JAR"`" ;;
+-esac
++JAR=/usr/share/java/javacc.jar
+ 
+ java -classpath "$JAR" jjdoc "$@"
+ 
+diff -urNad javacc_4.0+cvs20070207~/bin/jjtree javacc_4.0+cvs20070207/bin/jjtree
+--- javacc_4.0+cvs20070207~/bin/jjtree	2005-04-30 08:08:07.000000000 +0100
++++ javacc_4.0+cvs20070207/bin/jjtree	2007-02-28 22:36:59.000000000 +0000
+@@ -1,9 +1,5 @@
+ #!/bin/sh
+-JAR="`dirname $0`/lib/javacc.jar"
+-
+-case "`uname`" in
+-     CYGWIN*) JAR="`cygpath --windows -- "$JAR"`" ;;
+-esac
++JAR=/usr/share/java/javacc.jar
+ 
+ java -classpath "$JAR" jjtree "$@"
+ 

Added: trunk/javacc/debian/patches/javacctarget.dpatch
===================================================================
--- trunk/javacc/debian/patches/javacctarget.dpatch	2007-02-27 11:33:02 UTC (rev 3019)
+++ trunk/javacc/debian/patches/javacctarget.dpatch	2007-02-28 23:10:41 UTC (rev 3020)
@@ -0,0 +1,17 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## executables.dpatch by Paul Cager <paul-debian at home.paulcager.org>
+##
+## DP: Change javacc task to use target=1.4
+
+ at DPATCH@
+diff -urNad javacc_4.0+cvs20070207~/src/org/javacc/parser/build.xml javacc_4.0+cvs20070207/src/org/javacc/parser/build.xml
+--- javacc-4.0+cvs20070207.orig/src/org/javacc/parser/build.xml
++++ javacc-4.0+cvs20070207/src/org/javacc/parser/build.xml
+@@ -53,6 +53,7 @@
+            destdir="${javacc.root}/classes"
+            debug="${build.compiler.debug}"
+            source="1.4"
++          target="1.4"
+            classpath="${javacc.root}/classes:${junit.jar}">
+     </javac>
+   </target>

Modified: trunk/javacc/debian/rules
===================================================================
--- trunk/javacc/debian/rules	2007-02-27 11:33:02 UTC (rev 3019)
+++ trunk/javacc/debian/rules	2007-02-28 23:10:41 UTC (rev 3020)
@@ -4,8 +4,9 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
-DESTDIR=`pwd`/debian/javacc
 
+include /usr/share/dpatch/dpatch.make
+
 export JAVACMD=/usr/bin/gij
 
 # Class path: Ant requires an JAXP-compatible XML parser
@@ -18,9 +19,10 @@
 # Ant options
 ANT_OPTS=-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter -Dant.home=${ANT_HOME} -Dant.build.javac.target=1.4
 ANT=${JAVACMD} org.apache.tools.ant.Main ${ANT_OPTS}
+VERSION=$(shell dpkg-parsechangelog | egrep '^Version:' | cut -f2 -d' ' | cut -f1 -d-)
 
 configure: configure-stamp
-configure-stamp:
+configure-stamp: patch-stamp
 	dh_testdir
 	touch configure-stamp
 
@@ -33,7 +35,7 @@
 
 	touch build-stamp
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp configure-stamp
@@ -47,10 +49,8 @@
 	dh_testroot
 	dh_clean -k
 	dh_installdirs
-	install -d $(DESTDIR)/usr/bin
-	install -m 0755 bin/javacc bin/jjdoc bin/jjtree $(DESTDIR)/usr/bin
-	install -d $(DESTDIR)/usr/share/java
-	install -m 0644 bin/lib/javacc.jar $(DESTDIR)/usr/share/java
+	echo Version $(VERSION)
+	mv bin/lib/javacc.jar bin/lib/javacc-$(VERSION).jar
 
 # Build architecture-dependent files here.
 binary-arch: build install
@@ -60,10 +60,13 @@
 	dh_testdir
 	dh_testroot
 	dh_installchangelogs 
-	# Install docs in -doc package, but to /usr/share/doc/javacc/
+	dh_install -pjavacc bin/lib/javacc-$(VERSION).jar usr/share/java
+	dh_link -pjavacc usr/share/java/javacc-$(VERSION).jar usr/share/java/javacc.jar
+	dh_install -pjavacc bin/javacc bin/jjdoc bin/jjtree /usr/bin
+	# Install docs / examples in -doc package, but to /usr/share/doc/javacc/
 	dh_install -pjavacc-doc www/doc usr/share/doc/javacc
+	dh_install -pjavacc-doc examples usr/share/doc/javacc
 	dh_installdocs -pjavacc -pjavacc-doc
-	dh_installexamples -pjavacc-doc examples/*
 	dh_installman debian/javacc.1
 	dh_link usr/share/man/man1/javacc.1 usr/share/man/man1/jjtree.1
 	dh_link usr/share/man/man1/javacc.1 usr/share/man/man1/jjdoc.1




More information about the pkg-java-commits mailing list