Blame SPECS/docbook-slides.spec

0b6d52
%define pkg docbook-slides
0b6d52
Summary: DocBook Slides document type and stylesheets
0b6d52
Name: docbook-slides
0b6d52
Version: 3.4.0
0b6d52
Release: 13%{?dist}
0b6d52
License: MIT
0b6d52
Group: Applications/Text
0b6d52
URL: http://sourceforge.net/projects/docbook
0b6d52
Source0: http://downloads.sourceforge.net/docbook/%{name}-%{version}.tar.gz
0b6d52
Source1: %{name}.xml
0b6d52
Source2: %{name}.cat
0b6d52
Source3: %{name}.README.redhat
0b6d52
#tests update and buildtools could be downloaded at upstream svn ... e.g.
0b6d52
#http://docbook.svn.sourceforge.net/viewvc/docbook/trunk/slides/tests/
0b6d52
Source4: %{name}-tests.tar.gz
0b6d52
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
0b6d52
BuildArch: noarch
0b6d52
Requires: docbook-dtds
0b6d52
Requires: docbook-xsl
0b6d52
Requires: docbook-simple
0b6d52
Requires: sgml-common
0b6d52
Requires(post): sed
0b6d52
Requires(post): libxml2 >= 2.4.8
0b6d52
Requires(postun): libxml2 >= 2.4.8
0b6d52
0b6d52
0b6d52
%description
0b6d52
DocBook Slides provides customization layers of the both the
0b6d52
Simplified and the full DocBook XML DTD, as well as the DocBook XSL
0b6d52
Stylesheets. This package contains the XML document type definition
0b6d52
and stylesheets for processing DocBook Slides XML. The slides doctype
0b6d52
and stylesheets are for generating presentations, primarily in HTML.
0b6d52
0b6d52
%prep
0b6d52
%setup -q -n %{pkg}-%{version}
0b6d52
tar xf %{SOURCE4}
0b6d52
0b6d52
%build
0b6d52
0b6d52
%install
0b6d52
rm -rf $RPM_BUILD_ROOT
0b6d52
0b6d52
DESTDIR=$RPM_BUILD_ROOT%{_datadir}/xml/docbook/slides/%{version}
0b6d52
mkdir -p $DESTDIR
0b6d52
cp -a browser $DESTDIR
0b6d52
cp -a graphics $DESTDIR
0b6d52
cp -a schema $DESTDIR
0b6d52
cp -a xsl $DESTDIR
0b6d52
cp -a VERSION $DESTDIR
0b6d52
cp -a catalog.xml $DESTDIR
0b6d52
0b6d52
## Install package catalogs into /etc/*ml/ ##
0b6d52
0b6d52
XML_CAT_DIR=$RPM_BUILD_ROOT%{_sysconfdir}/xml
0b6d52
mkdir -p $XML_CAT_DIR
0b6d52
install -p -m 644 %{SOURCE1} $XML_CAT_DIR
0b6d52
0b6d52
SGML_CAT_DIR=$RPM_BUILD_ROOT%{_sysconfdir}/sgml
0b6d52
mkdir -p $SGML_CAT_DIR
0b6d52
install -p -m 644 %{SOURCE2} $SGML_CAT_DIR
0b6d52
0b6d52
cp -p %{SOURCE3} ./README2
0b6d52
0b6d52
%clean
0b6d52
rm -rf $RPM_BUILD_ROOT
0b6d52
0b6d52
%files
0b6d52
%defattr (-,root,root, -)
0b6d52
%doc doc
0b6d52
%doc tests
0b6d52
%doc README
0b6d52
%doc NEWS
0b6d52
%doc README2
0b6d52
%dir %{_datadir}/xml/docbook/slides/
0b6d52
%{_datadir}/xml/docbook/slides/%{version}
0b6d52
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sgml/docbook-slides.cat
0b6d52
%config(noreplace) %{_sysconfdir}/xml/docbook-slides.xml
0b6d52
0b6d52
0b6d52
%post
0b6d52
0b6d52
##################  XML catalog registration #######################
0b6d52
0b6d52
## Define handy variables ##
0b6d52
0b6d52
ROOT_XML_CATALOG=%{_sysconfdir}/xml/catalog
0b6d52
PKG_XML_CATALOG=%{_sysconfdir}/xml/docbook-slides.xml
0b6d52
#LOCAL_XML_CATALOG=/usr/share/xml/docbook/slides/3.4.0/catalog.xml
0b6d52
0b6d52
#
0b6d52
# Register it in the super catalog with the appropriate delegates
0b6d52
#
0b6d52
if [ -w $ROOTCATALOG ]
0b6d52
then
0b6d52
        %{_bindir}/xmlcatalog --noout --add "delegatePublic" \
0b6d52
                "-//Norman Walsh//DTD Slides" \
0b6d52
                "file://$PKG_XML_CATALOG" $ROOT_XML_CATALOG
0b6d52
0b6d52
        %{_bindir}/xmlcatalog --noout --add "delegateSystem" \
0b6d52
                "http://docbook.sourceforge.net/release/slides" \
0b6d52
                "file://$PKG_XML_CATALOG" $ROOT_XML_CATALOG
0b6d52
        %{_bindir}/xmlcatalog --noout --add "delegateURI" \
0b6d52
                "http://docbook.sourceforge.net/release/slides" \
0b6d52
                "file://$PKG_XML_CATALOG" $ROOT_XML_CATALOG
