Version 1.0beta1:

* Rebuild large parts to make DAPS distribution-independent.
  - rewrote Makefile for automake/autoconf
    => configure; make; make install is now supported
  - thorough cross-distribution testing is still needed, basic tests
    have been run on RedHat, Debian and Ubuntu
* removal of custom stylesheets
  DAPS no longer uses the SUSE stylesheets as a default. It even no
  longer contains the SUSE stylesheets - they are now available as a
  separate package (suse-xsl-stylesheets in Documentation:Tools).
  - By default DAPS uses the generic DocBook stylesheets now
  - Custom stylesheets such as the SUSE stylesheets can be used by
    specifying up to four parameters on the command line/the config
    files:
    * Styleroot:
      Directory containing the custom stylesheets. Must have the same
      directory structure as the original DocBook stylesheet root
      directory. Does _not_ need to contain stylesheets for all output
      formats. If stylesheets are not found, DAPS will automatically
      fall back to the DocBook stylesheets.
      - Variable: STYLEROOT
      - Parameter: --styleroot
      - Value: absolute path to directory
    * Fallback styleroot
      Custom fallback styleroot. If DAPS cannot find styles for the
      given output format, it will automatically fall back to the
      DocBook stylesheets. This config option will add a custom
      fallback directory with higher priority. The DocBook stylesheets
      will remain as a last resort, however.
      - Variable: FALLBACK_STYLEROOT

OBS-URL: https://build.opensuse.org/package/show/Documentation:Tools/daps?expand=0&rev=79
This commit is contained in:
Frank Sundermeyer
2012-03-08 11:17:04 +00:00
committed by Git OBS Bridge
parent d0f6f8dbbb
commit fc2e98f6b1
6 changed files with 192 additions and 124 deletions

170
daps.spec
View File

