source: spec/trunk/SPECS/docbook-style-xsl.spec@ 1569

Last change on this file since 1569 was 1560, checked in by Silvan Scherrer, 7 years ago

spec: docbook-style-xsl: Release version 1.79.2-2.

File size: 5.0 KB
Line 
1Name: docbook-style-xsl
2Version: 1.79.2
3Release: 2%{?dist}
4Group: Applications/Text
5
6Summary: Norman Walsh's XSL stylesheets for DocBook XML
7
8License: DMIT
9URL: https://github.com/docbook/xslt10-stylesheets
10Vendor: bww bitwise works GmbH
11
12Provides: docbook-xsl = %{version}
13Requires: docbook-dtd-xml
14# xml-common was using /usr/share/xml until 0.6.3-8.
15Requires: xml-common >= 0.6.3-8
16# libxml2 required because of usage of /usr/bin/xmlcatalog
17Requires(post): libxml2 >= 2.4.8
18Requires(postun): libxml2 >= 2.4.8
19# PassiveTeX before 1.21 can't handle the newer stylesheets.
20Conflicts: passivetex < 1.21
21
22BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
23
24BuildArch: noarch
25Source0: https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F{%version}/docbook-xsl-nons-%{version}.tar.bz2
26Source1: %{name}.Makefile
27Source2: 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
43Patch7: docbook-style-xsl-non-recursive-string-subst.patch
44
45%description
46These XSL stylesheets allow you to transform any DocBook XML document to
47other formats, such as HTML, FO, and XHMTL. They are highly customizable.
48
49
50%prep
51%setup -c -T -n docbook-xsl-%{version}
52tar jxf %{SOURCE0}
53mv docbook-xsl-nons-%{version}/* .
54cd ..
55tar jxf %{SOURCE2}
56cd 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
65cp -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
75for f in $(find -name "*'*")
76do
77 mv -v "$f" $(echo "$f" | tr -d "'")
78done
79
80
81%build
82
83
84%install
85DESTDIR=$RPM_BUILD_ROOT
86rm -rf $RPM_BUILD_ROOT
87make install BINDIR=$DESTDIR%{_bindir} DESTDIR=$DESTDIR%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}
88cp -a VERSION.xsl $DESTDIR%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}/VERSION.xsl
89ln -s xsl-stylesheets-%{version} \
90 $DESTDIR%{_datadir}/sgml/docbook/xsl-stylesheets
91
92# Don't ship the extensions (bug #177256).
93rm -rf $DESTDIR%{_datadir}/sgml/docbook/xsl-stylesheets/extensions/*
94
95
96%clean
97DESTDIR=$RPM_BUILD_ROOT
98rm -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
111CATALOG=%{_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
136if [ "$1" = 0 ]; then
137 CATALOG=%{_sysconfdir}/xml/catalog
138 %{_bindir}/xmlcatalog --noout --del \
139 "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG
140fi
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
Note: See TracBrowser for help on using the repository browser.