From 5ff2f3a2a05c50b562e3ba2322efe89ce8c04f7b Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 23 Feb 2017 15:52:39 +0100 Subject: [PATCH] Update to current packaging guidelines --- xml-commons-apis.spec | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/xml-commons-apis.spec b/xml-commons-apis.spec index 7d9b995..9219d3b 100644 --- a/xml-commons-apis.spec +++ b/xml-commons-apis.spec @@ -1,10 +1,10 @@ Name: xml-commons-apis Version: 1.4.01 -Release: 21%{?dist} +Release: 22%{?dist} Summary: APIs for DOM, SAX, and JAXP -Group: Development/Libraries License: ASL 2.0 and W3C and Public Domain URL: http://xml.apache.org/commons/ +BuildArch: noarch # From source control because the published tarball doesn't include some docs: # svn export http://svn.apache.org/repos/asf/xml/commons/tags/xml-commons-external-1_4_01/java/external/ @@ -15,16 +15,11 @@ Source2: %{name}-ext-MANIFEST.MF Source3: http://repo1.maven.org/maven2/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.pom Source4: http://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04.pom -BuildArch: noarch - -BuildRequires: java-devel >= 1:1.6.0 -BuildRequires: jpackage-utils +BuildRequires: javapackages-local BuildRequires: ant BuildRequires: zip -Requires: java-headless -Requires: jpackage-utils +BuildRequires: apache-parent -Obsoletes: xml-commons < %{version}-%{release} Provides: xml-commons = %{version}-%{release} # TODO: Ugh, this next line should be dropped since it actually provides JAXP 1.4 now... @@ -37,14 +32,12 @@ includes the DOM, SAX, and JAXP. %package manual Summary: Manual for %{name} -Group: Documentation %description manual %{summary}. %package javadoc Summary: Javadoc for %{name} -Group: Documentation %description javadoc %{summary}. @@ -65,10 +58,13 @@ iconv -f iso8859-1 -t utf-8 LICENSE.dom-software.txt > \ cp %{SOURCE3} %{SOURCE4} . sed -i '/distributionManagement/,/\/distributionManagement/ {d}' *.pom +%mvn_file :xml-apis xml-commons-apis jaxp13 jaxp xml-commons-jaxp-1.3-apis +%mvn_file :xml-apis-ext xml-commons-apis-ext +%mvn_alias :xml-apis-ext xerces:dom3-xml-apis + %build ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 jar javadoc -%install # inject OSGi manifests mkdir -p META-INF cp -p %{SOURCE1} META-INF/MANIFEST.MF @@ -78,23 +74,11 @@ cp -p %{SOURCE2} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip -u build/xml-apis-ext.jar META-INF/MANIFEST.MF -# Jars -install -pD -T build/xml-apis.jar %{buildroot}%{_javadir}/%{name}.jar -install -pDm 644 xml-apis-[0-9]*.pom %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom -%add_maven_depmap -a xerces:dom3-xml-apis +%mvn_artifact xml-apis-[0-9]*.pom build/xml-apis.jar +%mvn_artifact xml-apis-ext*.pom build/xml-apis-ext.jar -install -pD -T build/xml-apis-ext.jar %{buildroot}%{_javadir}/%{name}-ext.jar -install -pDm 644 xml-apis-ext*.pom %{buildroot}/%{_mavenpomdir}/JPP-%{name}-ext.pom -%add_maven_depmap JPP-%{name}-ext.pom %{name}-ext.jar - -# for better interoperability with the jpp apis packages -ln -sf %{name}.jar %{buildroot}%{_javadir}/jaxp13.jar -ln -sf %{name}.jar %{buildroot}%{_javadir}/jaxp.jar -ln -sf %{name}.jar %{buildroot}%{_javadir}/xml-commons-jaxp-1.3-apis.jar - -# Javadocs -mkdir -p %{buildroot}%{_javadocdir}/%{name} -cp -pr build/docs/javadoc/* %{buildroot}%{_javadocdir}/%{name} +%install +%mvn_install -J build/docs/javadoc # prevent apis javadoc from being included in doc rm -rf build/docs/javadoc @@ -113,6 +97,9 @@ rm -rf build/docs/javadoc %{_javadocdir}/* %changelog +* Thu Feb 23 2017 Mikolaj Izdebski - 1.4.01-22 +- Update to current packaging guidelines + * Sat Feb 11 2017 Fedora Release Engineering - 1.4.01-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild