%define javahome %{_jvmdir}/jdk Name: jakarta-commons-launcher Version: 1.1 Release: 2mamba Summary: a cross platform Java application launcher Group: Development/Libraries/Java Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://commons.apache.org/launcher/ Source: http://archive.apache.org/dist/jakarta/commons/launcher/source/commons-launcher-%{version}-src.tar.gz License: Apache License Version 2.0 BuildRequires: apache-ant BuildRequires: jpackage-utils Requires: jpackage-utils BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Commons-launcher eliminates the need for a batch or shell script to launch a Java class. Some situations where elimination of a batch or shell script may be desirable are: * You want to avoid having to determining where certain application paths are e.g. your application's home directory, etc. Determining this dynamically in a Windows batch scripts is very tricky on some versions of Windows or when softlinks are used on Unix platforms. * You want to avoid having to handle native file and path separators or native path quoting issues. * You need to enforce certain system properties e.g. java.endorsed.dirs when running with JDK 1.4. * You want to allow users to pass in custom JVM arguments or system properties without having to parse and reorder arguments in your script. This can be tricky and/or messy in batch and shell scripts. * You want to bootstrap system properties from a configuration file instead hard-coding them in your batch and shell scripts. * You want to provide localized error messages which is very tricky to do in batch and shell scripts. %package javadoc Group: Documentation Summary: Javadoc for %{name} %description javadoc A cross platform Java application launcher. This package contains javadoc for %{name} %prep %setup -q -n commons-launcher sed -i 's/\r//' LICENSE.txt sed -i 's/\r//' NOTICE.txt sed -i 's/\r//' README.txt %build mkdir lib export JAVA_HOME=%javahome ant \ -Dbuild.sysclasspath=only \ -Dfinal.name=commons-launcher \ -Dsrcdir=. \ jar javadoc %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}%{_javadir} install -p -m 644 dist/bin/commons-launcher.jar \ %{buildroot}%{_javadir}/%{name}-%{version}.jar ( cd %{buildroot}%{_javadir} for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"` done ) ( cd %{buildroot}%{_javadir} for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` done ) mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version} cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} #%{_bindir}/aot-compile-rpm %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %{_javadir}/commons-launcher-%{version}.jar %{_javadir}/commons-launcher.jar %{_javadir}/jakarta-commons-launcher-%{version}.jar %{_javadir}/jakarta-commons-launcher.jar %doc LICENSE.txt NOTICE.txt README.txt %files javadoc %defattr(-,root,root) %{_javadocdir}/%{name}-%{version} %ghost %{_javadocdir}/%{name} %changelog * Sun Mar 27 2011 gil 1.1-2mamba - rebuilt with java-openjdk support * Sun Mar 08 2009 gil 1.1-1mamba - package created by autospec