forked from pool/dom4j
117 lines
3.3 KiB
RPMSpec
117 lines
3.3 KiB
RPMSpec
#
|
|
# spec file for package dom4j
|
|
#
|
|
# Copyright (c) 2023 SUSE LLC
|
|
# Copyright (c) 2000-2007, JPackage Project
|
|
#
|
|
# 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: dom4j
|
|
Version: 2.0.3
|
|
Release: 0
|
|
Summary: Open Source XML framework for Java
|
|
License: BSD-3-Clause
|
|
URL: https://dom4j.github.io/
|
|
Source0: %{name}-%{version}.tar.xz
|
|
Source1: https://repo1.maven.org/maven2/org/%{name}/%{name}/%{version}/%{name}-%{version}.pom
|
|
Source2: %{name}-build.xml
|
|
BuildRequires: ant
|
|
BuildRequires: fdupes
|
|
BuildRequires: glassfish-jaxb-api
|
|
BuildRequires: javapackages-local
|
|
BuildRequires: jaxen-bootstrap
|
|
Obsoletes: %{name}-manual < %{version}
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
dom4j is an Open Source XML framework for Java. dom4j allows you to read,
|
|
write, navigate, create and modify XML documents. dom4j integrates with
|
|
DOM and SAX and is seamlessly integrated with full XPath support.
|
|
|
|
%package demo
|
|
Summary: Open Source XML framework for Java - demo
|
|
Group: Development/Libraries/Java
|
|
Requires: %{name} = %{version}
|
|
|
|
%description demo
|
|
dom4j is an Open Source XML framework for Java. dom4j allows you to read,
|
|
write, navigate, create and modify XML documents. dom4j integrates with
|
|
DOM and SAX and is seamlessly integrated with full XPath support.
|
|
|
|
%package javadoc
|
|
Summary: Javadoc for %{name}
|
|
|
|
%description javadoc
|
|
Javadoc for %{name}.
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
cp %{SOURCE1} pom.xml
|
|
cp %{SOURCE2} build.xml
|
|
|
|
# Remove xpp2 support
|
|
rm -r src/main/java/org/dom4j/xpp
|
|
rm src/main/java/org/dom4j/io/XPPReader.java
|
|
|
|
# Remove datatype code which depends on msv
|
|
rm -r src/main/java/org/dom4j/datatype
|
|
%pom_remove_dep net.java.dev.msv:xsdlib
|
|
|
|
# Remove xpp3 support
|
|
rm src/main/java/org/dom4j/io/XPP3Reader.java
|
|
%pom_remove_dep xpp3:xpp3
|
|
%pom_remove_dep pull-parser:pull-parser
|
|
%pom_remove_dep javax.xml.stream:stax-api
|
|
|
|
%build
|
|
mkdir -p lib
|
|
build-jar-repository -s lib jaxen glassfish-jaxb-api
|
|
%{ant} jar javadoc
|
|
|
|
%install
|
|
|
|
# jar
|
|
install -dm 0755 %{buildroot}%{_javadir}
|
|
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
|
|
|
# pom
|
|
install -dm 0755 %{buildroot}%{_mavenpomdir}
|
|
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
|
%add_maven_depmap %{name}.pom %{name}.jar -a %{name}:%{name}
|
|
|
|
# javadoc
|
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
|
cp -r target/site/apidocs %{buildroot}%{_javadocdir}/%{name}
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
# demo
|
|
install -dm 0755 %{buildroot}%{_datadir}/%{name}/src
|
|
cp -pr xml %{buildroot}%{_datadir}/%{name}
|
|
cp -pr src/example %{buildroot}%{_datadir}/%{name}/src
|
|
%fdupes -s %{buildroot}%{_datadir}/%{name}
|
|
|
|
%files -f .mfiles
|
|
%license LICENSE
|
|
%doc README.md
|
|
|
|
%files demo
|
|
%{_datadir}/%{name}
|
|
|
|
%files javadoc
|
|
%license LICENSE
|
|
%{_javadocdir}/%{name}
|
|
|
|
%changelog
|