2012-02-07 15:28:09 +00:00
|
|
|
#
|
|
|
|
# spec file for package suse-xsl-stylesheets
|
|
|
|
#
|
2014-01-14 14:06:09 +00:00
|
|
|
# Copyright (c) 2014 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-09-02 08:54:34 +00:00
|
|
|
|
|
|
|
|
2012-02-07 15:28:09 +00:00
|
|
|
Name: suse-xsl-stylesheets
|
2014-04-15 12:40:03 +00:00
|
|
|
Version: 2.0~beta3
|
2012-05-11 08:22:43 +00:00
|
|
|
Release: 0
|
2012-02-07 15:28:09 +00:00
|
|
|
|
2013-01-17 13:19:49 +00:00
|
|
|
###############################################################
|
|
|
|
#
|
|
|
|
# ATTENTION: Do NOT edit this file outside of
|
|
|
|
# https://svn.code.sf.net/p/daps/svn/trunk/daps/\
|
|
|
|
# suse/packaging/suse-xsl-stylesheets.spec
|
|
|
|
#
|
|
|
|
# Your changes will be lost on the next update
|
|
|
|
# If you do not have access to the SVN repository, notify
|
|
|
|
# <fsundermeyer@opensuse.org> and <toms@opensuse.org>
|
|
|
|
# or send a patch
|
|
|
|
#
|
|
|
|
################################################################
|
|
|
|
|
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
|
2014-01-14 14:39:39 +00:00
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
2012-02-07 15:28:09 +00:00
|
|
|
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
|
|
|
|
2013-02-13 14:16:52 +00:00
|
|
|
BuildRequires: docbook-xsl-stylesheets >= 1.77
|
2012-02-07 15:56:24 +00:00
|
|
|
BuildRequires: fdupes
|
2012-02-07 15:28:09 +00:00
|
|
|
BuildRequires: libxslt
|
|
|
|
BuildRequires: make
|
2013-01-16 07:47:59 +00:00
|
|
|
# Only needed to fix the "have choice" error between xerces-j2 and crimson
|
|
|
|
%if 0%{?suse_version} == 1210
|
|
|
|
BuildRequires: xerces-j2
|
|
|
|
%endif
|
2013-01-16 12:52:43 +00:00
|
|
|
BuildRequires: trang
|
2013-01-16 07:47:59 +00:00
|
|
|
|
2012-02-07 15:28:09 +00:00
|
|
|
Requires: docbook
|
2013-05-23 14:25:49 +00:00
|
|
|
Requires: docbook-xsl-stylesheets >= 1.77
|
2012-02-07 15:28:09 +00:00
|
|
|
Requires: libxslt
|
|
|
|
|
|
|
|
Recommends: daps
|
|
|
|
Recommends: docbook5
|
|
|
|
Recommends: docbook5-xsl-stylesheets
|
2013-09-02 08:54:34 +00:00
|
|
|
|
|
|
|
#------
|
|
|
|
# Fonts
|
|
|
|
#------
|
|
|
|
%if 0%{?suse_version} >= 1220
|
|
|
|
Requires: dejavu-fonts
|
|
|
|
Requires: gnu-free-fonts
|
|
|
|
Requires: liberation-fonts
|
|
|
|
Recommends: agfa-fonts
|
|
|
|
# Japanese:
|
|
|
|
Recommends: sazanami-fonts
|
|
|
|
# Korean:
|
|
|
|
Recommends: un-fonts
|
|
|
|
%else
|
|
|
|
Requires: dejavu
|
|
|
|
Requires: freefont
|
|
|
|
Requires: liberation-fonts
|
|
|
|
Recommends: agfa-fonts
|
|
|
|
# Japanese:
|
|
|
|
Recommends: sazanami-fonts
|
|
|
|
# Korean:
|
|
|
|
Recommends: unfonts
|
|
|
|
%endif
|
|
|
|
# Chinese -- only available from M17N:fonts in Code 11:
|
|
|
|
Recommends: wqy-microhei-fonts
|
2012-02-07 15:28:09 +00:00
|
|
|
|
2013-05-29 09:43:09 +00:00
|
|
|
%if 0%{?sles_version}
|
|
|
|
Recommends: ttf-founder-simplified
|
2013-09-02 08:54:34 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
# FONTS USED IN suse_beta STYLESHEETS
|
|
|
|
# A rather simplistic solution which roughly means that you need M17N:fonts to
|
|
|
|
# build the new stylesheets on older OS's.
|
|
|
|
%if 0%{?suse_version} >= 1220
|
|
|
|
Requires: google-opensans-fonts
|
|
|
|
Requires: sil-charis-fonts
|
2013-05-29 09:43:09 +00:00
|
|
|
%else
|
2013-09-02 08:54:34 +00:00
|
|
|
Recommends: google-opensans-fonts
|
|
|
|
Recommends: sil-charis-fonts
|
2013-05-29 09:43:09 +00:00
|
|
|
%endif
|
2013-09-02 08:54:34 +00:00
|
|
|
# Monospace -- dejavu-fonts, already required
|
|
|
|
# Western fonts fallback -- gnu-free-fonts, already required
|
|
|
|
|
|
|
|
# Chinese simplified -- wqy-microhei-fonts, already recommended
|
|
|
|
# Chinese traditional:
|
|
|
|
Recommends: arphic-uming-fonts
|
|
|
|
# Japanese:
|
|
|
|
Recommends: ipa-pgothic-fonts
|
|
|
|
Recommends: ipa-pmincho-fonts
|
|
|
|
# Korean:
|
|
|
|
Recommends: nanum-fonts
|
|
|
|
# Arabic:
|
|
|
|
Recommends: arabic-amiri-fonts
|
2013-05-29 09:43:09 +00:00
|
|
|
|
2013-05-23 14:25:49 +00:00
|
|
|
Obsoletes: susedoc <= 4.3.33
|
2013-05-28 08:51:21 +00:00
|
|
|
Provides: susedoc = 4.3.34
|
2013-04-30 13:25:58 +00:00
|
|
|
|
2012-02-07 15:28:09 +00:00
|
|
|
%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}
|
2013-09-25 06:01:09 +00:00
|
|
|
#
|
|
|
|
# Patch the VERSION.xsl file to hold the current version
|
2013-12-11 09:12:18 +00:00
|
|
|
sed -i "s%<fm:Version>.*</fm:Version>%<fm:Version>%{version}</fm:Version>%" xslt2013/VERSION.xsl
|
2012-02-07 15:28:09 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
%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
|
2013-12-11 09:12:18 +00:00
|
|
|
%dir %{_datadir}/xml/docbook/stylesheet/suse2013
|
2012-02-07 15:28:09 +00:00
|
|
|
|
|
|
|
%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/*
|
2013-12-11 09:12:18 +00:00
|
|
|
%{_datadir}/xml/docbook/stylesheet/suse2013/*
|
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
|