Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > a4bb3700d31ea9e0ba26d22d97265ec5 > files > 5

sgml-common-0.6.3-11mdk.src.rpm

%define Name sgml-common
%define Version 0.6.3

Name:		%{Name}
Version:	%{Version}
Release:	11mdk
Group       	: Publishing

Summary     	: Base ISO character entities and utilities for SGML

License   	: GPL
URL         	: http://www.iso.ch/cate/3524030.html


BuildRoot   	: %{_tmppath}/%{Name}-%{Version}

BuildArch	: noarch
Source0		: ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/%{Name}-%{Version}.tar.bz2
Source1		: http://oasis-open.org/committees/docbook/xmlcharent/0.3/xmlcharent-0.3.tar.bz2
Source2		: xmlcharent-catalog.tar.bz2
Patch0: sgml-common-umask.patch.bz2
Patch1: sgml-common-xmldir.patch.bz2
Patch2: sgml-common-quotes.patch.bz2

Requires: coreutils grep
Requires: libxml2-utils >= 2.4.8-2
BuildRequires: libxml2-utils >= 2.4.8-2
%if %{mdkversion} >= 1010
BuildRequires: automake1.4
%else
BuildRequires: automake = 1.4
%endif

Obsoletes: xml-common
Provides: xml-common

%define sgmlbase %{_datadir}/sgml

%Description
The ISO standardization organization has normalized a set of characters
symbolic names ("character entities") used by SGML documents of many types.
There are character entities for latin languages, math symbols, greek,
cyrillic, etc. This package also includes very basic utilities to allow
SGML catalogs manipulation.

%Prep
%setup -q
%setup -q -D -a 1
%setup -q -D -a 2
%patch0 -p1 -b .umask
%patch1 -p1 -b .xmldir
%patch2 -p1 -b .quotes

# force build with automake 1.4
for f in install-sh missing mkinstalldirs COPYING INSTALL; do
  ln -sf %{_datadir}/automake-1.4/$f $f
done
aclocal-1.4
%if %{mdkversion} >= 200600
# XXX make the autoconf wrapper script think this is an autoconf2.5
# script since Abel removed WANT_AUTOCONF_2_5 support there (no-op)
ln -s configure.in configure.ac
%endif
autoconf

%Build
%configure


%Install
DESTDIR=$RPM_BUILD_ROOT
rm -rf $DESTDIR
%makeinstall
# remove installed doc (added later in %files)
rm -rf $DESTDIR/usr/doc

# remove xml.dcl, it is now in openjade
rm -f $RPM_BUILD_ROOT%{sgmlbase}/xml.dcl

# remove entities to install them later in /usr/share/sgml
# instead of /usr/share/xml
rm -rf $DESTDIR/usr/share/xml
mkdir $RPM_BUILD_ROOT/etc/xml
mkdir $RPM_BUILD_ROOT%{sgmlbase}/docbook
# Create an empty XML catalog.
XMLCATALOG=$RPM_BUILD_ROOT/etc/xml/catalog
/usr/bin/xmlcatalog --noout --create $XMLCATALOG
# install common ISO entities character set
rm -rf $RPM_BUILD_ROOT%{sgmlbase}/xml-iso-entities-8879.1986/
mkdir $RPM_BUILD_ROOT%{sgmlbase}/xml-iso-entities-8879.1986/
install iso-*.ent $RPM_BUILD_ROOT%{sgmlbase}/xml-iso-entities-8879.1986/
install catalog $RPM_BUILD_ROOT%{sgmlbase}/xml-iso-entities-8879.1986/
/usr/bin/xmlcatalog --noout --add "delegatePublic" \
	"-//OASIS//ENTITIES DocBook XML" \
	"file://%{sgmlbase}/xml-iso-entities-8879.1986/catalog" $XMLCATALOG
/usr/bin/xmlcatalog --noout --add "delegatePublic" \
	"ISO 8879:1986" \
	"file://%{sgmlbase}/xml-iso-entities-8879.1986/catalog" $XMLCATALOG
