Blame SPECS/jdom2.spec

c2fefa
%{?scl:%scl_package jdom2}
c2fefa
%{!?scl:%global pkg_name %{name}}
c2fefa
c2fefa
Name:          %{?scl_prefix}jdom2
c2fefa
Version:       2.0.6
c2fefa
Release:       7.2%{?dist}
c2fefa
Summary:       Java manipulation of XML made easy
c2fefa
License:       ASL 1.1 or BSD
c2fefa
URL:           http://www.jdom.org/
c2fefa
Source0:       https://github.com/hunterhacker/jdom/archive/JDOM-%{version}.tar.gz
c2fefa
# originally taken from http://repo1.maven.org/maven2/org/jdom/jdom-contrib/1.1.3/jdom-contrib-1.1.3.pom
c2fefa
Source1:       jdom-contrib-template.pom
c2fefa
Source2:       jdom-junit-template.pom
c2fefa
# Bnd tool configuration
c2fefa
Source3:       bnd.properties
c2fefa
# Use system libraries
c2fefa
# Disable gpg signatures
c2fefa
# Process contrib and junit pom files
c2fefa
Patch0:        jdom-2.0.5-build.patch
c2fefa
c2fefa
BuildRequires: %{?scl_prefix}javapackages-local
c2fefa
BuildRequires: %{?scl_prefix}ant
c2fefa
BuildRequires: %{?scl_prefix}ant-junit
c2fefa
BuildRequires: %{?scl_prefix}bea-stax-api
c2fefa
BuildRequires: %{?scl_prefix}isorelax
c2fefa
BuildRequires: %{?scl_prefix}jaxen
c2fefa
BuildRequires: %{?scl_prefix}xalan-j2
c2fefa
BuildRequires: %{?scl_prefix}xerces-j2
c2fefa
BuildRequires: %{?scl_prefix}xml-commons-apis
c2fefa
BuildRequires: %{?scl_prefix}log4j12
c2fefa
BuildRequires: %{?scl_prefix}objectweb-asm3
c2fefa
BuildRequires: %{?scl_prefix}aqute-bnd
c2fefa
c2fefa
BuildArch:     noarch
c2fefa
c2fefa
%description
c2fefa
JDOM is a Java-oriented object model which models XML documents.
c2fefa
It provides a Java-centric means of generating and manipulating
c2fefa
XML documents. While JDOM inter-operates well with existing
c2fefa
standards such as the Simple API for XML (SAX) and the Document
c2fefa
Object Model (DOM), it is not an abstraction layer or
c2fefa
enhancement to those APIs. Rather, it seeks to provide a robust,
c2fefa
light-weight means of reading and writing XML data without the
c2fefa
complex and memory-consumptive options that current API
c2fefa
offerings provide.
c2fefa
c2fefa
%package javadoc
c2fefa
Summary:       Javadoc for %{pkg_name}
c2fefa
c2fefa
%description javadoc
c2fefa
This package contains javadoc for %{pkg_name}.
c2fefa
c2fefa
%prep
c2fefa
%setup -q -n jdom-JDOM-%{version}
c2fefa
find . -name "*.class" -print -delete
c2fefa
find . -name "*.jar" -print -delete
c2fefa
c2fefa
%patch0 -p1
c2fefa
c2fefa
cp -p %{SOURCE1} maven/contrib.pom
c2fefa
cp -p %{SOURCE2} maven/junit.pom
c2fefa
c2fefa
sed -i 's/\r//' LICENSE.txt README.txt
c2fefa
c2fefa
# Unable to run coverage: use log4j12 but switch to log4j 2.x
c2fefa
sed -i.coverage "s|coverage, jars|jars|" build.xml
c2fefa
c2fefa
build-jar-repository lib xerces-j2 xml-commons-apis jaxen junit isorelax xalan-j2 xalan-j2-serializer
c2fefa
c2fefa
%build
c2fefa
ant -Dversion=%{version} -Dj2se.apidoc=%{_javadocdir}/java maven
c2fefa
c2fefa
# Make jar into an OSGi bundle
c2fefa
bnd wrap --output build/package/jdom-%{version}.bar --properties %{SOURCE3} \
c2fefa
         --version %{version} build/package/jdom-%{version}.jar
c2fefa
mv build/package/jdom-%{version}.bar build/package/jdom-%{version}.jar
c2fefa
c2fefa
%install
c2fefa
%mvn_artifact build/maven/core/%{pkg_name}-%{version}.pom build/package/jdom-%{version}.jar
c2fefa
%mvn_artifact build/maven/core/%{pkg_name}-%{version}-contrib.pom build/package/jdom-%{version}-contrib.jar
c2fefa
%mvn_artifact build/maven/core/%{pkg_name}-%{version}-junit.pom build/package/jdom-%{version}-junit.jar
c2fefa
%mvn_install -J build/apidocs
c2fefa
c2fefa
%files -f .mfiles
c2fefa
%doc CHANGES.txt COMMITTERS.txt README.txt TODO.txt
c2fefa
%license LICENSE.txt
c2fefa
c2fefa
%files javadoc -f .mfiles-javadoc
c2fefa
%license LICENSE.txt
c2fefa
c2fefa
%changelog
c2fefa
* Thu Jun 22 2017 Michael Simacek <msimacek@redhat.com> - 2.0.6-7.2
c2fefa
- Mass rebuild 2017-06-22
c2fefa
c2fefa
* Wed Jun 21 2017 Java Maintainers <java-maint@redhat.com> - 2.0.6-7.1
c2fefa
- Automated package import and SCL-ization
c2fefa
c2fefa
* Wed May 31 2017 Michael Simacek <msimacek@redhat.com> - 2.0.6-7
c2fefa
- Avoid hardcoded jar paths
c2fefa
c2fefa
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-7
c2fefa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c2fefa
c2fefa
* Thu Apr 14 2016 Mat Booth <mat.booth@redhat.com> - 2.0.6-6
c2fefa
- Add OSGi metadata to main jar
c2fefa
- Fix file listed twice warning
c2fefa
c2fefa
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-5
c2fefa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c2fefa
c2fefa
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6-4
c2fefa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c2fefa
c2fefa
* Tue Mar 24 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.6-3
c2fefa
- Remove unneeded BR on cobertura
c2fefa
c2fefa
* Fri Feb 06 2015 gil cattaneo <puntogil@libero.it> 2.0.6-2
c2fefa
- introduce license macro
c2fefa
c2fefa
* Tue Oct 21 2014 gil cattaneo <puntogil@libero.it> 2.0.6-1
c2fefa
- update to 2.0.6 (rhbz#1118627)
c2fefa
c2fefa
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.5-4
c2fefa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c2fefa
c2fefa
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 2.0.5-3
c2fefa
- Use Requires: java-headless rebuild (#1067528)
c2fefa
c2fefa
* Thu Nov 14 2013 gil cattaneo <puntogil@libero.it> 2.0.5-2
c2fefa
- use objectweb-asm3
c2fefa
c2fefa
* Thu Sep 12 2013 gil cattaneo <puntogil@libero.it> 2.0.5-1
c2fefa
- initial rpm