81b422c
%bcond_with bootstrap
9e7c203
45c2054
Name:          jdom2
897a20a
Version:       2.0.6
ddf6113
Release:       27%{?dist}
45c2054
Summary:       Java manipulation of XML made easy
ac6ae44
License:       Saxpath
45c2054
URL:           http://www.jdom.org/
ac6ae44
# ./generate-tarball.sh
ac6ae44
Source0:       %{name}-%{version}.tar.gz
861e2cb
# Bnd tool configuration
861e2cb
Source3:       bnd.properties
ac6ae44
# Remove bundled jars that might not have clear licensing
ac6ae44
Source4:       generate-tarball.sh
45c2054
# Use system libraries
45c2054
# Disable gpg signatures
45c2054
# Process contrib and junit pom files
ac6ae44
Patch0:        0001-Adapt-build.patch
45c2054
Nicolas Lécureuil 0f87153
#
Nicolas Lécureuil 0f87153
# Security patches
Nicolas Lécureuil 0f87153
# P100 -> ...
Nicolas Lécureuil 0f87153
#
Nicolas Lécureuil 0f87153
# CVE-2021-33813
Nicolas Lécureuil 0f87153
Patch100:      bd3ab78370098491911d7fe9d7a43b97144a234e.patch
Nicolas Lécureuil 0f87153
Patch101:      dd4f3c2fc7893edd914954c73eb577f925a7d361.patch
Nicolas Lécureuil 0f87153
Patch102:      07f316957b59d305f04c7bdb26292852bcbc2eb5.patch
Nicolas Lécureuil 0f87153
897a20a
BuildRequires: javapackages-local
9e7c203
%if %{with bootstrap}
9e7c203
BuildRequires:  javapackages-bootstrap
9e7c203
%else
45c2054
BuildRequires: ant
45c2054
BuildRequires: ant-junit
9e7c203
%endif
45c2054
45c2054
BuildArch:     noarch
45c2054
45c2054
%description
45c2054
JDOM is a Java-oriented object model which models XML documents.
45c2054
It provides a Java-centric means of generating and manipulating
45c2054
XML documents. While JDOM inter-operates well with existing
45c2054
standards such as the Simple API for XML (SAX) and the Document
45c2054
Object Model (DOM), it is not an abstraction layer or
45c2054
enhancement to those APIs. Rather, it seeks to provide a robust,
45c2054
light-weight means of reading and writing XML data without the
45c2054
complex and memory-consumptive options that current API
45c2054
offerings provide.
45c2054
45c2054
%package javadoc
45c2054
Summary:       Javadoc for %{name}
45c2054
45c2054
%description javadoc
45c2054
This package contains javadoc for %{name}.
45c2054
45c2054
%prep
45c2054
%setup -q -n jdom-JDOM-%{version}
45c2054
4447624
%patch0 -p1
45c2054
Nicolas Lécureuil 0f87153
%patch100 -p1
Nicolas Lécureuil 0f87153
%patch101 -p1
Nicolas Lécureuil 0f87153
%patch102 -p1
Nicolas Lécureuil 0f87153
45c2054
sed -i 's/\r//' LICENSE.txt README.txt
45c2054
548e7ce
# Unable to run coverage: use log4j12 but switch to log4j 2.x
548e7ce
sed -i.coverage "s|coverage, jars|jars|" build.xml
548e7ce
b82e468
# XPath functionality is not needed
b82e468
rm -rf core/src/java/org/jdom2/xpath/
b82e468
sed -i '/import org.jdom2.xpath.XPathFactory/d' core/src/java/org/jdom2/JDOMConstants.java
4447624
45c2054
%build
ac6ae44
mkdir lib
b642155
%ant -Dversion=%{version} -Dcompile.source=1.7 -Dcompile.target=1.7 -Dj2se.apidoc=%{_javadocdir}/java maven
45c2054
861e2cb
# Make jar into an OSGi bundle
55aae16
# XXX disabled until BND is fixed
55aae16
#bnd wrap --output build/package/jdom-%{version}.bar --properties %{SOURCE3} \
55aae16
#         --version %{version} build/package/jdom-%{version}.jar
55aae16
#mv build/package/jdom-%{version}.bar build/package/jdom-%{version}.jar
861e2cb
45c2054
%install
897a20a
%mvn_artifact build/maven/core/%{name}-%{version}.pom build/package/jdom-%{version}.jar
897a20a
%mvn_install -J build/apidocs
45c2054
aa3c40f
%files -f .mfiles
294d84b
%doc CHANGES.txt COMMITTERS.txt README.txt TODO.txt
294d84b
%license LICENSE.txt
45c2054
897a20a
%files javadoc -f .mfiles-javadoc
294d84b
%license LICENSE.txt
45c2054
45c2054
%changelog
ddf6113
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 2.0.6-27
ddf6113
- Rebuilt for java-17-openjdk as system jdk
ddf6113
c2ac5b7
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-26
c2ac5b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
c2ac5b7
b642155
* Tue Nov 02 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.6-25
b642155
- Bump Java compiler source/target levels to 1.7
b642155
186d8c0
* Thu Oct 14 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.6-24
186d8c0
- Add patches to address DoS security vulnerability
186d8c0
- Resolves: CVE-2021-33813
186d8c0
c9b09d3
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-23
c9b09d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
c9b09d3
42cf32c
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.6-22
42cf32c
- Bootstrap build
81b422c
- Non-bootstrap build
42cf32c
01fd63a
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-21
01fd63a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
01fd63a
edd3ffd
* Thu Sep 10 2020 Fabio Valentini <decathorpe@gmail.com> - 2.0.6-20
edd3ffd
- Drop log4j12 dependency and switch junit module to log4j 1.2 API shim.
edd3ffd
fa0c0f3
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-19
fa0c0f3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
fa0c0f3
060ee7a
* Sun Jul 19 2020 Fabio Valentini <decathorpe@gmail.com> - 2.0.6-18
060ee7a
- Set javac source and target to 1.8 to fix Java 11 builds.
060ee7a
cb6b88c
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 2.0.6-17
cb6b88c
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
cb6b88c
bb2ab73
* Thu May 07 2020 Fabio Valentini <decathorpe@gmail.com> - 2.0.6-16
bb2ab73
- Drop optional isorelax verifier support from contrib.
bb2ab73
56c0a7a
* Mon Apr 20 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.6-15
56c0a7a
- Disable contrib module
56c0a7a
1b97f5c
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-15
1b97f5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
1b97f5c
13d138c
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.6-14
13d138c
- Mass rebuild for javapackages-tools 201902
13d138c
7e4c9ed
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-14
7e4c9ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7e4c9ed
cddc131
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.6-13
cddc131
- Mass rebuild for javapackages-tools 201901
cddc131
7616fa2
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-13
7616fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7616fa2
ac6ae44
* Mon Jul 23 2018 Michael Simacek <msimacek@redhat.com> - 2.0.6-12
ac6ae44
- Repack tarball without bundled jars
ac6ae44
- The repacked jar contains slightly different source (force push by upstream?)
ac6ae44
- Correct license tag
ac6ae44
313c1e7
* Tue Jul 17 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.6-11
313c1e7
- Remove unneeded buildrequires
313c1e7
f28277d
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-10
f28277d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f28277d
3be14ee
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-9
3be14ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3be14ee
dd111c1
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-8
dd111c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
dd111c1
4447624
* Wed May 31 2017 Michael Simacek <msimacek@redhat.com> - 2.0.6-7
4447624
- Avoid hardcoded jar paths
4447624
da19e0b
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-7
da19e0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
da19e0b
861e2cb
* Thu Apr 14 2016 Mat Booth <mat.booth@redhat.com> - 2.0.6-6
861e2cb
- Add OSGi metadata to main jar
861e2cb
- Fix file listed twice warning
861e2cb
f8934d1
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-5
f8934d1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f8934d1
3d0de68
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6-4
3d0de68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
3d0de68
e4682a3
* Tue Mar 24 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.6-3
e4682a3
- Remove unneeded BR on cobertura
e4682a3
294d84b
* Fri Feb 06 2015 gil cattaneo <puntogil@libero.it> 2.0.6-2
294d84b
- introduce license macro
294d84b
897a20a
* Tue Oct 21 2014 gil cattaneo <puntogil@libero.it> 2.0.6-1
897a20a
- update to 2.0.6 (rhbz#1118627)
897a20a
e147d30
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.5-4
e147d30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
e147d30
b98301b
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 2.0.5-3
b98301b
- Use Requires: java-headless rebuild (#1067528)
b98301b
59e8589
* Thu Nov 14 2013 gil cattaneo <puntogil@libero.it> 2.0.5-2
59e8589
- use objectweb-asm3
59e8589
45c2054
* Thu Sep 12 2013 gil cattaneo <puntogil@libero.it> 2.0.5-1
294d84b
- initial rpm