diff --git a/README.md b/README.md index cd4cff5..d52be6a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # xml-commons-resolver +Resolver subproject of xml-commons. + diff --git a/xml-commons-resolver-resolver.sh b/xml-commons-resolver-resolver.sh new file mode 100644 index 0000000..2ee47ce --- /dev/null +++ b/xml-commons-resolver-resolver.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# +# xml-commons-resolver resolver script +# JPackage Project (http://www.jpackage.org/) +# $Id: xml-commons-resolver-resolver.sh,v 1.1.2.1 2004/03/03 15:01:33 fche Exp $ + +# Source functions library +. /usr/share/java-utils/java-functions + +# Configuration +MAIN_CLASS=org.apache.xml.resolver.apps.resolver +BASE_JARS="xml-commons-resolver.jar xml-commons-apis.jar xerces-j2.jar" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/xml-commons-resolver-xparse.sh b/xml-commons-resolver-xparse.sh new file mode 100644 index 0000000..5f1bcea --- /dev/null +++ b/xml-commons-resolver-xparse.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# +# xml-commons-resolver xparse script +# JPackage Project (http://www.jpackage.org/) +# $Id: xml-commons-resolver-xparse.sh,v 1.1.2.1 2004/03/03 15:01:33 fche Exp $ + +# Source functions library +. /usr/share/java-utils/java-functions + +# Configuration +MAIN_CLASS=org.apache.xml.resolver.apps.xparse +BASE_JARS="xml-commons-resolver.jar xml-commons-apis.jar xerces-j2.jar" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/xml-commons-resolver-xread.sh b/xml-commons-resolver-xread.sh new file mode 100644 index 0000000..66915bc --- /dev/null +++ b/xml-commons-resolver-xread.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# +# xml-commons-resolver xread script +# JPackage Project (http://www.jpackage.org/) +# $Id: xml-commons-resolver-xread.sh,v 1.1.2.1 2004/03/03 15:01:33 fche Exp $ + +# Source functions library +. /usr/share/java-utils/java-functions + +# Configuration +MAIN_CLASS=org.apache.xml.resolver.apps.xread +BASE_JARS="xml-commons-resolver.jar xml-commons-apis.jar xerces-j2.jar" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/xml-commons-resolver.spec b/xml-commons-resolver.spec new file mode 100644 index 0000000..6bc7d84 --- /dev/null +++ b/xml-commons-resolver.spec @@ -0,0 +1,141 @@ +%define apis_version 1.3.04 +%define repodir %{_javadir}/repository.jboss.com/apache-xml-commons/%{apis_version}-brew +%define repodirlib %{repodir}/lib +%define repodirsrc %{repodir}/src +#%define javahome /usr/lib/jvm/jdk-gcj + +Name: xml-commons-resolver +Version: 1.2 +Release: 7mamba +Summary: Resolver subproject of xml-commons. +Group: Applications/Publishing +Vendor: openmamba +Distribution: openmamba +Packager: gil +URL: http://xml.apache.org/commons/ +Source0: http://apache.fis.uniroma2.it/xml/commons/xml-commons-resolver-%{version}.tar.gz +Source1: xml-commons-resolver-resolver.sh +Source2: xml-commons-resolver-xread.sh +Source3: xml-commons-resolver-xparse.sh +License: Apache Software License 2.0 +BuildRequires: apache-ant +BuildRequires: coreutils +BuildRequires: jpackage-utils +BuildRequires: java-gcj-compat +BuildRequires: xml-commons-apis +Requires: coreutils +Requires: jpackage-utils +%if "%{stage1}" != "1" +Requires: xerces-j2 +Requires: xml-commons-apis +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Resolver subproject of xml-commons. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation + +%description javadoc +Javadoc for %{name} + +%package repolib +Group: Development/Libraries/Java +Summary: Artifacts to be uploaded to a repository library + +%description repolib +Resolver subproject of xml-commons. + +This package contains artifacts to be uploaded to a repository library. +This package is not meant to be installed but so its contents +can be extracted through rpm2cpio + +%prep + +%setup -q +# remove all binary libs and prebuilt javadocs +find . -name "*.jar" -exec rm -f {} \; +rm -rf docs + +%build +perl -p -i -e 's|call Resolver|call resolver|g' resolver.xml +perl -p -i -e 's|classname="org.apache.xml.resolver.Catalog"|fork="yes" classname="org.apache.xml.resolver.apps.resolver"|g' resolver.xml +perl -p -i -e 's|org.apache.xml.resolver.Catalog|org.apache.xml.resolver.apps.resolver|g' src/manifest.resolver +export JAVA_HOME=%java_home +ant -f resolver.xml jar javadocs + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +mkdir -p %{buildroot}%{_javadir} +cp build/resolver.jar %{buildroot}%{_javadir}/xml-commons-resolver-%{version}.jar + +( + pushd %{buildroot}%{_javadir} + for jar in *-%{version}.jar; do + ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` + done + popd +) + +mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version} +cp -pr build/apidocs/resolver/* %{buildroot}%{_javadocdir}/%{name}-%{version} + + +mkdir -p %{buildroot}%{_bindir} +install -m 755 %{S:1} %{buildroot}%{_bindir}/xml-resolver +install -m 755 %{S:2} %{buildroot}%{_bindir}/xml-xread +install -m 755 %{S:3} %{buildroot}%{_bindir}/xml-xparse + +mkdir -p %{buildroot}%{repodir} +mkdir -p %{buildroot}%{repodirlib} +mkdir -p %{buildroot}%{repodirsrc} +install -pm 644 %{SOURCE0} %{buildroot}%{repodirsrc} +cp -p %{buildroot}%{_javadir}/xml-commons-resolver-%{version}.jar %{buildroot}%{repodirlib}/resolver.jar + +# gcj support +#%{_bindir}/aot-compile-rpm + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%attr(0755,root,root) %{_bindir}/xml-resolver +%attr(0755,root,root) %{_bindir}/xml-xparse +%attr(0755,root,root) %{_bindir}/xml-xread +%{_javadir}/xml-commons-resolver-%{version}.jar +%{_javadir}/xml-commons-resolver.jar +%doc KEYS LICENSE.resolver.txt + +%files javadoc +%defattr(-,root,root) +%doc %{_javadocdir}/%{name}-%{version} + +%files repolib +%defattr(-,root,root) +%{repodir} + +%changelog +* Wed Mar 23 2011 gil 1.2-7mamba +- rebuilt with java-gcj-compat support + +* Sat Nov 06 2010 gil 1.2-6mamba +- rebuilt devel + +* Sun Jan 10 2010 gil 1.2-5mamba +- edit repodir + +* Sun Jan 10 2010 gil 1.2-4mamba +- added new sub package repolib + +* Thu Feb 26 2009 gil 1.2-3mamba +- fixed some errors + +* Tue Feb 24 2009 gil 1.2-2mamba +- added xerces-j2 support + +* Tue Dec 23 2008 gil 1.2-1mamba +- package created by autospec