diff --git a/0001-Adapt-build.patch b/0001-Adapt-build.patch index 87e9f3b..e970552 100644 --- a/0001-Adapt-build.patch +++ b/0001-Adapt-build.patch @@ -1,14 +1,14 @@ -From 05a8a2fa49e92ad36a86d5d73588a2e46bf9ff95 Mon Sep 17 00:00:00 2001 -From: Michael Simacek -Date: Mon, 23 Jul 2018 14:30:14 +0200 +From cf7e676edc7ab9d4b8b130ca4d8ecbd291995dea Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Mon, 20 Apr 2020 09:29:12 +0200 Subject: [PATCH] Adapt build --- - build.xml | 40 +++++++++++++++++++++++++--------------- - 1 file changed, 25 insertions(+), 15 deletions(-) + build.xml | 54 +++--------------------------------------------------- + 1 file changed, 3 insertions(+), 51 deletions(-) diff --git a/build.xml b/build.xml -index cd7c2ed..10d8df6 100644 +index cd7c2ed..16368e2 100644 --- a/build.xml +++ b/build.xml @@ -112,17 +112,7 @@ For instructions on how to build JDOM, please view the README.txt file. @@ -30,72 +30,83 @@ index cd7c2ed..10d8df6 100644 -@@ -289,6 +279,7 @@ For instructions on how to build JDOM, please view the README.txt file. - header="<b>${Name}<br><font size='-1'>${version}</font></b>" - bottom="Copyright © ${year} Jason Hunter, Brett McLaughlin. All Rights Reserved."> - -+ - +@@ -296,7 +286,7 @@ For instructions on how to build JDOM, please view the README.txt file. + + + +- + + +@@ -316,21 +306,6 @@ For instructions on how to build JDOM, please view the README.txt file. + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- + -@@ -373,11 +364,11 @@ For instructions on how to build JDOM, please view the README.txt file. - - -- -+ +@@ -500,7 +475,7 @@ For instructions on how to build JDOM, please view the README.txt file. + - - -@@ -401,6 +392,7 @@ For instructions on how to build JDOM, please view the README.txt file. - - - -+ - + +- + + +@@ -512,8 +487,6 @@ For instructions on how to build JDOM, please view the README.txt file. - -@@ -528,7 +520,25 @@ For instructions on how to build JDOM, please view the README.txt file. + + +- +- + + + +@@ -528,27 +501,6 @@ For instructions on how to build JDOM, please view the README.txt file. - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - +- +- +- +- +- +- +- +- +- +- +- +- +- +- + + + -- -2.17.1 +2.25.2 diff --git a/0002-More-adapt-build-javac-1.8.patch b/0002-More-adapt-build-javac-1.8.patch deleted file mode 100644 index f6ffdcb..0000000 --- a/0002-More-adapt-build-javac-1.8.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/build.xml b/build.xml -index cd7c2ed..f86b76a 100644 ---- a/build.xml -+++ b/build.xml -@@ -47,8 +47,8 @@ For instructions on how to build JDOM, please view the README.txt file. - - - -- -- -+ -+ - - - diff --git a/generate-tarball.sh b/generate-tarball.sh index b869a6b..e864f8b 100755 --- a/generate-tarball.sh +++ b/generate-tarball.sh @@ -9,7 +9,7 @@ wget "https://github.com/hunterhacker/jdom/archive/JDOM-${version}.tar.gz" -O "$ rm -rf tarball-tmp mkdir tarball-tmp -cd tarball-tmp +pushd tarball-tmp tar xf "../${name}-${version}.orig.tar.gz" # CLEAN TARBALL @@ -17,6 +17,6 @@ rm -r */lib */*/lib find -name '*.jar' -delete find -name '*.class' -delete -tar cf "../${name}-${version}.tar.gz" * -cd .. +tar -czf "../${name}-${version}.tar.gz" * +popd rm -r tarball-tmp "${name}-${version}.orig.tar.gz" diff --git a/jdom-contrib-template.pom b/jdom-contrib-template.pom deleted file mode 100644 index d719410..0000000 --- a/jdom-contrib-template.pom +++ /dev/null @@ -1,96 +0,0 @@ - - 4.0.0 - org.jdom - @artifactID@-contrib - jar - - JDOM Contrib - @version@ - - - A complete, Java-based solution for accessing, manipulating, - and outputting XML data - - http://www.jdom.org - - - JDOM - http://www.jdom.org - - - - - JDOM-interest Mailing List - jdom-interest@jdom.org - http://jdom.markmail.org/ - - - - - - Similar to Apache License but with the acknowledgment clause removed - https://raw.github.com/hunterhacker/jdom/master/LICENSE.txt - repo - - - - - - git@github.com:/hunterhacker/jdom - scm:git:git@github.com:hunterhacker/jdom - scm:git:git@github.com:hunterhacker/jdom - - - - - hunterhacker - Jason Hunter - jhunter@servlets.com - - - rolfl - Rolf Lear - jdom@tuis.net - - - - - - org.jdom - @artifactID@ - @version@ - - - jaxen - jaxen - 1.1.4 - true - - - xerces - xercesImpl - 2.10.0 - true - - - isorelax - isorelax - 20030108 - true - - - stax - stax-api - 1.0.1 - true - - - - - @jdk@ - - \ No newline at end of file diff --git a/jdom-junit-template.pom b/jdom-junit-template.pom deleted file mode 100644 index 7bc62f9..0000000 --- a/jdom-junit-template.pom +++ /dev/null @@ -1,120 +0,0 @@ - - 4.0.0 - org.jdom - @artifactID@-junit - jar - - JDOM Junit - @version@ - - - A complete, Java-based solution for accessing, manipulating, - and outputting XML data - - http://www.jdom.org - - - JDOM - http://www.jdom.org - - - - - JDOM-interest Mailing List - jdom-interest@jdom.org - http://jdom.markmail.org/ - - - - - - Similar to Apache License but with the acknowledgment clause removed - https://raw.github.com/hunterhacker/jdom/master/LICENSE.txt - repo - - - - - - git@github.com:/hunterhacker/jdom - scm:git:git@github.com:hunterhacker/jdom - scm:git:git@github.com:hunterhacker/jdom - - - - - hunterhacker - Jason Hunter - jhunter@servlets.com - - - rolfl - Rolf Lear - jdom@tuis.net - - - - - - org.jdom - @artifactID@ - @version@ - - - jaxen - jaxen - 1.1.4 - true - - - xerces - xercesImpl - 2.10.0 - true - - - junit - junit - 4.11 - true - - - asm - asm - 3.3.1 - true - - - asm - asm-tree - 3.3.1 - true - - - org.apache.logging.log4j - log4j-1.2-api - 2.13.3 - true - - - net.sourceforge.cobertura - cobertura - 1.9.4.1 - true - - - net.sourceforge.cobertura - cobertura-runtime - 1.9.4.1 - true - - - - - @jdk@ - - \ No newline at end of file diff --git a/jdom2.spec b/jdom2.spec index 18fdc71..801fc9c 100644 --- a/jdom2.spec +++ b/jdom2.spec @@ -1,14 +1,17 @@ +# Workaround for rhbz#1969370: __bootstrap macro is not defined in +# CentOS Stream, See https://bugzilla.redhat.com/1969370 +%global __bootstrap ~bootstrap + +%bcond_without bootstrap + Name: jdom2 Version: 2.0.6 -Release: 22%{?dist} +Release: 23%{?dist} Summary: Java manipulation of XML made easy License: Saxpath URL: http://www.jdom.org/ # ./generate-tarball.sh Source0: %{name}-%{version}.tar.gz -# originally taken from http://repo1.maven.org/maven2/org/jdom/jdom-contrib/1.1.3/jdom-contrib-1.1.3.pom -Source1: jdom-contrib-template.pom -Source2: jdom-junit-template.pom # Bnd tool configuration Source3: bnd.properties # Remove bundled jars that might not have clear licensing @@ -17,16 +20,14 @@ Source4: generate-tarball.sh # Disable gpg signatures # Process contrib and junit pom files Patch0: 0001-Adapt-build.patch -Patch1: 0002-More-adapt-build-javac-1.8.patch BuildRequires: javapackages-local +%if %{with bootstrap} +BuildRequires: javapackages-bootstrap +%else BuildRequires: ant BuildRequires: ant-junit -BuildRequires: jaxen -BuildRequires: xalan-j2 -BuildRequires: xerces-j2 -BuildRequires: xml-commons-apis -BuildRequires: aqute-bnd +%endif BuildArch: noarch @@ -51,34 +52,28 @@ This package contains javadoc for %{name}. %setup -q -n jdom-JDOM-%{version} %patch0 -p1 -%patch1 -p1 - -cp -p %{SOURCE1} maven/contrib.pom -cp -p %{SOURCE2} maven/junit.pom sed -i 's/\r//' LICENSE.txt README.txt # Unable to run coverage: use log4j12 but switch to log4j 2.x sed -i.coverage "s|coverage, jars|jars|" build.xml -mkdir lib -build-jar-repository lib xerces-j2 xml-commons-apis jaxen junit xalan-j2 xalan-j2-serializer - -# drop optional isorelax verifier support from contrib -rm -r contrib/src/java/org/jdom2/contrib/schema +# XPath functionality is not needed +rm -rf core/src/java/org/jdom2/xpath/ +sed -i '/import org.jdom2.xpath.XPathFactory/d' core/src/java/org/jdom2/JDOMConstants.java %build -ant -Dversion=%{version} -Dj2se.apidoc=%{_javadocdir}/java maven +mkdir lib +%ant -Dversion=%{version} -Dcompile.source=1.6 -Dcompile.target=1.6 -Dj2se.apidoc=%{_javadocdir}/java maven # Make jar into an OSGi bundle -bnd wrap --output build/package/jdom-%{version}.bar --properties %{SOURCE3} \ - --version %{version} build/package/jdom-%{version}.jar -mv build/package/jdom-%{version}.bar build/package/jdom-%{version}.jar +# XXX disabled until BND is fixed +#bnd wrap --output build/package/jdom-%{version}.bar --properties %{SOURCE3} \ +# --version %{version} build/package/jdom-%{version}.jar +#mv build/package/jdom-%{version}.bar build/package/jdom-%{version}.jar %install %mvn_artifact build/maven/core/%{name}-%{version}.pom build/package/jdom-%{version}.jar -%mvn_artifact build/maven/core/%{name}-%{version}-contrib.pom build/package/jdom-%{version}-contrib.jar -%mvn_artifact build/maven/core/%{name}-%{version}-junit.pom build/package/jdom-%{version}-junit.jar %mvn_install -J build/apidocs %files -f .mfiles @@ -89,8 +84,12 @@ mv build/package/jdom-%{version}.bar build/package/jdom-%{version}.jar %license LICENSE.txt %changelog -* Fri Apr 16 2021 Mohan Boddu - 2.0.6-22 -- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 +* Tue Jun 08 2021 Mikolaj Izdebski - 2.0.6-23 +- Bootstrap Maven for CentOS Stream 9 + +* Mon May 17 2021 Mikolaj Izdebski - 2.0.6-22 +- Bootstrap build +- Non-bootstrap build * Tue Jan 26 2021 Fedora Release Engineering - 2.0.6-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild @@ -110,12 +109,21 @@ mv build/package/jdom-%{version}.bar build/package/jdom-%{version}.jar * Thu May 07 2020 Fabio Valentini - 2.0.6-16 - Drop optional isorelax verifier support from contrib. +* Mon Apr 20 2020 Mikolaj Izdebski - 2.0.6-15 +- Disable contrib module + * Wed Jan 29 2020 Fedora Release Engineering - 2.0.6-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild +* Tue Nov 05 2019 Mikolaj Izdebski - 2.0.6-14 +- Mass rebuild for javapackages-tools 201902 + * Thu Jul 25 2019 Fedora Release Engineering - 2.0.6-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild +* Fri May 24 2019 Mikolaj Izdebski - 2.0.6-13 +- Mass rebuild for javapackages-tools 201901 + * Fri Feb 01 2019 Fedora Release Engineering - 2.0.6-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild