[javacc] 03/44: Converted to use dpatch
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Fri Nov 18 10:23:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository javacc.
commit 6975a24420a2016e9a5b8fc6038ee38bb0e32698
Author: Paul Cager <paul-debian at home.paulcager.org>
Date: Wed Feb 28 23:10:41 2007 +0000
Converted to use dpatch
---
debian/changelog | 1 +
debian/control | 2 +-
debian/patches/00list | 2 ++
debian/patches/executables.dpatch | 48 ++++++++++++++++++++++++++++++++++++++
debian/patches/javacctarget.dpatch | 17 ++++++++++++++
debian/rules | 21 ++++++++++-------
6 files changed, 81 insertions(+), 10 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 7d28022..e622bfe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ javacc (4.0+cvs20070207-1) experimental; urgency=low
* 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
diff --git a/debian/control b/debian/control
index 5cd88dc..f2368df 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: devel
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
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644
index 0000000..ec7cc1a
--- /dev/null
+++ b/debian/patches/00list
@@ -0,0 +1,2 @@
+executables.dpatch
+javacctarget.dpatch
diff --git a/debian/patches/executables.dpatch b/debian/patches/executables.dpatch
new file mode 100644
index 0000000..864806d
--- /dev/null
+++ b/debian/patches/executables.dpatch
@@ -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 "$@"
+
diff --git a/debian/patches/javacctarget.dpatch b/debian/patches/javacctarget.dpatch
new file mode 100644
index 0000000..1222b62
--- /dev/null
+++ b/debian/patches/javacctarget.dpatch
@@ -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>
diff --git a/debian/rules b/debian/rules
index 1cdaa46..a3dce77 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,8 @@
# 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
@@ -18,9 +19,10 @@ export CLASSPATH=${JARS}/xmlParserAPI.jar:${JARS}/xmlImpl.jar:${ANT_HOME}/lib/an
# 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 @@ build-stamp: configure-stamp
touch build-stamp
-clean:
+clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
@@ -47,10 +49,8 @@ install: build
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 @@ binary-indep: build install
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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/javacc.git
More information about the pkg-java-commits
mailing list