2012-02-07 15:28:09 +00:00
|
|
|
#
|
|
|
|
# spec file for package suse-xsl-stylesheets
|
|
|
|
#
|
2013-01-07 13:45:33 +00:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2012-02-07 15:28:09 +00:00
|
|
|
#
|
2012-05-11 08:22:43 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2012-02-07 15:28:09 +00:00
|
|
|
|
2012-05-11 08:22:43 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2012-02-10 10:18:33 +00:00
|
|
|
#
|
|
|
|
|
2013-01-08 08:03:31 +00:00
|
|
|
|
2012-02-07 15:28:09 +00:00
|
|
|
Name: suse-xsl-stylesheets
|
2013-01-15 16:00:47 +00:00
|
|
|
Version: 1.9.15
|
2012-05-11 08:22:43 +00:00
|
|
|
Release: 0
|
2012-02-07 15:28:09 +00:00
|
|
|
|
2012-02-10 10:18:33 +00:00
|
|
|
%define dtdversion 1.0
|
|
|
|
%define dtdname novdoc
|
|
|
|
%define regcat %{_bindir}/sgml-register-catalog
|
|
|
|
%define dbstyles %{_datadir}/xml/docbook/stylesheet/nwalsh/current
|
|
|
|
%define novdoc_catalog for-catalog-%{dtdname}-%{dtdversion}.xml
|
|
|
|
%define susexsl_catalog for-catalog-%{name}.xml
|
2012-02-07 15:28:09 +00:00
|
|
|
|
|
|
|
Summary: SUSE-branded Docbook stylesheets for XSLT 1.0
|
|
|
|
License: GPL-2.0 or GPL-3.0
|
|
|
|
Group: Productivity/Publishing/XML
|
2012-05-11 08:22:43 +00:00
|
|
|
Url: http://sourceforge.net/p/daps/suse-xslt
|
2012-02-07 15:28:09 +00:00
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
|
|
Source1: susexsl-fetch-source
|
|
|
|
Source2: %{name}.rpmlintrc
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-04-25 14:33:10 +00:00
|
|
|
BuildArch: noarch
|
2012-02-07 15:28:09 +00:00
|
|
|
|
|
|
|
BuildRequires: docbook-xsl-stylesheets >= 1.75
|
2012-02-07 15:56:24 +00:00
|
|
|
BuildRequires: fdupes
|
2012-02-07 15:28:09 +00:00
|
|
|
BuildRequires: libxslt
|
|
|
|
BuildRequires: make
|
2012-05-11 08:22:43 +00:00
|
|
|
BuildRequires: trang
|
2012-02-07 15:28:09 +00:00
|
|
|
|
|
|
|
Requires: docbook
|
|
|
|
Requires: docbook-xsl-stylesheets >= 1.75
|
|
|
|
Requires: libxslt
|
|
|
|
|
|
|
|
Recommends: daps
|
|
|
|
Recommends: docbook5
|
|
|
|
Recommends: docbook5-xsl-stylesheets
|
|
|
|
|
|
|
|
%description
|
|
|
|
SUSE-branded DocBook stylesheets for XSLT 1.0
|
|
|
|
|
|
|
|
Extensions for the DocBook XSLT 1.0 stylesheets that provide SUSE branding
|
|
|
|
for PDF, HTML, and ePUB. This package also provides the NovDoc DTD, a subset of
|
|
|
|
the DocBook 4 DTD.
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
%build
|
|
|
|
%__make %{?_smp_mflags}
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
%install
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
2012-02-07 15:56:24 +00:00
|
|
|
# create symlinks:
|
|
|
|
%fdupes -s $RPM_BUILD_ROOT/%{_datadir}
|
|
|
|
|
2012-02-07 15:28:09 +00:00
|
|
|
#----------------------
|
|
|
|
%post
|
|
|
|
# register catalogs
|
|
|
|
#
|
|
|
|
# SGML CATALOG
|
|
|
|
#
|
|
|
|
if [ -x %{regcat} ]; then
|
2012-03-20 15:05:23 +00:00
|
|
|
%{regcat} -a %{_datadir}/sgml/CATALOG.%{dtdname}-%{dtdversion} >/dev/null 2>&1 || true
|
2012-02-07 15:28:09 +00:00
|
|
|
fi
|
2012-02-10 10:18:33 +00:00
|
|
|
# XML Catalogs
|
2012-02-07 15:28:09 +00:00
|
|
|
#
|
|
|
|
# remove existing entries first - needed for
|
|
|
|
# zypper in, since it does not call postun
|
|
|
|
# delete ...
|
|
|
|
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
|
|
|
--del %{dtdname}-%{dtdversion}
|
|
|
|
# ... and add it again
|
|
|
|
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
|
|
|
--add /etc/xml/%{novdoc_catalog}
|
2012-02-10 10:18:33 +00:00
|
|
|
# delete ...
|
|
|
|
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
|
|
|
--del %{name}
|
|
|
|
# ... and add it again
|
|
|
|
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
|
|
|
--add /etc/xml/%{susexsl_catalog}
|
2012-02-07 15:28:09 +00:00
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
#----------------------
|
|
|
|
%postun
|
|
|
|
#
|
|
|
|
# Remove catalog entries
|
|
|
|
#
|
2012-03-20 14:36:14 +00:00
|
|
|
# delete catalog entries
|
|
|
|
# only run if package is really uninstalled ($1 = 0) and not
|
|
|
|
# in case of an update
|
|
|
|
#
|
|
|
|
if [ 0 = $1 ]; then
|
|
|
|
if [ ! -f %{_sysconfdir}/xml/%{novdoc_catalog} -a -x /usr/bin/edit-xml-catalog ] ; then
|
2012-03-20 15:05:23 +00:00
|
|
|
# SGML: novdoc dtd entry
|
|
|
|
echo "######################## deleting catalog in postun"
|
|
|
|
%{regcat} -r %{_datadir}/sgml/CATALOG.%{dtdname}-%{dtdversion} >/dev/null 2>&1 || true
|
2012-02-10 10:18:33 +00:00
|
|
|
# XML
|
2012-03-20 15:05:23 +00:00
|
|
|
# novdoc dtd entry
|
2012-02-10 10:18:33 +00:00
|
|
|
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
|
|
|
--del %{dtdname}-%{dtdversion}
|
|
|
|
# susexsl entry
|
|
|
|
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
|
|
|
--del %{name}
|
2012-03-20 14:36:14 +00:00
|
|
|
fi
|
2012-03-20 14:41:28 +00:00
|
|
|
fi
|
2012-02-07 15:28:09 +00:00
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
#----------------------
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
# Directories
|
|
|
|
%dir %{_datadir}/xml/docbook/stylesheet/suse
|
|
|
|
|
|
|
|
%dir %{_datadir}/xml/%{dtdname}
|
|
|
|
%dir %{_datadir}/xml/%{dtdname}/schema
|
|
|
|
%dir %{_datadir}/xml/%{dtdname}/schema/*
|
2012-05-30 14:53:23 +00:00
|
|
|
%dir %{_datadir}/xml/%{dtdname}/schema/*/%{dtdversion}
|
2012-02-07 15:28:09 +00:00
|
|
|
|
|
|
|
%dir %{_defaultdocdir}/%{name}
|
|
|
|
|
|
|
|
# stylesheets
|
2012-02-07 15:56:24 +00:00
|
|
|
%{_datadir}/xml/docbook/stylesheet/suse/*
|
2012-02-07 15:28:09 +00:00
|
|
|
|
|
|
|
# NovDoc Schemas
|
|
|
|
%{_datadir}/xml/%{dtdname}/schema/dtd/%{dtdversion}/*
|
|
|
|
%{_datadir}/xml/%{dtdname}/schema/rng/%{dtdversion}/*
|
|
|
|
|
|
|
|
# Catalogs
|
|
|
|
%config /var/lib/sgml/CATALOG.*
|
|
|
|
%{_datadir}/sgml/CATALOG.*
|
|
|
|
%config %{_sysconfdir}/xml/*.xml
|
|
|
|
|
|
|
|
# Documentation
|
|
|
|
%doc %{_defaultdocdir}/%{name}/*
|
|
|
|
|
|
|
|
#----------------------
|
2012-05-11 08:22:43 +00:00
|
|
|
|
2012-02-07 15:28:09 +00:00
|
|
|
%changelog
|