From 0ecf7e0e416f9128b74d37e2d9e431af2652004a Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 21:51:51 +0100 Subject: [PATCH] re-add docbook5 support in docbook5-xsl subpackage [release 1.79.2-4mamba;Wed May 19 2021] --- docbook-xsl.spec | 117 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 90 insertions(+), 27 deletions(-) diff --git a/docbook-xsl.spec b/docbook-xsl.spec index ce256cc..59ce1c9 100644 --- a/docbook-xsl.spec +++ b/docbook-xsl.spec @@ -1,6 +1,6 @@ Name: docbook-xsl Version: 1.79.2 -Release: 3mamba +Release: 4mamba Summary: Norman Walsh's XSL stylesheets for DocBook XML Group: Applications/Publishing Vendor: openmamba @@ -10,6 +10,8 @@ URL: https://github.com/docbook/xslt10-stylesheets Source0: https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F%{version}/docbook-xsl-nons-%{version}.tar.bz2 Source1: docbook-xsl-Makefile Source2: https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F{%version}/docbook-xsl-doc-%{version}.tar.bz2 +# Docbook 5 +Source3: https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F{%version}/docbook-xsl-%{version}.tar.bz2 Patch0: docbook-xsl-1.79.2-marginleft.patch Patch1: docbook-xsl-listblock.patch Patch2: docbook-xsl-1.79.2-non-recursive-string-subst.patch @@ -25,13 +27,32 @@ License: Distributable Requires(post): libxml2-utils Requires(postun): libxml2-utils Requires: docbook-dtds >= 1.0 +Requires: xml-common BuildArch: noarch %description These XSL stylesheets allow you to transform any DocBook XML document to other formats, such as HTML, FO, and XHMTL. They are highly customizable. +%package -n docbook5-xsl +Group: Applications/Publishing +Summary: Norman Walsh's XSL stylesheets for DocBook 5.X +Requires(post): libxml2 >= 2.4.8 +Requires(postun): libxml2 >= 2.4.8 +Requires: docbook5-schemas >= 5.1 + +%description -n docbook5-xsl +These XSL stylesheets allow you to transform any DocBook 5 XML document to other formats, such as HTML, FO, and XHMTL. They are highly customizable. + +%package -n docbook5-xsl-extensions +Group: Applications/Publishing +Summary: Norman Walsh's XSL stylesheets Java extensions for DocBook 5.X +Requires: docbook5-xsl = %{?epoch:%epoch:}%{version}-%{release} + +%description -n docbook5-xsl-extensions +This package contains Java extensions for XSL namespace aware stylesheets. + %prep -%setup -q -n docbook-xsl-nons-%{version} -a2 +%setup -q -n docbook-xsl-nons-%{version} -a2 -a3 mv docbook-xsl-%{version}/doc . %patch0 -p1 -b .marginleft @@ -57,6 +78,12 @@ for f in $(find -name "*'*"); do mv -v "$f" $(echo "$f" | tr -d "'") done +# Docbook 5 +cd %{name}-%{version} +rm -rf $(find -name '.gitignore' -type f) +#make ruby scripts executable +chmod +x epub/bin/dbtoepub + %build %install @@ -71,34 +98,22 @@ make install \ cp -a VERSION.xsl %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}/VERSION.xsl ln -s xsl-stylesheets-%{version} \ %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets - + # Don't ship the extensions (bug #177256). rm -rf %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets/extensions/* - -:<< __OLD -install -d %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-%{version} -for d in common docsrc eclipse epub extensions fo highlighting html \ - htmlhelp images javahelp lib manpages params profiling roundtrip \ - slides template tests tools website xhtml; do - cp -a $d %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-%{version} -done -cp catalog.xml %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}/catalog -cp VERSION %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}/VERSION.xsl -ln -s VERSION.xsl %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}/VERSION -cd docbook-xsl-nons-%{version} -install -d %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-ns-%{version} -for d in common docsrc eclipse epub extensions fo highlighting html \ - htmlhelp images javahelp lib manpages params profiling roundtrip \ - slides template tests website xhtml xhtml-1_1; do - cp -a $d %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-ns-%{version} -done -cp catalog.xml %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-ns-%{version}/catalog -cp VERSION %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-ns-%{version}/VERSION.xsl -ln -s VERSION.xsl %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-ns-%{version}/VERSION +# Docbook 5 +cd %{name}-%{version} +mkdir -p %{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%version +cp -a [[:lower:]]* %{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%version/ +cp -a VERSION %{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%version/VERSION.xsl +ln -s VERSION.xsl \ +%{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%version/VERSION +ln -s xsl-ns-stylesheets-%{version} \ + %{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets -ln -s xsl-stylesheets-%{version} %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets -ln -s xsl-stylesheets-ns-%{version} %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-ns +# Don't ship install shell script. +rm -rf %{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets/install.sh %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -136,15 +151,63 @@ if [ $1 -eq 0 ]; then fi : +%post -n docbook5-xsl +CATALOG=%{_sysconfdir}/xml/catalog +%{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ + "http://cdn.docbook.org/release/xsl/%{version}" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteURI" \ + "http://cdn.docbook.org/release/xsl/%{version}" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ + "http://cdn.docbook.org/release/xsl/current/" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteURI" \ + "http://cdn.docbook.org/release/xsl/current/" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG + +%{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ + "http://docbook.sourceforge.net/release/xsl-ns/current" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteURI" \ + "http://docbook.sourceforge.net/release/xsl-ns/current" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG +: + +%postun -n docbook5-xsl +# remove entries only on removal of package +if [ "$1" = 0 ]; then + CATALOG=%{_sysconfdir}/xml/catalog + %{_bindir}/xmlcatalog --noout --del \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG +fi +: + %files %defattr(-,root,root) %{_datadir}/sgml/docbook/xsl-stylesheets %dir %{_datadir}/sgml/docbook/xsl-stylesheets-%{version} %{_datadir}/sgml/docbook/xsl-stylesheets-%{version}/* %doc COPYING -#%doc BUGS README RELEASE-NOTES.* TODO doc docsrc + +%files -n docbook5-xsl +%defattr(-,root,root) +%dir %{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version} +%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}/* +%{_datadir}/sgml/docbook/xsl-ns-stylesheets +%exclude %{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}/extensions +%doc %{name}-%{version}/COPYING + +%files -n docbook5-xsl-extensions +%defattr(-,root,root) +%dir %{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}/extensions +%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}/extensions/* +%doc %{name}-%{version}/extensions/LICENSE.txt %changelog +* Wed May 19 2021 Silvan Calarco 1.79.2-4mamba +- re-add docbook5 support in docbook5-xsl subpackage + * Sat May 15 2021 Silvan Calarco 1.79.2-3mamba - rebuilt with Fedora patches and recipe