Use %jpackage_script to generate scripts.
- Add OSGi metadata to manifest instead of discarding everything else in it. - Drop dependency on xml-commons-api, add one on java(-headless). - Crosslink javadocs with Java's. - Include NOTICE* in docs. - Update URLs. - Specfile cleanups.
This commit is contained in:
parent
faff5a96d1
commit
f4be5169b1
11
xml-commons-resolver-1.2-crosslink.patch
Normal file
11
xml-commons-resolver-1.2-crosslink.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -up xml-commons-resolver-1.2/resolver.xml~ xml-commons-resolver-1.2/resolver.xml
|
||||
--- xml-commons-resolver-1.2/resolver.xml~ 2006-11-20 22:23:07.000000000 +0200
|
||||
+++ xml-commons-resolver-1.2/resolver.xml 2011-10-19 00:43:22.186668155 +0300
|
||||
@@ -148,6 +148,7 @@ Also, you may need to adjust src/documen
|
||||
use="true"
|
||||
windowtitle="${name.resolver} API"
|
||||
doctitle="${name.resolver}"
|
||||
+ link="/usr/share/javadoc/java"
|
||||
bottom="${copyright.message}">
|
||||
<package name="org.apache.xml.resolver"/>
|
||||
<package name="org.apache.xml.resolver.helpers"/>
|
19
xml-commons-resolver-1.2-osgi.patch
Normal file
19
xml-commons-resolver-1.2-osgi.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff -up xml-commons-resolver-1.2/src/manifest.resolver~ xml-commons-resolver-1.2/src/manifest.resolver
|
||||
--- xml-commons-resolver-1.2/src/manifest.resolver~ 2006-11-20 22:23:06.000000000 +0200
|
||||
+++ xml-commons-resolver-1.2/src/manifest.resolver 2011-10-19 01:38:13.954802303 +0300
|
||||
@@ -1,5 +1,15 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: org.apache.xml.resolver.apps.resolver
|
||||
+Bundle-RequiredExecutionEnvironment: J2SE-1.2
|
||||
+Bundle-SymbolicName: org.apache.xml.resolver
|
||||
+Bundle-ManifestVersion: 2
|
||||
+Bundle-Name: XML Commons Resolver
|
||||
+Bundle-Localization: plugin
|
||||
+Bundle-Version: 1.2.0.v200806030312
|
||||
+Bundle-Vendor: Apache Software Foundation
|
||||
+Export-Package: org.apache.env,org.apache.xml.resolver,org.apache.xml.
|
||||
+ resolver.apps,org.apache.xml.resolver.etc,org.apache.xml.resolver.hel
|
||||
+ pers,org.apache.xml.resolver.readers,org.apache.xml.resolver.tools
|
||||
|
||||
Name: org/apache/xml/resolver
|
||||
Comment: xml-commons Resolver code
|
@ -1,12 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.2
|
||||
Main-Class: org.apache.xml.resolver.apps.resolver
|
||||
Bundle-SymbolicName: org.apache.xml.resolver
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: XML Commons Resolver
|
||||
Bundle-Localization: plugin
|
||||
Bundle-Version: 1.2.0.v200806030312
|
||||
Bundle-Vendor: Apache Software Foundation
|
||||
Export-Package: org.apache.env,org.apache.xml.resolver,org.apache.xml.
|
||||
resolver.apps,org.apache.xml.resolver.etc,org.apache.xml.resolver.hel
|
||||
pers,org.apache.xml.resolver.readers,org.apache.xml.resolver.tools
|
@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# xml-commons-resolver resolver script
|
||||
# JPackage Project (http://www.jpackage.org/)
|
||||
# $Id: xml-commons-resolver-resolver.sh,v 1.1 2004/09/09 14:51:13 cvsdist 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 jaxp_parser_impl.jar"
|
||||
|
||||
# Set parameters
|
||||
set_jvm
|
||||
set_classpath $BASE_JARS
|
||||
set_flags $BASE_FLAGS
|
||||
set_options $BASE_OPTIONS
|
||||
|
||||
# Let's start
|
||||
run "$@"
|
@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# xml-commons-resolver xparse script
|
||||
# JPackage Project (http://www.jpackage.org/)
|
||||
# $Id: xml-commons-resolver-xparse.sh,v 1.1 2004/09/09 14:51:13 cvsdist 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 jaxp_parser_impl.jar"
|
||||
|
||||
# Set parameters
|
||||
set_jvm
|
||||
set_classpath $BASE_JARS
|
||||
set_flags $BASE_FLAGS
|
||||
set_options $BASE_OPTIONS
|
||||
|
||||
# Let's start
|
||||
run "$@"
|
@ -1,21 +0,0 @@
|
||||
#!/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 jaxp_parser_impl.jar"
|
||||
|
||||
# Set parameters
|
||||
set_jvm
|
||||
set_classpath $BASE_JARS
|
||||
set_flags $BASE_FLAGS
|
||||
set_options $BASE_OPTIONS
|
||||
|
||||
# Let's start
|
||||
run "$@"
|
@ -1,26 +1,27 @@
|
||||
%if %{?fedora} > 19 || 0%{?rhel} > 6
|
||||
%global headless -headless
|
||||
%endif
|
||||
|
||||
Name: xml-commons-resolver
|
||||
Version: 1.2
|
||||
Release: 14%{?dist}
|
||||
Release: 15%{?dist}
|
||||
Epoch: 0
|
||||
Summary: Resolver subproject of xml-commons
|
||||
License: ASL 2.0
|
||||
URL: http://xml.apache.org/commons/
|
||||
Source0: http://www.apache.org/dist/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
|
||||
Source4: %{name}-MANIFEST.MF
|
||||
URL: http://xerces.apache.org/xml-commons/components/resolver/
|
||||
Source0: http://www.apache.org/dist/xerces/xml-commons/%{name}-%{version}.tar.gz
|
||||
Source5: %{name}-pom.xml
|
||||
Source6: %{name}-resolver.1
|
||||
Source7: %{name}-xparse.1
|
||||
Source8: %{name}-xread.1
|
||||
Patch0: %{name}-1.2-crosslink.patch
|
||||
Patch1: %{name}-1.2-osgi.patch
|
||||
|
||||
Requires: xml-commons-apis
|
||||
Requires: java%{?headless} >= 1:1.6.0
|
||||
Requires: jpackage-utils
|
||||
BuildRequires: java-devel >= 1:1.6.0
|
||||
BuildRequires: ant
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: zip
|
||||
Group: Development/Libraries
|
||||
BuildArch: noarch
|
||||
|
||||
@ -30,33 +31,26 @@ Resolver subproject of xml-commons.
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Documentation
|
||||
Requires: jpackage-utils
|
||||
BuildRequires: java-javadoc
|
||||
Requires: java-javadoc
|
||||
|
||||
%description javadoc
|
||||
Javadoc for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
# remove all binary libs and prebuilt javadocs
|
||||
find . -name "*.jar" -exec rm -f {} \;
|
||||
rm -rf docs
|
||||
sed -i 's/\r//' KEYS LICENSE.resolver.txt
|
||||
sed -i 's/\r//' KEYS LICENSE.resolver.txt NOTICE-resolver.txt
|
||||
|
||||
%build
|
||||
sed -i -e 's|call Resolver|call resolver|g' resolver.xml
|
||||
sed -i -e 's|classname="org.apache.xml.resolver.Catalog"|fork="yes" classname="org.apache.xml.resolver.apps.resolver"|g' resolver.xml
|
||||
sed -i -e 's|org.apache.xml.resolver.Catalog|org.apache.xml.resolver.apps.resolver|g' src/manifest.resolver
|
||||
|
||||
ant -f resolver.xml jar javadocs
|
||||
%ant -f resolver.xml jar javadocs
|
||||
|
||||
%install
|
||||
# inject OSGi manifests
|
||||
mkdir -p META-INF
|
||||
cp -p %{SOURCE4} META-INF/MANIFEST.MF
|
||||
touch META-INF/MANIFEST.MF
|
||||
zip -u build/resolver.jar META-INF/MANIFEST.MF
|
||||
|
||||
# Jars
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
||||
install -p -m 644 build/resolver.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||
@ -68,9 +62,9 @@ cp -pr build/apidocs/resolver/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
|
||||
# Scripts
|
||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||
cp %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/xml-resolver
|
||||
cp %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/xml-xread
|
||||
cp %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/xml-xparse
|
||||
%jpackage_script org.apache.xml.resolver.apps.resolver "" "" %{name} xml-resolver true
|
||||
%jpackage_script org.apache.xml.resolver.apps.xread "" "" %{name} xml-xread true
|
||||
%jpackage_script org.apache.xml.resolver.apps.xparse "" "" %{name} xml-xparse true
|
||||
|
||||
# Man pages
|
||||
install -d -m 755 ${RPM_BUILD_ROOT}%{_mandir}/man1
|
||||
@ -84,18 +78,27 @@ install -p -m 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
||||
|
||||
%files
|
||||
%doc KEYS LICENSE.resolver.txt
|
||||
%doc KEYS LICENSE.resolver.txt NOTICE-resolver.txt
|
||||
%{_mavendepmapfragdir}/*
|
||||
%{_mavenpomdir}/*
|
||||
%{_javadir}/*
|
||||
%{_mandir}/man1/*
|
||||
%attr(0755,root,root) %{_bindir}/*
|
||||
%{_bindir}/xml-*
|
||||
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}
|
||||
%doc LICENSE.resolver.txt
|
||||
%doc LICENSE.resolver.txt NOTICE-resolver.txt
|
||||
|
||||
%changelog
|
||||
* Mon Dec 23 2013 Ville Skyttä <ville.skytta@iki.fi> - 0:1.2-15
|
||||
- Use %%jpackage_script to generate scripts.
|
||||
- Add OSGi metadata to manifest instead of discarding everything else in it.
|
||||
- Drop dependency on xml-commons-api, add one on java(-headless).
|
||||
- Crosslink javadocs with Java's.
|
||||
- Include NOTICE* in docs.
|
||||
- Update URLs.
|
||||
- Specfile cleanups.
|
||||
|
||||
* Thu Aug 15 2013 Mat Booth <fedora@matbooth.co.uk> - 0:1.2-14
|
||||
- Fix FTBFS rhbz #993143
|
||||
|
||||
@ -147,7 +150,7 @@ install -p -m 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||
- Add dos2unix BR and fix line endings
|
||||
- Use upstream tarball
|
||||
|
||||
* Sat Aug 8 2009 Ville Skyttä <ville.skytta at iki.fi> - 0:1.1-4.16
|
||||
* Sat Aug 8 2009 Ville Skyttä <ville.skytta@iki.fi> - 0:1.1-4.16
|
||||
- Fix specfile UTF-8 encoding.
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.1-4.15
|
||||
@ -213,5 +216,5 @@ install -p -m 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||
* Tue May 06 2003 David Walluck <david@anti-microsoft.org> 0:1.0-2jpp
|
||||
- update for JPackage 1.5
|
||||
|
||||
* Wed Nov 13 2002 Ville Skyttä <ville.skytta at iki.fi> - 1.0-1jpp
|
||||
* Wed Nov 13 2002 Ville Skyttä <ville.skytta@iki.fi> - 1.0-1jpp
|
||||
- Follow upstream changes, split out of xml-commons.
|
||||
|
Loading…
Reference in New Issue
Block a user