[pkg-java] r18179 - trunk/groovy/debian

Miguel Landaeta nomadium at moszumanska.debian.org
Sun May 25 02:23:23 UTC 2014


Author: nomadium
Date: 2014-05-25 02:23:23 +0000 (Sun, 25 May 2014)
New Revision: 18179

Added:
   trunk/groovy/debian/groovy.postinst
   trunk/groovy/debian/groovy.prerm
Modified:
   trunk/groovy/debian/changelog
   trunk/groovy/debian/groovy.links
   trunk/groovy/debian/maven.rules
   trunk/groovy/debian/rules
   trunk/groovy/debian/watch
Log:
Upload to unstable

Modified: trunk/groovy/debian/changelog
===================================================================
--- trunk/groovy/debian/changelog	2014-05-24 16:40:09 UTC (rev 18178)
+++ trunk/groovy/debian/changelog	2014-05-25 02:23:23 UTC (rev 18179)
@@ -1,3 +1,12 @@
+groovy (1.8.6-4) unstable; urgency=medium
+
+  * Implement alternatives usage to allow co-installation with groovy 2.x.
+    (Closes: #747819).
+  * Change versionless Maven symlinks from 'debian' to '1.x'.
+  * Small fix in debian/watch file.
+
+ -- Miguel Landaeta <nomadium at debian.org>  Sun, 18 May 2014 16:32:17 -0300
+
 groovy (1.8.6-3) unstable; urgency=medium
 
   * Rebuild against newest jarjar release to fix issue with groovy-all jar.

Modified: trunk/groovy/debian/groovy.links
===================================================================
--- trunk/groovy/debian/groovy.links	2014-05-24 16:40:09 UTC (rev 18178)
+++ trunk/groovy/debian/groovy.links	2014-05-25 02:23:23 UTC (rev 18179)
@@ -1,10 +1,3 @@
-/usr/share/groovy/bin/grape                /usr/bin/grape
-/usr/share/groovy/bin/groovy               /usr/bin/groovy
-/usr/share/groovy/bin/groovyc              /usr/bin/groovyc
-/usr/share/groovy/bin/groovyConsole        /usr/bin/groovyConsole
-/usr/share/groovy/bin/groovysh             /usr/bin/groovysh
-/usr/share/groovy/bin/java2groovy          /usr/bin/java2groovy
-/usr/share/groovy/bin/startGroovy          /usr/bin/startGroovy
 /usr/share/java/ant.jar                    /usr/share/groovy/lib/ant.jar
 /usr/share/java/ant-junit.jar              /usr/share/groovy/lib/ant-junit.jar
 /usr/share/java/ant-launcher.jar           /usr/share/groovy/lib/ant-launcher.jar
@@ -25,9 +18,10 @@
 /usr/share/java/regexp.jar                 /usr/share/groovy/lib/regexp.jar
 /usr/share/java/servlet-api-2.5.jar        /usr/share/groovy/lib/servlet-api.jar
 /usr/share/java/xstream.jar                /usr/share/groovy/lib/xstream.jar
-/usr/share/man/man1/groovy.1.gz            /usr/share/man/man1/startGroovy.1.gz
-/usr/share/man/man1/groovy.1.gz            /usr/share/man/man1/groovysh.1.gz
-/usr/share/man/man1/groovy.1.gz            /usr/share/man/man1/java2groovy.1.gz
-/usr/share/man/man1/groovy.1.gz            /usr/share/man/man1/groovyConsole.1.gz
+/usr/share/groovy/man/man1/groovy.1.gz     /usr/share/groovy/man/man1/startGroovy.1.gz
+/usr/share/groovy/man/man1/groovy.1.gz     /usr/share/groovy/man/man1/groovysh.1.gz
+/usr/share/groovy/man/man1/groovy.1.gz     /usr/share/groovy/man/man1/java2groovy.1.gz
+/usr/share/groovy/man/man1/groovy.1.gz     /usr/share/groovy/man/man1/groovyConsole.1.gz
+/usr/share/groovy/man/man1/groovy.1.gz     /usr/share/groovy/man/man1/groovydoc.1.gz
 /etc/groovy                                /usr/share/groovy/conf
 

Added: trunk/groovy/debian/groovy.postinst
===================================================================
--- trunk/groovy/debian/groovy.postinst	                        (rev 0)
+++ trunk/groovy/debian/groovy.postinst	2014-05-25 02:23:23 UTC (rev 18179)
@@ -0,0 +1,32 @@
+#!/bin/sh
+set -e
+
+GROOVY_HOME=/usr/share/groovy
+MANDIR=/usr/share/man
+PRIORITY=20
+
+# I decided to assign a priority of 10 to groovy2 alternatives
+# and 20 to groovy ones since for jessie there is going to be
+# more software in the archive depending on groovy than on groovy2.
+
+add_groovy_alternative() {
+    if [ x"" != "x$3" ]; then
+        update-alternatives --install /usr/bin/$1 $1 $GROOVY_HOME/bin/$1 $2 \
+            --slave $MANDIR/man1/$3.1.gz $1.1.gz $GROOVY_HOME/man/man1/$3.1.gz
+    else
+        update-alternatives --install /usr/bin/$1 $1 $GROOVY_HOME/bin/$1 $2
+    fi
+}
+
+for cmd in groovy groovyc grape; do
+    add_groovy_alternative $cmd $PRIORITY $cmd
+done
+
+# these commands don't have a proper manpage
+for cmd in startGroovy groovysh java2groovy groovyConsole; do
+    add_groovy_alternative $cmd $PRIORITY
+done
+
+#DEBHELPER#
+
+exit 0

Added: trunk/groovy/debian/groovy.prerm
===================================================================
--- trunk/groovy/debian/groovy.prerm	                        (rev 0)
+++ trunk/groovy/debian/groovy.prerm	2014-05-25 02:23:23 UTC (rev 18179)
@@ -0,0 +1,35 @@
+#!/bin/sh
+set -e
+
+GROOVY_HOME=/usr/share/groovy
+
+remove_groovy_alternatives() {
+    for cmd in groovy groovyc grape \
+        startGroovy groovysh java2groovy groovyConsole; do
+            if [ -f "$GROOVY_HOME/bin/$cmd" ]; then
+                update-alternatives --verbose --remove $cmd $GROOVY_HOME/bin/$cmd
+            fi
+    done
+}
+
+
+
+case "$1" in
+  # only remove in remove/deconfigure so we don't disrupt users' preferences
+  remove|deconfigure)
+    remove_groovy_alternatives
+    ;;
+
+  upgrade|failed-upgrade)
+    ;;
+
+  *)
+    echo "prerm called with unknown argument \`$1'" >&2
+    exit 0
+    ;;
+esac
+
+
+#DEBHELPER#
+
+exit 0