0b6d52
fi
0b6d52
####################################################################
0b6d52
0b6d52
0b6d52
#################  SGML catalog registration  ######################
0b6d52
0b6d52
ROOT_SGML_CATALOG=%{_sysconfdir}/sgml/catalog
0b6d52
PKG_SGML_CATALOG=%{_sysconfdir}/sgml/docbook-slides.cat
0b6d52
0b6d52
#### Root SGML Catalog Entries ####
0b6d52
#### "Delegate" appropriate lookups to package catalog ####
0b6d52
0b6d52
############## use install-catalog ######################
0b6d52
0b6d52
if [ -w $ROOT_SGML_CATALOG ]
0b6d52
then
0b6d52
# xmlcatalog deletes OVERRIDE YES directive, use install-catalog instead
0b6d52
#         /usr/bin/xmlcatalog --sgml --noout --add \
0b6d52
#     "/etc/sgml/docbook-slides.cat"
0b6d52
0b6d52
  install-catalog --add \
0b6d52
  $PKG_SGML_CATALOG \
0b6d52
  $ROOT_SGML_CATALOG 1>/dev/null
0b6d52
0b6d52
# Hack to workaround bug in install-catalog
0b6d52
  sed -i '/^CATALOG.*log\"$/d' $PKG_SGML_CATALOG
0b6d52
  sed -i '/^CATALOG.*log$/d' $PKG_SGML_CATALOG
0b6d52
fi
0b6d52
0b6d52
####################################################################
0b6d52
0b6d52
# Finally, make sure everything in /etc/*ml is readable!
0b6d52
/bin/chmod a+r %{_sysconfdir}/sgml/*
0b6d52
/bin/chmod a+r %{_sysconfdir}/xml/*
0b6d52
0b6d52
%postun
0b6d52
##
0b6d52
## SGML and XML catalogs
0b6d52
##
0b6d52
## Jobs: remove package catalog entries from both root catalogs &
0b6d52
##       remove package catalogs
0b6d52
0b6d52
# remove catalog entries only on removal of package
0b6d52
if [ "$1" = 0 ]; then
0b6d52
  %{_bindir}/xmlcatalog --sgml --noout --del \
0b6d52
    %{_sysconfdir}/sgml/catalog \
0b6d52
    "%{_sysconfdir}/sgml/docbook-slides.cat"
0b6d52
0b6d52
  %{_bindir}/xmlcatalog --noout --del \
0b6d52
    "file://%{_sysconfdir}/xml/docbook-slides.xml" \
0b6d52
    %{_sysconfdir}/xml/catalog
0b6d52
fi
0b6d52
0b6d52
%changelog
0b6d52
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 3.4.0-13
0b6d52
- Mass rebuild 2013-12-27
0b6d52
0b6d52
* Tue Nov 27 2012 Ondrej Vasik <ovasik@redhat.com> 3.4.0-12
0b6d52
- avoid using Fedora in the README2 file (portability)
0b6d52
0b6d52
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-11
0b6d52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0b6d52
0b6d52
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-10
0b6d52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
0b6d52
0b6d52
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-9
0b6d52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0b6d52
0b6d52
* Tue May 18 2010 Ondrej Vasik <ovasik@redhat.com> - 3.4.0-8
0b6d52
- post scriptlet requires sed (#593081)
0b6d52
0b6d52
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-7
0b6d52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
0b6d52
0b6d52
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-6
0b6d52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
0b6d52
0b6d52
* Fri Nov 21 2008 Ondrej Vasik <ovasik@redhat.com> - 3.4.0-5
0b6d52
- move tests subdir from tarball (sourceaudit check md5sum
0b6d52
  failure)
0b6d52
- license should be MIT
0b6d52
0b6d52
* Fri Jul 18 2008 Ondrej Vasik <ovasik@redhat.com> - 3.4.0-4
0b6d52
- fix loop in post catalog registration(incomplete sed
0b6d52
  coverage) #455680
0b6d52
- fix broken catalogs for package updates
0b6d52
- fix removal of files during updates
0b6d52
0b6d52
* Tue Nov 06 2007 Ondrej Vasik <ovasik@redhat.com> - 3.4.0-3
0b6d52
- merge review(#225702)
0b6d52
- spec file changed to follow guidelines
0b6d52
0b6d52
* Wed Oct 24 2007 Ondrej Vasik <ovasik@redhat.com> - 3.4.0-2
0b6d52
- rpmlint check
0b6d52
- fixed wrong requirements, some cosmetic changes
0b6d52
- /etc/ files marked as config
0b6d52
0b6d52
* Fri May 25 2007 Ondrej Vasik <ovasik@redhat.com> - 3.4.0-1
0b6d52
- Initial public release
0b6d52
- updated cvs files
0b6d52
0b6d52
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 3.3.1-2.1.1
0b6d52
- rebuild
0b6d52
0b6d52
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
0b6d52
- rebuilt
0b6d52
0b6d52
* Wed Sep  8 2004 Mark Johnson <mjohnson@redhat.com> 3.3.1-1
0b6d52
- Initial public release
0b6d52
- Moved files to /usr/share/xml
0b6d52
- Added SGML catalog registration
0b6d52
- Fixed catalog.xml, which gets broken by xmlcatalog
0b6d52
- Composed README.fedora
0b6d52
0b6d52
* Mon Feb  2 2004 Tim Waugh <twaugh@redhat.com> 3.3.1-0.1
0b6d52
- 3.3.1.
0b6d52
0b6d52
* Tue Dec 23 2003 Tim Waugh <twaugh@redhat.com> 3.3.0-0.1
0b6d52
- 3.3.0.
0b6d52
0b6d52
* Wed Oct 22 2003 Tim Waugh <twaugh@redhat.com> 3.2.0-0.1
0b6d52
- Initial build.
0b6d52
0b6d52