Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37766891
en ru br
ALT Linux repos
S:1.79.1-alt4
5.0: 1.73.2-alt1
4.1: 1.73.2-alt1
4.0: 1.73.2-alt0.M40.1
3.0: 1.69.0-alt1

Group :: Publishing
RPM: docbook-style-xsl

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define snapshot 20080311

Name: docbook-style-xsl
Version: 1.73.2
Release: alt1
Group: Publishing

Summary: Norman Walsh's XSL stylesheets for DocBook XML
#'

License: Distributable
Url: http://docbook.sourceforge.net/projects/xsl/

%ifdef snapshot
%define actual_version snapshot
%define actual_archive zip
%else
%define actual_version %version
%define actual_archive tar.bz2
%endif

%define xmlbase %_datadir/xml
%define xmlconfdir %_sysconfdir/xml
%define hack_output_encodings koi8-r koi8-u windows-1251

Provides: docbook-xsl
#PreReq: docbook-dtd-xml
PreReq: xml-common xml-utils

AutoReq: yes

Source0: http://prdownloads.sourceforge.net/docbook/docbook-xsl-%{actual_version}.%{actual_archive}
Source1: http://prdownloads.sourceforge.net/docbook/docbook-xsl-doc-%{actual_version}.%{actual_archive}
Source2: docbook-output-stub.xsl
Source3: docbook-add-output-encoding.xsl

# Fedora Core patches

Patch1: docbook-xsl-pagesetup.patch
Patch2: docbook-xsl-marginleft.patch

BuildArch: noarch
BuildRequires: xsltproc perl-base xml-utils unzip

%package doc
Summary: Documentation for DocBook XSL stylesheets
Group: Publishing
AutoReqProv: none

%description
These XSL stylesheets allow to convert any DocBook document to other
formats, including those suited for print formatting (FO), online use
(HTML, XHTML), and manual files (man, htmlhelp, javahelp).
The stylesheets are highly customizable.

%description doc
This package contains extensive documentation to DocBook XSL stylesheets
in the HTML format.

%prep
%setup -q -n docbook-xsl-%{actual_version} -b 1
%patch1 -p1
%patch2 -p1
find . -type f -name '*.xsl.orig' -delete
find . -type f -name '.gitignore' -delete
find . -type f -perm +a+x -print0 | xargs -r0 chmod a-x

%build
for enc in %hack_output_encodings; do
   xsltproc -o html/docbook-$enc.xsl --stringparam output.encoding $enc \
%SOURCE3 %SOURCE2
done

%install
install -d -m755 %buildroot%xmlbase/docbook/xsl-stylesheets-%version
install -p -m644 VERSION \
   %buildroot%xmlbase/docbook/xsl-stylesheets-%version/
cp -a common eclipse fo highlighting html htmlhelp images javahelp lib \
     manpages profiling slides template website xhtml \
   %buildroot%xmlbase/docbook/xsl-stylesheets-%version/

# Do not copy scripts in tools/bin as they are purely for docbook developers

install -d -m755 %buildroot%xmlbase/docbook/xsl-stylesheets-%version/tools
cp -a tools/make %buildroot%xmlbase/docbook/xsl-stylesheets-%version/tools/

install -p -m644 catalog.xml \
   %buildroot%xmlbase/docbook/xsl-stylesheets-%version/
install -d -m755 %buildroot%xmlbase/docbook/xsl-stylesheets-%version/extensions
install -p -m644 extensions/*.jar \
   %buildroot%xmlbase/docbook/xsl-stylesheets-%version/extensions/

ln -sf xsl-stylesheets-%version %buildroot%xmlbase/docbook/xsl-stylesheets

%files
%doc AUTHORS BUGS COPYING NEWS* README RELEASE-NOTES.* TODO
%xmlbase/docbook/xsl-stylesheets-%version
%xmlbase/docbook/xsl-stylesheets

%files doc
%doc doc/*

%post
CATALOG=%xmlconfdir/catalog
/usr/bin/xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/%version" \
"%xmlbase/docbook/xsl-stylesheets-%version" $CATALOG ||:
/usr/bin/xmlcatalog --noout --add "rewriteURI" \
"http://docbook.sourceforge.net/release/xsl/%version" \
"%xmlbase/docbook/xsl-stylesheets-%version" $CATALOG ||:
/usr/bin/xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/current" \
"%xmlbase/docbook/xsl-stylesheets-%version" $CATALOG ||:
/usr/bin/xmlcatalog --noout --add "rewriteURI" \
"http://docbook.sourceforge.net/release/xsl/current" \
"%xmlbase/docbook/xsl-stylesheets-%version" $CATALOG ||:

%postun
if [ ! -d "%xmlbase/docbook/xsl-stylesheets-%version" ]; then
   CATALOG=%xmlconfdir/catalog
   /usr/bin/xmlcatalog --noout --del \
"%xmlbase/docbook/xsl-stylesheets-%version" $CATALOG ||:
fi

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin