2024-09-22 09:46:11 +00:00
|
|
|
#
|
|
|
|
# spec file for package xml-stylebook
|
|
|
|
#
|
|
|
|
# Copyright (c) 2024 SUSE LLC
|
|
|
|
#
|
|
|
|
# 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: xml-stylebook
|
|
|
|
Version: 1.0~b3_xalan2
|
|
|
|
Release: 0
|
|
|
|
Summary: Apache XML Stylebook
|
|
|
|
License: Apache-1.1
|
|
|
|
URL: https://xml.apache.org/
|
|
|
|
Source0: %{name}-%{version}.tar.xz
|
|
|
|
Patch0: %{name}-image-printer.patch
|
|
|
|
Patch1: %{name}-build-javadoc.patch
|
|
|
|
BuildRequires: ant
|
|
|
|
BuildRequires: dejavu-fonts
|
2024-09-22 10:00:13 +00:00
|
|
|
BuildRequires: fdupes
|
2024-09-22 09:46:11 +00:00
|
|
|
BuildRequires: java-devel >= 1.8
|
|
|
|
BuildRequires: javapackages-local
|
2024-09-22 10:32:25 +00:00
|
|
|
BuildRequires: xerces-j2
|
2024-09-22 10:00:13 +00:00
|
|
|
BuildRequires: xml-commons-apis-bootstrap
|
2024-09-22 09:46:11 +00:00
|
|
|
Requires: xerces-j2
|
2024-09-22 13:53:01 +00:00
|
|
|
Requires: xml-apis
|
2024-09-22 09:46:11 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
Apache XML Stylebook is a HTML documentation generator.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: API documentation for %{name}
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
%package demo
|
|
|
|
Summary: Examples for %{name}
|
2024-09-22 10:00:13 +00:00
|
|
|
Requires: %{name} = %{version}
|
2024-09-22 09:46:11 +00:00
|
|
|
|
|
|
|
%description demo
|
|
|
|
Examples demonstrating the use of %{name}.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch -P 0
|
|
|
|
%patch -P 1
|
|
|
|
|
|
|
|
%build
|
2024-09-22 13:53:01 +00:00
|
|
|
%{ant} \
|
2024-09-22 09:46:11 +00:00
|
|
|
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
|
2024-09-22 10:00:13 +00:00
|
|
|
-Dversion-xalan-2=%{version} \
|
2024-09-22 10:32:25 +00:00
|
|
|
-Dclasspath=$(build-classpath xml-apis xerces-j2)
|
2024-09-22 09:46:11 +00:00
|
|
|
|
|
|
|
# Build the examples (this serves as a good test suite)
|
|
|
|
pushd docs
|
2024-09-22 10:32:25 +00:00
|
|
|
java -classpath "$(build-classpath xml-apis xerces-j2):../bin/stylebook-%{version}.jar" \
|
2024-09-22 09:46:11 +00:00
|
|
|
org.apache.stylebook.StyleBook "targetDirectory=../results" book.xml ../styles/apachexml
|
|
|
|
popd
|
|
|
|
|
|
|
|
%install
|
|
|
|
# jars
|
2024-09-22 10:00:13 +00:00
|
|
|
install -dm 0755 %{buildroot}%{_javadir}
|
|
|
|
install -pm 0644 bin/stylebook-%{version}.jar \
|
2024-09-22 09:46:11 +00:00
|
|
|
%{buildroot}%{_javadir}/%{name}.jar
|
|
|
|
|
|
|
|
# javadoc
|
2024-09-22 10:00:13 +00:00
|
|
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
2024-09-22 09:46:11 +00:00
|
|
|
cp -pr build/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
2024-09-22 10:00:13 +00:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
2024-09-22 09:46:11 +00:00
|
|
|
|
|
|
|
# examples
|
2024-09-22 10:00:13 +00:00
|
|
|
install -dm 0755 %{buildroot}%{_datadir}/%{name}
|
2024-09-22 09:46:11 +00:00
|
|
|
cp -pr docs %{buildroot}%{_datadir}/%{name}
|
|
|
|
cp -pr styles %{buildroot}%{_datadir}/%{name}
|
|
|
|
cp -pr results %{buildroot}%{_datadir}/%{name}
|
2024-09-22 10:00:13 +00:00
|
|
|
%fdupes -s %{buildroot}%{_datadir}/%{name}
|
2024-09-22 09:46:11 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE.txt
|
2024-09-22 10:00:13 +00:00
|
|
|
%{_javadir}/%{name}.jar
|
2024-09-22 09:46:11 +00:00
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%license LICENSE.txt
|
|
|
|
%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%files demo
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|