# Also create the common DocBook catalog
/usr/bin/xmlcatalog --noout --create \
	$RPM_BUILD_ROOT%{sgmlbase}/docbook/xmlcatalog
# Now put the common DocBook entries
/usr/bin/xmlcatalog --noout --add "delegatePublic" \
	"-//OASIS//DTD DocBook XML" \
	"file://%{sgmlbase}/docbook/xmlcatalog" $XMLCATALOG
/usr/bin/xmlcatalog --noout --add "delegateSystem" \
	"http://www.oasis-open.org/docbook/" \
	"file://%{sgmlbase}/docbook/xmlcatalog" $XMLCATALOG
/usr/bin/xmlcatalog --noout --add "delegateURI" \
	"http://www.oasis-open.org/docbook/" \
	"file://%{sgmlbase}/docbook/xmlcatalog" $XMLCATALOG

%clean
DESTDIR=$RPM_BUILD_ROOT
rm -rf $DESTDIR


%Files
%defattr (-,root,root)
%doc doc/HTML/*.html
%dir /etc/sgml
%config(noreplace) /etc/sgml/sgml.conf
%dir %{sgmlbase}
%dir %{sgmlbase}/sgml-iso-entities-8879.1986
%{sgmlbase}/sgml-iso-entities-8879.1986/*
%{_bindir}/sgmlwhich
%{_bindir}/install-catalog
%{_mandir}/man8/*

%dir /etc/xml
%config(noreplace) /etc/xml/catalog
%dir %{sgmlbase}/docbook
%config(noreplace) %{sgmlbase}/docbook/xmlcatalog
%dir %{sgmlbase}/xml-iso-entities-8879.1986/
%{sgmlbase}/xml-iso-entities-8879.1986/*


%changelog
* Wed Aug 31 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.6.3-11mdk
- rebuild for 2006

* Fri Sep 17 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.6.3-10mdk
- force build with automake 1.4

* Fri May 14 2004 Camille Begnis <camille@mandrakesoft.com> 0.6.3-9mdk
- Use xmlcharent-0.3

* Fri Apr 25 2003 Frederic Crozat <fcrozat@mandrakesoft.com> - 0.6.3-8mdk
- xml.dcl is now in openjade
 
* Fri Jan 17 2003 Camille Begnis <camille@ke.mandrakesoft.com> 0.6.3-7mdk
- recompile against newer libs
- remove installed but not packaged files

* Thu Nov 07 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.6.3-6mdk
- requires s/(sh-|text|file)utils/coreutils/

* Thu Oct 31 2002  <camille@ke.mandrakesoft.com> 0.6.3-5mdk
- update symbolic links to automake-1.4 dir 

* Mon Jan 28 2002 Camille Begnis <camille@mandrakesoft.com> 0.6.3-4mdk
- Forgot to obsolete xml-common

* Thu Jan 24 2002 Camille Begnis <camille@mandrakesoft.com> 0.6.3-3mdk
- Buildrequires libxml2-utils

* Thu Jan 24 2002 Camille Begnis <camille@mandrakesoft.com> 0.6.3-2mdk
- use xmlcatalog from libxml-utils instead of install-catalog
- add support for XML catalogs as supported by libxml2 (xsltproc)

* Mon Aug 27 2001  <camille@ke.mandrakesoft.com> 0.6.3-1mdk
- 0.6.3

* Wed Mar 14 2001 Camille Begnis <camille@mandrakesoft.com> 0.2-4mdk
- Redirect install-catalog output to /dev/null

* Tue Feb 13 2001 Camille Begnis <camille@mandrakesoft.com> 0.2-3mdk
- move install-catalog.8.bz2 from man/en/man8 to man/man8

* Fri Jan 05 2001 Camille Begnis <camille@mandrakesoft.com> 0.2-2mdk
- add catalog management
- fix execute permissions

* Wed Aug 23 2000 Camille Begnis <camille@mandrakesoft.com> 0.2-1mdk
- 0.2
- adapt spec from Eric Bischoff <ebisch@cybercable.tm.fr>
- Pre-LSB compliance