@@ -1,163 +1,151 @@
#
# spec file for package daps
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
#
Name: daps
Version: 0.9.2
Version: 1.0beta1
Release: 0
%define dtdversion 1.0
%define dtdname novdoc
%define docbuilddir %{_datadir}/daps
%define regcat %{_bindir}/sgml-register-catalog
%define fontdir %{_datadir}/fonts/truetype
%define dbstyles %{_datadir}/xml/docbook/stylesheet/nwalsh/current
%define root_catalog for-catalog-%{dtdname}-%{dtdversion}.xml
%define daps_catalog for-catalog-%{name}-%{version}.xml
%define daps_catalog for-catalog-%{name}.xml
Release: 1
Summary: DocBook Authoring and Publishing Suite
License: GPL-2.0 or GPL-3.0
Group: Productivity/Publishing/XML
URL: http://sourceforge.net/p/daps
Url: http://sourceforge.net/p/daps
Source0: %{name}-%{version}.tar.bz2
Source1: %{name}.rpmlintrc
Source2: %{name}-fetch-source
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: bash >= 4.0
BuildRequires: dia
BuildRequires: docbook_4
BuildRequires: docbook-xsl-stylesheets >= 1.75
BuildRequires: python-xml
BuildRequires: docbook_4
%if 0%{?suse_version} > 1140
BuildRequires: perl-Image-ExifTool
%else
BuildRequires: exiftool
%endif
%if 0%{?suse_version} >= 1220
BuildRequires: libxml2-tools
%endif
BuildRequires: ImageMagick
BuildRequires: fam
BuildRequires: fdupes
BuildRequires: ImageMagick
BuildRequires: inkscape
BuildRequires: libxslt
BuildRequires: openSUSE-release
BuildRequires: optipng
BuildRequires: python-xml
BuildRequires: sgml-skel
BuildRequires: suse-xsl-stylesheets
BuildRequires: svg-dtd
BuildRequires: trang
BuildRequires: transfig
BuildRequires: unzip
BuildRequires: xorg-x11-devel
# the following requirements are not really needed for building, but we add
# them nevertheless in order to see if the build target is able to fullfill
# the requirements for installation
BuildRequires: LinuxLibertine
BuildRequires: dejavu
BuildRequires: freefont
BuildRequires: ghostscript-library
BuildRequires: java
BuildRequires: liberation-fonts
BuildRequires: LinuxLibertine
BuildRequires: mplus-fonts
BuildRequires: opensp
BuildRequires: poppler-tools
BuildRequires: xalan-j2
BuildRequires: xml-commons-resolver
BuildRequires: xmlformat
BuildRequires: xmlstarlet
BuildRequires: zip
%if 0%{?suse_version} >= 1140
BuildRequires: perl-checkbot
BuildRequires: xmlgraphics-fop >= 0.94
%else
BuildRequires: fop >= 0.94
%if %{undefined sles_version}
BuildRequires: checkbot
%endif
BuildRequires: fop >= 0.94
BuildRequires: xerces-j2
%if 0%{?suse_version} == 1130
BuildRequires: xml-commons-jaxp-1.3-apis
%endif
%if 0%{?suse_version} < 1130
BuildRequires: xml-commons-apis-bootstrap
%endif
%endif
%if 0%{?suse_version} < 1120
BuildRequires: python-xml
%endif
PreReq: libxml2
PreReq: sgml-skel
Requires: ImageMagick
Requires: LinuxLibertine
Requires: bash >= 4.0
Requires: dejavu
Requires: dia
Requires: docbook_4
Requires: docbook-xsl-stylesheets >= 1.75
Requires: docbook_4
Requires: exiftool
Requires: fam
Requires: freefont
Requires: ghostscript-library
Requires: ImageMagick
Requires: inkscape
Requires: java
Requires: libxslt
Requires: liberation-fonts
Requires: LinuxLibertine
Requires: libxslt
Requires: make
Requires: mplus-fonts
Requires: opensp
Requires: optipng
Requires: poppler-tools
Requires: sgml-skel
Requires: svg-dtd
Requires: transfig
Requires: unzip
Requires: xalan-j2
Requires: xml-commons-resolver
Requires: xmlformat
Requires: xmlstarlet
Requires: zip
%if 0%{?suse_version} >= 1140
Requires: perl-checkbot
Requires: xmlgraphics-fop >= 0.94
%else
Requires: fop >= 0.94
%if %{undefined sles_version}
Requires: checkbot
Requires: checkbot
%else
Recommends: checkbot
%endif
Requires: fop >= 0.94
Requires: xerces-j2
%if 0%{?suse_version} == 1130
Requires: xml-commons-jaxp-1.3-apis
%endif
%if 0%{?suse_version} < 1130
Requires: xml-commons-apis-bootstrap
%endif
%endif
%if 0%{?suse_version} < 1120
BuildRequires: python-xml
Requires: python-xml
%endif
Recommends: agfa-fonts
Recommends: aspell aspell-en aspell-en-huge
Recommends: aspell aspell-en
# Only works only for openSUSE 11.4 and below
%if 0%{?suse_version} < 1210
Recommends: aspell-en-huge
%endif
Recommends: daps-docmanager
Recommends: docbook_5
Recommends: emacs psgml
Recommends: epubcheck
# Split of ttf-founder-simplified and ttf-founder-traditional
Recommends: FZFangSong FZHeiTi FZSongTi
Recommends: fifth-leg-font
Recommends: jing
Recommends: remake
# needed to create ePUBs
Recommends: ruby
# Japanese Fonts:
Recommends: sazanami-fonts
Recommends: suse-xsl-stxlesheets
# Chinese
Recommends: ttf-arphic
# Korean Fonts:
@@ -168,7 +156,6 @@ Recommends: xep
#Obsoletes: susedoc <= 4.3.27
Provides: susedoc < 4.4
%description
DocBook Authoring and Publishing Suite (DAPS)
@@ -193,51 +180,28 @@ for upgrade instructions.
#--------------------------------------------------------------------------
%build
# specifying VERSION is manadatory!!
%__make %{?_smp_mflags} VERSION=%{version}
%configure --docdir=%{_defaultdocdir}/%{name} --disable-edit-rootcatalog
%__make %{?_smp_mflags}
#--------------------------------------------------------------------------
%install
# specifying VERSION is manadatory!!
make install DESTDIR=$RPM_BUILD_ROOT VERSION=%{version}
# make_install macro does not have a DESTDIR in 11.1/SLE 11 !!
#%#make_install VERSION=%{version}
make install DESTDIR=$RPM_BUILD_ROOT
# create symlinks:
%fdupes -s $RPM_BUILD_ROOT/%{_datadir}
#----------------------
%post
# SGM CATALOG
#
if [ -x %{regcat} ]; then
for CATALOG in CATALOG.%{dtdname}-%{dtdversion}; do
%{regcat} -a %{_datadir}/sgml/$CATALOG >/dev/null 2>&1 || true
done
fi
# XML Catalog
# XML Catalog entries for daps profiling
#
# remove existing entries first (if existing) - needed for
# zypper in, since it does not call postun
#
# The first two ones are only there for campatibility reasons and
# can be removed in the future
#
# delete ...
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--del %{dtdname}-%{version}
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--del %{dtdname}xslt-%{version}
#
# These two entries need to stay
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--del %{dtdname}-%{dtdversion}
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--del %{name}-%{version}
#
# now add new entries
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--add /etc/xml/%{root_catalog}
--del %{name}
# ... and add it again
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--add /etc/xml/%{daps_catalog}
@@ -246,44 +210,24 @@ exit 0
#----------------------
%postun
if [ ! -f %{_sysconfdir}/xml/%{root_catalog} -a -x /usr/bin/edit-xml-catalog ] ; then
for c in CATALOG.%{dtdname}-%{dtdversion}; do
%{regcat} -r %{_datadir}/sgml/$c >/dev/null 2>&1
done
# XML Catalog
#
# The first two ones are only there for campatibility reasons and
# can be removed in the future
#
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--del %{dtdname}-%{version}
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--del %{dtdname}xslt-%{version}
#
# These two entries need to stay
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--del %{dtdname}-%{dtdversion}
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--del %{name}-%{version}
# delete catalog entry for daps profiling
if [ -x /usr/bin/edit-xml-catalog ] ; then
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
--del %{name}
fi
%run_suseconfig_fonts
exit 0
#----------------------
%files
%defattr(-,root,root)
%dir %{fontdir}
%dir %{_sysconfdir}/%{name}
%dir %{_datadir}/xml/%{dtdname}
%dir %{_datadir}/xml/%{dtdname}/schema
%dir %{_datadir}/xml/%{dtdname}/schema/*
%dir %{_datadir}/xml/%{dtdname}/schema/*/1.0
%dir %{_defaultdocdir}/%{name}
%config /var/lib/sgml/CATALOG.*
%config %{_sysconfdir}/xml/*.xml
%config %{_sysconfdir}/%{name}/*
@@ -291,12 +235,10 @@ exit 0
%doc %{_defaultdocdir}/%{name}/*
%{_bindir}/*
%{_datadir}/sgml/CATALOG.*
%{_datadir}/emacs/site-lisp/docbook_macros.el
%{fontdir}/*
%{docbuilddir}
%{_datadir}/xml/%{dtdname}/schema/dtd/%{dtdversion}/*
%{_datadir}/xml/%{dtdname}/schema/rng/%{dtdversion}/*
#----------------------
%changelog