Summary: Davenport Group DocBook DTD for technical documentation
name: docbook
Packager: rosalia@cygnus.com
%define version 3.1
%define release 5
version: %{version}
release: %{release}
vendor: Cygnus Solutions
Distribution: Cygnus UNSUPPORTED Internal SGML Tools
copyright: Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999 HaL Computer Systems, Inc., O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software Corporation, and the Organization for the Advancement of Structured Information Standards (OASIS).
Prereq: sgml-common
# requires: sgml-common
# source: http://www.oasis-open.org/docbook/docbook/3.1/index.html
Source0: docbook-3.0.tgz
Source1: docbook-3.1.tgz
Group: Utilities/Text
BuildRoot: /tmp/docbookroot
%define sgmlbase /usr

%description
  Davenport Group DocBook DTD for technical documentation.  Includes
  version 3.0 and 3.1 DTDs.

%prep
%setup -c -b1

%install
mkdir -p $RPM_BUILD_ROOT%{sgmlbase}/lib/sgml
mkdir -p $RPM_BUILD_ROOT%{sgmlbase}/lib/sgml/docbook-3.0
mkdir -p $RPM_BUILD_ROOT%{sgmlbase}/doc/docbook
install dtd/docbook-3.0/* $RPM_BUILD_ROOT%{sgmlbase}/lib/sgml/docbook-3.0/
install dtd/docbook-3.1/* $RPM_BUILD_ROOT%{sgmlbase}/lib/sgml/

%post
# since old-postun is run *after* new-post, we must always cycle.
V=%{version}-%{release}
%{sgmlbase}/bin/install-catalog --install docbook --version $V
V=3.0-%{version}-%{release}
%{sgmlbase}/bin/install-catalog --install docbook-3.0/docbook --version $V

%postun
# since old-postun is run *after* new-post, we must always cycle.
V=3.0-%{version}-%{release}
%{sgmlbase}/bin/install-catalog --remove docbook-3.0/docbook --version $V
V=%{version}-%{release}
%{sgmlbase}/bin/install-catalog --remove docbook --version $V

%files
%doc $RPM_BUILD_ROOT%{sgmlbase}/lib/sgml/*.txt
%{sgmlbase}/lib/sgml/*