SHA256
1
0
forked from pool/jdom2
jdom2/jdom2.spec

101 lines
3.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package jdom2
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: jdom2
Version: 2.0.6
Release: 0
Summary: Java manipulation of XML made easy
License: Saxpath
Group: Development/Libraries/Java
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
# Remove bundled jars that might not have clear licensing
Source4: generate-tarball.sh
# Use system libraries
# Disable gpg signatures
# Process contrib and junit pom files
Patch0: 0001-Adapt-build.patch
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: fdupes
BuildRequires: isorelax
BuildRequires: javapackages-local
BuildRequires: jaxen
BuildRequires: log4j
BuildRequires: xalan-j2
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
BuildArch: noarch
%description
JDOM is a Java-oriented object model which models XML documents.
It provides a Java-centric means of generating and manipulating
XML documents. While JDOM inter-operates well with existing
standards such as the Simple API for XML (SAX) and the Document
Object Model (DOM), it is not an abstraction layer or
enhancement to those APIs. Rather, it seeks to provide a robust,
light-weight means of reading and writing XML data without the
complex and memory-consumptive options that current API
offerings provide.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Libraries/Java
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n jdom-JDOM-%{version}
%patch0 -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 isorelax xalan-j2 xalan-j2-serializer
%build
ant -Dversion=%{version} -Dcompile.target=6 -Dcompile.source=6 -Dj2se.apidoc=%{_javadocdir}/java maven
%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
%fdupes %{buildroot}%{_javadocdir}
%files -f .mfiles
%doc CHANGES.txt COMMITTERS.txt README.txt TODO.txt
%license LICENSE.txt
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%changelog