packages: smartsprites/smartsprites.sh, smartsprites/smartsprites.spec - fi...

glen glen at pld-linux.org
Wed Apr 20 21:35:56 CEST 2011


Author: glen                         Date: Wed Apr 20 19:35:56 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix startup script with jpackage-utils

---- Files affected:
packages/smartsprites:
   smartsprites.sh (1.1 -> 1.2) , smartsprites.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/smartsprites/smartsprites.sh
diff -u packages/smartsprites/smartsprites.sh:1.1 packages/smartsprites/smartsprites.sh:1.2
--- packages/smartsprites/smartsprites.sh:1.1	Wed Apr 20 21:16:41 2011
+++ packages/smartsprites/smartsprites.sh	Wed Apr 20 21:35:51 2011
@@ -1,8 +1,22 @@
 #!/bin/sh
+set -e
 
-#
-# Add extra JVM options here
-#
-OPTS="-Xms64m -Xmx256m"
+# set JAVA_HOME from jpackage-utils if available
+if [ ! -f /usr/share/java-utils/java-functions ]; then
+	echo >&2 "jpackage-utils not found."
+	exit 1
+fi
+. /usr/share/java-utils/java-functions
 
-exec java $OPTS org.carrot2.labs.smartsprites.SmartSprites "$@"
+jars='smartsprites args4j commons-io commons-lang commons-math google-collections smartsprites'
+for jar in $jars; do
+	jar=$(find-jar $jar)
+	CLASSPATH=$CLASSPATH:$jar
+done
+
+MAIN_CLASS=org.carrot2.labs.smartsprites.SmartSprites
+
+# extra JVM options
+OPTIONS="-Xms64m -Xmx256m"
+
+exec run "$@"

================================================================
Index: packages/smartsprites/smartsprites.spec
diff -u packages/smartsprites/smartsprites.spec:1.1 packages/smartsprites/smartsprites.spec:1.2
--- packages/smartsprites/smartsprites.spec:1.1	Wed Apr 20 21:16:41 2011
+++ packages/smartsprites/smartsprites.spec	Wed Apr 20 21:35:51 2011
@@ -5,7 +5,7 @@
 Summary:	Smart Sprites - CSS Sprite Generator Done Right
 Name:		smartsprites
 Version:	0.2.8
-Release:	0.1
+Release:	0.2
 License:	BSD
 Group:		Development/Languages/Java
 Source0:	http://csssprites.org/download/%{name}-%{version}.zip
@@ -46,8 +46,9 @@
 ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
 
 # TODO
-cp -p lib/commons-math-*.jar $RPM_BUILD_ROOT%{_javadir}
-cp -p lib/google-collections-*.jar $RPM_BUILD_ROOT%{_javadir}
+cp -p lib/commons-math-*.jar $RPM_BUILD_ROOT%{_javadir}/commons-math.jar
+cp -p lib/google-collections-*.jar $RPM_BUILD_ROOT%{_javadir}/google-collections.jar
+cp -p lib/args4j*.jar $RPM_BUILD_ROOT%{_javadir}/args4j.jar
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -59,8 +60,10 @@
 %{_javadir}/%{name}.jar
 %{_javadir}/%{name}-%{version}.jar
 
-%{_javadir}/commons-math-*.jar
-%{_javadir}/google-collections-*.jar
+# FIXME
+%{_javadir}/commons-math.jar
+%{_javadir}/google-collections.jar
+%{_javadir}/args4j.jar
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -68,5 +71,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2011/04/20 19:35:51  glen
+- fix startup script with jpackage-utils
+
 Revision 1.1  2011/04/20 19:16:41  glen
 - initial
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/smartsprites/smartsprites.sh?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/smartsprites/smartsprites.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list