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