| 1 | Name: docbook-style-xsl
|
|---|
| 2 | Version: 1.79.2
|
|---|
| 3 | Release: 2%{?dist}
|
|---|
| 4 | Group: Applications/Text
|
|---|
| 5 |
|
|---|
| 6 | Summary: Norman Walsh's XSL stylesheets for DocBook XML
|
|---|
| 7 |
|
|---|
| 8 | License: DMIT
|
|---|
| 9 | URL: https://github.com/docbook/xslt10-stylesheets
|
|---|
| 10 | Vendor: bww bitwise works GmbH
|
|---|
| 11 |
|
|---|
| 12 | Provides: docbook-xsl = %{version}
|
|---|
| 13 | Requires: docbook-dtd-xml
|
|---|
| 14 | # xml-common was using /usr/share/xml until 0.6.3-8.
|
|---|
| 15 | Requires: xml-common >= 0.6.3-8
|
|---|
| 16 | # libxml2 required because of usage of /usr/bin/xmlcatalog
|
|---|
| 17 | Requires(post): libxml2 >= 2.4.8
|
|---|
| 18 | Requires(postun): libxml2 >= 2.4.8
|
|---|
| 19 | # PassiveTeX before 1.21 can't handle the newer stylesheets.
|
|---|
| 20 | Conflicts: passivetex < 1.21
|
|---|
| 21 |
|
|---|
| 22 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|---|
| 23 |
|
|---|
| 24 | BuildArch: noarch
|
|---|
| 25 | Source0: https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F{%version}/docbook-xsl-nons-%{version}.tar.bz2
|
|---|
| 26 | Source1: %{name}.Makefile
|
|---|
| 27 | Source2: https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F{%version}/docbook-xsl-doc-%{version}.tar.bz2
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 | #Avoid proportional-column-width for passivetex (bug #176766).
|
|---|
| 31 | #Patch1: docbook-xsl-pagesetup.patch
|
|---|
| 32 | #Hard-code the margin-left work around to expect passivetex (bug #113456).
|
|---|
| 33 | #Patch2: docbook-xsl-marginleft.patch
|
|---|
| 34 | #fix of #161619 - adjustColumnWidths now available
|
|---|
| 35 | #Patch3: docbook-xsl-newmethods.patch
|
|---|
| 36 | #change a few non-constant expressions to constant - needed for passivetex(#366441)
|
|---|
| 37 | #Patch4: docbook-xsl-non-constant-expressions.patch
|
|---|
| 38 | #added fixes for passivetex extension and list-item-body(#161371)
|
|---|
| 39 | #Patch5: docbook-xsl-list-item-body.patch
|
|---|
| 40 | ##workaround missing mandir section problem (#727251)
|
|---|
| 41 | #Patch6: docbook-xsl-mandir.patch
|
|---|
| 42 | #Non-recursive string.subst that doesn't kill smb.conf.5 generation
|
|---|
| 43 | Patch7: docbook-style-xsl-non-recursive-string-subst.patch
|
|---|
| 44 |
|
|---|
| 45 | %description
|
|---|
| 46 | These XSL stylesheets allow you to transform any DocBook XML document to
|
|---|
| 47 | other formats, such as HTML, FO, and XHMTL. They are highly customizable.
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 | %prep
|
|---|
| 51 | %setup -c -T -n docbook-xsl-%{version}
|
|---|
| 52 | tar jxf %{SOURCE0}
|
|---|
| 53 | mv docbook-xsl-nons-%{version}/* .
|
|---|
| 54 | cd ..
|
|---|
| 55 | tar jxf %{SOURCE2}
|
|---|
| 56 | cd docbook-xsl-%{version}
|
|---|
| 57 | #%patch1 -p1 -b .pagesetup
|
|---|
| 58 | #%patch2 -p1 -b .marginleft
|
|---|
| 59 | #%patch3 -p1 -b .newmethods
|
|---|
| 60 | #%patch4 -p1 -b .nonconstant
|
|---|
| 61 | #%patch5 -p1 -b .listitembody
|
|---|
| 62 | #%patch6 -p1 -b .mandir
|
|---|
| 63 | %patch7 -p2 -b .non-recursive-subst
|
|---|
| 64 |
|
|---|
| 65 | cp -p %{SOURCE1} Makefile
|
|---|
| 66 |
|
|---|
| 67 | # fix of non UTF-8 files rpmlint warnings
|
|---|
| 68 | #for fhtml in $(find ./doc -name '*.html' -type f)
|
|---|
| 69 | #do
|
|---|
| 70 | # iconv -f ISO-8859-1 -t UTF-8 "$fhtml" -o "$fhtml".tmp
|
|---|
| 71 | # mv -f "$fhtml".tmp "$fhtml"
|
|---|
| 72 | # sed -i 's/charset=ISO-8859-1/charset=UTF-8/' "$fhtml"
|
|---|
| 73 | #done
|
|---|
| 74 |
|
|---|
| 75 | for f in $(find -name "*'*")
|
|---|
| 76 | do
|
|---|
| 77 | mv -v "$f" $(echo "$f" | tr -d "'")
|
|---|
| 78 | done
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 | %build
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 | %install
|
|---|
| 85 | DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 86 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 87 | make install BINDIR=$DESTDIR%{_bindir} DESTDIR=$DESTDIR%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}
|
|---|
| 88 | cp -a VERSION.xsl $DESTDIR%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}/VERSION.xsl
|
|---|
| 89 | ln -s xsl-stylesheets-%{version} \
|
|---|
| 90 | $DESTDIR%{_datadir}/sgml/docbook/xsl-stylesheets
|
|---|
| 91 |
|
|---|
| 92 | # Don't ship the extensions (bug #177256).
|
|---|
| 93 | rm -rf $DESTDIR%{_datadir}/sgml/docbook/xsl-stylesheets/extensions/*
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 | %clean
|
|---|
| 97 | DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 98 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 99 |
|
|---|
| 100 | %files
|
|---|
| 101 | %defattr (-,root,root,-)
|
|---|
| 102 | %doc BUGS
|
|---|
| 103 | %doc README
|
|---|
| 104 | %doc TODO
|
|---|
| 105 | %doc doc
|
|---|
| 106 | %{_datadir}/sgml/docbook/xsl-stylesheets-%{version}
|
|---|
| 107 | %{_datadir}/sgml/docbook/xsl-stylesheets
|
|---|
| 108 |
|
|---|
| 109 |
|
|---|
| 110 | %post
|
|---|
| 111 | CATALOG=%{_sysconfdir}/xml/catalog
|
|---|
| 112 | %{_bindir}/xmlcatalog --noout --add "rewriteSystem" \
|
|---|
| 113 | "http://cdn.docbook.org/release/xsl-nons/%{version}" \
|
|---|
| 114 | "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG
|
|---|
| 115 | %{_bindir}/xmlcatalog --noout --add "rewriteURI" \
|
|---|
| 116 | "http://cdn.docbook.org/release/xsl-nons/%{version}" \
|
|---|
| 117 | "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG
|
|---|
| 118 | %{_bindir}/xmlcatalog --noout --add "rewriteSystem" \
|
|---|
| 119 | "http://cdn.docbook.org/release/xsl-nons/current/" \
|
|---|
| 120 | "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG
|
|---|
| 121 | %{_bindir}/xmlcatalog --noout --add "rewriteURI" \
|
|---|
| 122 | "http://cdn.docbook.org/release/xsl-nons/current/" \
|
|---|
| 123 | "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG
|
|---|
| 124 | #keep the old one sourceforge URIs at least temporarily
|
|---|
| 125 | %{_bindir}/xmlcatalog --noout --add "rewriteSystem" \
|
|---|
| 126 | "http://docbook.sourceforge.net/release/xsl/current" \
|
|---|
| 127 | "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG
|
|---|
| 128 | %{_bindir}/xmlcatalog --noout --add "rewriteURI" \
|
|---|
| 129 | "http://docbook.sourceforge.net/release/xsl/current" \
|
|---|
| 130 | "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG
|
|---|
| 131 |
|
|---|
| 132 |
|
|---|
| 133 |
|
|---|
| 134 | %postun
|
|---|
| 135 | # remove entries only on removal of package
|
|---|
| 136 | if [ "$1" = 0 ]; then
|
|---|
| 137 | CATALOG=%{_sysconfdir}/xml/catalog
|
|---|
| 138 | %{_bindir}/xmlcatalog --noout --del \
|
|---|
| 139 | "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG
|
|---|
| 140 | fi
|
|---|
| 141 |
|
|---|
| 142 | %changelog
|
|---|
| 143 | * Fri Jan 18 2019 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.79.2-2
|
|---|
| 144 | - Use non-recursive string.subst to allow building large documents like smb.conf.5
|
|---|
| 145 |
|
|---|
| 146 | * Thu May 04 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.79.2-1
|
|---|
| 147 | - initial port
|
|---|