Modified: trunk/groovy/debian/maven.rules
===================================================================
--- trunk/groovy/debian/maven.rules	2014-05-24 16:40:09 UTC (rev 18178)
+++ trunk/groovy/debian/maven.rules	2014-05-25 02:23:23 UTC (rev 18179)
@@ -1,3 +1,4 @@
+org.codehaus.groovy * * s/.*/1.x/ * *
 asm asm* jar s/3\..*/3.x/
 antlr antlr jar s/2\..*/2.x/
 junit junit jar s/3\..*/3.x/

Modified: trunk/groovy/debian/rules
===================================================================
--- trunk/groovy/debian/rules	2014-05-24 16:40:09 UTC (rev 18178)
+++ trunk/groovy/debian/rules	2014-05-25 02:23:23 UTC (rev 18179)
@@ -26,6 +26,9 @@
 	# with bnd:
 	#mh_installjar -p$(PACKAGE) -dusr/share/groovy/lib/groovy-$(DEB_UPSTREAM_VERSION).jar -l pom.xml target/install/lib/groovy-$(DEB_UPSTREAM_VERSION).jar
 	#mh_installjar -p$(PACKAGE) -dusr/share/groovy/embeddable/groovy-all-$(DEB_UPSTREAM_VERSION).jar -l target/groovy-all.pom target/install/embeddable/groovy-all-$(DEB_UPSTREAM_VERSION).jar
+	dh_compress
+	mv debian/groovy/usr/share/man/man1/* debian/groovy/usr/share/groovy/man/man1
+	rm -rf debian/groovy/usr/share/man
 
 binary-post-install/$(PACKAGE)-doc::
 	dh_install -p$(PACKAGE)-doc $(API_DOCS) usr/share/doc/$(PACKAGE)

Modified: trunk/groovy/debian/watch
===================================================================
--- trunk/groovy/debian/watch	2014-05-24 16:40:09 UTC (rev 18178)
+++ trunk/groovy/debian/watch	2014-05-25 02:23:23 UTC (rev 18179)
@@ -1,2 +1,2 @@
 version=3
-http://dist.groovy.codehaus.org/distributions/ groovy-src-(.*1\.8.*).zip debian debian/orig-tar.sh
+http://dist.groovy.codehaus.org/distributions/ groovy-src-(1\.8.*).zip debian debian/orig-tar.sh




More information about the pkg-java-commits mailing list