Drop unused tools directory, limit Java dependencies

As best as I can determine, the tools directory contains only internal
build infrastructure that we are not using, and any JARs therein are not
needed when building documentation with this package.  Dropping the unused
Java dependencies makes this usable on i686 again.

The JARs in extensions are designed to be used in conjunction with the
webhelp directory to create webhelp indexes, but the sources for
webhelpindexer.jar, while available upstream, are not shipped.  (It would
probably make more sense to be shipped as a separate package in any case.)
As such, the extensions subpackage must remain disabled.  While it could be
argued that webhelp should be packaged in extensions, it is still partly
usable as a plain XSL, so it is left alone.

Resolves: RHEL-37894
This commit is contained in:
Yaakov Selkowitz 2024-07-24 08:57:23 -04:00
parent cdcc1b5b31
commit 147c8dd152

View File

@ -1,6 +1,12 @@
# Don't ship Java extensions in Fedora as they are not compiled from the source
# Shipping sources instead of binary jars was requested by
# https://lists.oasis-open.org/archives/docbook-apps/201408/msg00008.html
# Sources available in the docbook stylesheets svn repository, but not packaged.
%bcond extensions 0
Name: docbook5-style-xsl
Version: 1.79.2
Release: 20%{?dist}
Release: 21%{?dist}
Summary: Norman Walsh's XSL stylesheets for DocBook 5.X
@ -17,24 +23,6 @@ Requires(post): libxml2 >= 2.4.8
Requires(postun): libxml2 >= 2.4.8
Conflicts: passivetex < 1.21
# Provide an alternative to removed JAR files via Fedora Packages
# lucene-core.jar (lucene-core-3.0.0.jar), lucene-analysis-common.jar (lucene-analyzers-3.0.0.jar)
Requires: lucene-core lucene-analysis-common
# ant-apache-xalan2.jar (xalan27.jar)
Requires: ant-apache-xalan2
# tagsoup.jar (tagsoup-1.2.1.jar)
Requires: tagsoup
# apache-commons-codec.jar (commons-codec-1.3.jar), apache-commons-logging.jar (commons-logging-1.1.1.jar)
Requires: apache-commons-codec apache-commons-logging
# xml-commons-apis.jar (xml-apis.jar), xml-commons-resolver.jar (xmlresolver.jar)
Requires: xml-commons-apis xml-commons-resolver
# xerces-j2.jar (xercesImpl.jar)
Requires: xerces-j2
# xalan-j2.jar, xalan-j2-serializer.jar,jaxp_transform_impl.jar, xsltc.jar (xsltc.jar, xalan.jar, serializer.jar)
Requires: xalan-j2 xalan-j2-xsltc
# ant-contrib.jar (ant-contrib-1.0b3.jar)
Requires: ant-contrib
BuildArch: noarch
Source0: https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F{%version}/docbook-xsl-%{version}.tar.bz2
@ -44,17 +32,20 @@ DocBook 5 document to other formats, such as HTML, manpages, FO,
XHMTL and other formats. They are highly customizable. For more
information see W3C page about XSL.
# Don't ship Java extensions in Fedora as they are not compiled from the source
# Shiping sources instead of binary jars was requested by
# https://lists.oasis-open.org/archives/docbook-apps/201408/msg00008.html
# Sources available in the docbook stylesheets svn repository, but not packaged.
%if 0%{?rhel} >= 7
%if %{with extensions}
%package extensions
Summary: Norman Walsh's XSL stylesheets extensions for DocBook 5.X
# Package is licensed as MIT/X (http://wiki.docbook.org/topic/DocBookLicense),
# some .js files under ./slides/browser/ are licensed MPLv1.1
License: MIT and ASL 2.0
Requires: docbook-xsl-ns = %{version}
# Provide an alternative to removed JAR files via Fedora Packages
# lucene-core.jar (lucene-core-3.0.0.jar), lucene-analysis-common.jar (lucene-analyzers-3.0.0.jar)
Requires: lucene-core lucene-analysis-common
# ant-apache-xalan2.jar (xalan27.jar)
Requires: ant-apache-xalan2
# tagsoup.jar (tagsoup-1.2.1.jar)
Requires: tagsoup
%description extensions
This package contains Java extensions for XSL namespace aware stylesheets.
@ -66,9 +57,12 @@ This package contains Java extensions for XSL namespace aware stylesheets.
# Remove .gitignore files
rm -rf $(find -name '.gitignore' -type f)
# Remove ant buildsystem
find . -name build.xml -delete
# Remove binary JAR files
rm -f extensions/*.jar
rm -f tools/lib/*.jar
rm -fr tools/
# Make ruby scripts executable
chmod +x epub/bin/dbtoepub
@ -101,7 +95,7 @@ rm -rf $DESTDIR%{_datadir}/sgml/docbook/xsl-ns-stylesheets/install.sh
%{_datadir}/sgml/docbook/xsl-ns-stylesheets
%exclude %{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}/extensions
%if 0%{?rhel} >= 7
%if %{with extensions}
%files extensions
%doc extensions/README.txt extensions/LICENSE.txt
%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}/extensions
@ -138,6 +132,10 @@ if [ "$1" = 0 ]; then
fi
%changelog
* Wed Jul 24 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 1.79.2-21
- Drop unused tools directory
- Limit Java dependency to extensions subpackage
* Sat Jun 29 2024 Ondrej Sloup <osloup@redhat.com> - 1.79.2-20
- Remove binary JAR files and replace them with available dependencies
- Related: RHEL-37894