forked from pool/docbook_5
402 lines
15 KiB
RPMSpec
402 lines
15 KiB
RPMSpec
#
|
|
# spec file for package docbook_5 (Version 5.0)
|
|
#
|
|
# Copyright (c) 2008 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.
|
|
#
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: docbook_5
|
|
Summary: DocBook Schemas (DTD, RELAX NG, W3C Schema) for Version 5.x
|
|
Version: 5.0
|
|
Release: 1
|
|
License: BSD 3-Clause; X11/MIT
|
|
Group: Productivity/Publishing/DocBook
|
|
Requires: iso_ent xmlcharent
|
|
Requires: sgml-skel libxml2
|
|
BuildRequires: sgml-skel
|
|
PreReq: /usr/bin/xmlcatalog sgml-skel
|
|
PreReq: sed grep awk
|
|
AutoReqProv: on
|
|
Source2: docbook_5-README.SuSE
|
|
# DocBook Specifications:
|
|
Source3: docbook-%{version}-spec-cd-01.pdf
|
|
Source4: docbook-%{version}-spec-cd-01.html
|
|
Source5: docbook-%{version}-spec-cd-01.xml
|
|
# DB 5.0
|
|
Source500: http://www.docbook.org/xml/%{version}/docbook-%{version}.tar.bz2
|
|
#Source504: CATALOG.db50CR1xml
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildArch: noarch
|
|
Url: http://www.oasis-open.org/docbook/
|
|
|
|
%description
|
|
The version 5.0 release is a complete rewrite of DocBook in RELAX NG.
|
|
The intent of this rewrite is to produce a schema that is true to the
|
|
spirit of DocBook while simultaneously removing inconsistencies that
|
|
have arisen as a natural consequence of DocBook's long, slow evolution.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Eve L. Maler <elm@arbortext.com>
|
|
Terry Allen <tallen@sonic.net>
|
|
Norman Walsh <ndw@nwalsh.com>
|
|
|
|
%define INSTALL install -m755 -s
|
|
%define INSTALL_DIR install -d -m755
|
|
%define INSTALL_DATA install -m644
|
|
%define INSTALL_SCRIPT install -m755
|
|
%define xml_dir %{_datadir}/xml
|
|
%define xml_docbook_dir %{xml_dir}/docbook
|
|
%define xml_docbook_dtd_dir %{xml_docbook_dir}/schema/dtd
|
|
%define xml_docbook_rng_dir %{xml_docbook_dir}/schema/rng
|
|
%define xml_docbook_sch_dir %{xml_docbook_dir}/schema/sch
|
|
%define xml_docbook_xsd_dir %{xml_docbook_dir}/schema/xsd
|
|
%define xml_docbook_custom_dir %{xml_docbook_dir}/custom
|
|
%define xml_docbook_style_dir %{xml_docbook_dir}/stylesheet
|
|
%define xml_config_dir /var/lib/xml
|
|
%define xml_sysconf_dir %{_sysconfdir}/xml
|
|
|
|
%prep
|
|
%setup -n %{name} -c -T
|
|
cp -p $RPM_SOURCE_DIR/%{name}-README.SuSE README.SuSE
|
|
# Copy the DocBook Specifications:
|
|
cp %{S:3} %{S:4} %{S:5} .
|
|
#
|
|
#unzip -q -a %{S:500}
|
|
tar xjf %{S:500}
|
|
#
|
|
# CATALOG.* files
|
|
#cp %{S:504} .
|
|
chmod -R a+rX,g-w,o-w .
|
|
find . -type f | xargs chmod a-x
|
|
|
|
%build
|
|
# # build root catalog fragment
|
|
xmlcatbin=/usr/bin/xmlcatalog
|
|
CATALOG=docbook_5.xml
|
|
$xmlcatbin --create --noout $CATALOG
|
|
for v in %{version}; do
|
|
# DTD
|
|
$xmlcatbin --noout --add "public" \
|
|
"-//OASIS//DTD DocBook XML ${v}//EN" \
|
|
"file://%{xml_docbook_dtd_dir}/${v}/docbook.dtd" ${CATALOG}
|
|
$xmlcatbin --noout --add "system" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/dtd/docbook.dtd" \
|
|
"file://%{xml_docbook_dtd_dir}/${v}/docbook.dtd" ${CATALOG}
|
|
$xmlcatbin --noout --add "system" \
|
|
"http://docbook.org/xml/${v}/dtd/docbook.dtd" \
|
|
"file://%{xml_docbook_dtd_dir}/${v}/docbook.dtd" ${CATALOG}
|
|
# RNG
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/rng/docbook.rng" \
|
|
"file://%{xml_docbook_rng_dir}/${v}/docbook.rng" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/rng/docbook.rng" \
|
|
"file://%{xml_docbook_rng_dir}/${v}/docbook.rng" ${CATALOG}
|
|
# RNG+XInclude
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/rng/docbookxi.rng" \
|
|
"file://%{xml_docbook_rng_dir}/${v}/docbookxi.rng" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/rng/docbookxi.rng" \
|
|
"file://%{xml_docbook_rng_dir}/${v}/docbookxi.rng" ${CATALOG}
|
|
# RNC
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/rnc/docbook.rnc" \
|
|
"file://%{xml_docbook_rng_dir}/${v}/docbook.rnc" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/rng/docbook.rnc" \
|
|
"file://%{xml_docbook_rng_dir}/${v}/docbook.rnc" ${CATALOG}
|
|
# RNC+XInclude
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/rnc/docbookxi.rnc" \
|
|
"file://%{xml_docbook_rng_dir}/${v}/docbookxi.rnc" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/rng/docbookxi.rnc" \
|
|
"file://%{xml_docbook_rng_dir}/${v}/docbookxi.rnc" ${CATALOG}
|
|
# XSD
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/xsd/docbook.xsd" \
|
|
"file://%{xml_docbook_xsd_dir}/${v}/docbook.xsd" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/xsd/docbook.xsd" \
|
|
"file://%{xml_docbook_xsd_dir}/${v}/docbook.xsd" ${CATALOG}
|
|
# XSD + XInclude
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/xsd/docbookxi.xsd" \
|
|
"file://%{xml_docbook_xsd_dir}/${v}/docbookxi.xsd" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/xsd/docbookxi.xsd" \
|
|
"file://%{xml_docbook_xsd_dir}/${v}/docbookxi.xsd" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/xsd/xi.xsd" \
|
|
"file://%{xml_docbook_xsd_dir}/${v}/xi.xsd" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/xsd/xi.xsd" \
|
|
"file://%{xml_docbook_xsd_dir}/${v}/xi.xsd" ${CATALOG}
|
|
# XLink + XML
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/xsd/xlink.xsd" \
|
|
"file://%{xml_docbook_xsd_dir}/${v}/xlink.xsd" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/xsd/xlink.xsd" \
|
|
"file://%{xml_docbook_xsd_dir}/${v}/xlink.xsd" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/xsd/xml.xsd" \
|
|
"file://%{xml_docbook_xsd_dir}/${v}/xml.xsd" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/xsd/xml.xsd" \
|
|
"file://%{xml_docbook_xsd_dir}/${v}/xml.xsd" ${CATALOG}
|
|
# Schematron
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/sch/docbook.sch" \
|
|
"file://%{xml_docbook_sch_dir}/${v}/docbook.sch" ${CATALOG}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/sch/docbook.sch" \
|
|
"file://%{xml_docbook_sch_dir}/${v}/docbook.sch" ${CATALOG}
|
|
done
|
|
# ---------------------
|
|
# Build XML catalog files for each Schema
|
|
for v in %{version}; do
|
|
for s in dtd rng sch xsd; do
|
|
cat=docbook-${v}/${s}/catalog.xml
|
|
$xmlcatbin --noout --create ${cat}
|
|
case $s in
|
|
dtd)
|
|
$xmlcatbin --noout --add "public" \
|
|
"-//OASIS//DTD DocBook XML ${v}//EN" \
|
|
"docbook.dtd" ${cat}
|
|
$xmlcatbin --noout --add "system" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/dtd/docbook.dtd" \
|
|
"docbook.dtd" ${cat}
|
|
;;
|
|
sch)
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/${s}/docbook.${s}" \
|
|
"docbook.${s}" ${cat}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/${s}/docbook.${s}" \
|
|
"docbook.${s}" ${cat}
|
|
;;
|
|
rng)
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/${s}/docbook.${s}" \
|
|
"docbook.${s}" ${cat}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/${s}/docbook.${s}" \
|
|
"docbook.${s}" ${cat}
|
|
#
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/${s}/docbookxi.${s}" \
|
|
"docbookxi.${s}" ${cat}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/${s}/docbookxi.${s}" \
|
|
"docbookxi.${s}" ${cat}
|
|
#
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/${s}/docbook.rnc" \
|
|
"docbook.rnc" ${cat}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/${s}/docbook.rnc" \
|
|
"docbook.rnc" ${cat}
|
|
#
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/${s}/docbookxi.rnc" \
|
|
"docbookxi.rnc" ${cat}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/${s}/docbookxi.rnc" \
|
|
"docbookxi.rnc" ${cat}
|
|
;;
|
|
xsd)
|
|
# http://www.oasis-open.org/docbook/xml/5.0/xsd/docbookxi.xsd
|
|
# http://www.oasis-open.org/docbook/xml/5.0/xsd/xlink.xsd
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/${s}/docbook.${s}" \
|
|
"docbook.${s}" ${cat}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/${s}/docbook.${s}" \
|
|
"docbook.${s}" ${cat}
|
|
#
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/${s}/docbookxi.${s}" \
|
|
"docbookxi.${s}" ${cat}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/${s}/docbookxi.${s}" \
|
|
"docbookxi.${s}" ${cat}
|
|
# XLink + XML:
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/${s}/xlink.xsd" \
|
|
"xlink.xsd" ${cat}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/${s}/xlink.xsd" \
|
|
"xlink.xsd" ${cat}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://docbook.org/xml/${v}/${s}/xml.xsd" \
|
|
"xml.xsd" ${cat}
|
|
$xmlcatbin --noout --add "uri" \
|
|
"http://www.oasis-open.org/docbook/xml/${v}/${s}/xml.xsd" \
|
|
"xml.xsd" ${cat}
|
|
;;
|
|
esac
|
|
done
|
|
done
|
|
%define FOR_ROOT_CAT %{name}-%{version}-%{release}.xml
|
|
CATALOG=etc/xml/$CATALOG
|
|
rm -f %{FOR_ROOT_CAT}.tmp
|
|
$xmlcatbin --noout --create %{FOR_ROOT_CAT}.tmp
|
|
for v in %{version}; do
|
|
cat=%{xml_docbook_dtd_dir}/${v}/catalog.xml
|
|
# DTDs
|
|
$xmlcatbin --noout --add "delegatePublic" \
|
|
"-//OASIS//DTD DocBook XML ${v}//EN" \
|
|
"file://%{xml_docbook_dtd_dir}/${v}/catalog.xml" \
|
|
%{FOR_ROOT_CAT}.tmp
|
|
$xmlcatbin --noout --add "delegateSystem" \
|
|
"http://docbook.org/xml/${v}/dtd/" \
|
|
"file://%{xml_docbook_dtd_dir}/${v}/catalog.xml" \
|
|
%{FOR_ROOT_CAT}.tmp
|
|
#
|
|
$xmlcatbin --noout --add "delegateURI" \
|
|
"http://docbook.org/xml/${v}/rng/" \
|
|
"file://%{xml_docbook_rng_dir}/${v}/catalog.xml" \
|
|
%{FOR_ROOT_CAT}.tmp
|
|
$xmlcatbin --noout --add "delegateURI" \
|
|
"http://docbook.org/xml/${v}/xsd/" \
|
|
"file://%{xml_docbook_xsd_dir}/${v}/catalog.xml" \
|
|
%{FOR_ROOT_CAT}.tmp
|
|
$xmlcatbin --noout --add "delegateURI" \
|
|
"http://docbook.org/xml/${v}/sch/" \
|
|
"file://%{xml_docbook_sch_dir}/${v}/catalog.xml" \
|
|
%{FOR_ROOT_CAT}.tmp
|
|
done
|
|
# Create tag
|
|
sed '/<catalog/a\
|
|
<group id="%{name}-%{version}-%{release}">
|
|
/<\/catalog/i\
|
|
</group>' \
|
|
%{FOR_ROOT_CAT}.tmp > %{FOR_ROOT_CAT}
|
|
|
|
%install
|
|
if [ ! "x" = "x$RPM_BUILD_ROOT" ] ; then
|
|
rm -fr $RPM_BUILD_ROOT
|
|
%{INSTALL_DIR} $RPM_BUILD_ROOT
|
|
fi
|
|
# Create installation structure
|
|
%{INSTALL_DIR} $RPM_BUILD_ROOT%{xml_config_dir} \
|
|
$RPM_BUILD_ROOT%{_bindir} \
|
|
$RPM_BUILD_ROOT%{xml_docbook_style_dir}/upgrade
|
|
cat_dir=%{buildroot}/etc/xml
|
|
%{INSTALL_DIR} $cat_dir
|
|
%{INSTALL_DATA} %{FOR_ROOT_CAT} docbook_5.xml $cat_dir
|
|
%{INSTALL_DIR} $RPM_BUILD_ROOT%{xml_docbook_dtd_dir}/%{version} \
|
|
$RPM_BUILD_ROOT%{xml_docbook_rng_dir}/%{version} \
|
|
$RPM_BUILD_ROOT%{xml_docbook_sch_dir}/%{version} \
|
|
$RPM_BUILD_ROOT%{xml_docbook_xsd_dir}/%{version}
|
|
for v in %{version}; do
|
|
%{INSTALL_DATA} docbook-$v/dtd/* $RPM_BUILD_ROOT%{xml_docbook_dtd_dir}/$v
|
|
%{INSTALL_DATA} docbook-$v/rng/* $RPM_BUILD_ROOT%{xml_docbook_rng_dir}/$v
|
|
%{INSTALL_DATA} docbook-$v/sch/* $RPM_BUILD_ROOT%{xml_docbook_sch_dir}/$v
|
|
%{INSTALL_DATA} docbook-$v/xsd/* $RPM_BUILD_ROOT%{xml_docbook_xsd_dir}/$v
|
|
done
|
|
# Use the last version
|
|
%{INSTALL_DATA} docbook-$v/tools/db4-entities.pl $RPM_BUILD_ROOT%{_bindir}
|
|
%{INSTALL_DATA} docbook-$v/tools/db4-upgrade.xsl \
|
|
$RPM_BUILD_ROOT%{xml_docbook_style_dir}/upgrade
|
|
# Install NDVL file(s)
|
|
#for v in %{version}; do
|
|
# %{INSTALL_DATA} docbook-$v/docbook.nvdl $RPM_BUILD_ROOT%{xml_docbook_rng_dir}/$v
|
|
#done
|
|
|
|
%post
|
|
if [ -x /usr/bin/edit-xml-catalog ]; then
|
|
/usr/bin/edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
|
--add /etc/xml/%{FOR_ROOT_CAT}
|
|
fi
|
|
|
|
%postun
|
|
if [ -x /usr/bin/edit-xml-catalog ]; then
|
|
/usr/bin/edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
|
--del %{name}-%{version}-%{release}
|
|
fi
|
|
|
|
%clean
|
|
rm -fr $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
#%config %{sgml_config_dir}/CATALOG.*
|
|
%config %{xml_sysconf_dir}/docbook_5.xml
|
|
%config %{xml_sysconf_dir}/%{FOR_ROOT_CAT}
|
|
%doc README.SuSE
|
|
%doc docbook-%{version}-spec-cd-01.{pdf,html,xml}
|
|
# Use the last version of DocBook:
|
|
%doc docbook-%{version}/docs/* docbook-%{version}/docbook.nvdl
|
|
#%{sgml_dir}/CATALOG.*
|
|
%dir %{xml_docbook_dir}/schema
|
|
%dir %{xml_docbook_dtd_dir}
|
|
%dir %{xml_docbook_rng_dir}
|
|
%dir %{xml_docbook_sch_dir}
|
|
%dir %{xml_docbook_xsd_dir}
|
|
%dir %{xml_docbook_style_dir}
|
|
# 5.0
|
|
%{xml_docbook_dtd_dir}/%{version}
|
|
%{xml_docbook_rng_dir}/%{version}
|
|
%{xml_docbook_sch_dir}/%{version}
|
|
%{xml_docbook_xsd_dir}/%{version}
|
|
%{xml_docbook_style_dir}/upgrade
|
|
%{_bindir}/db4-entities.pl
|
|
|
|
%changelog
|
|
* Mon Feb 11 2008 toms@suse.de
|
|
- Release of version 5.0 (Committee Draft)
|
|
There are no user-visible changes in 5.0 (Public Review Draft 1).
|
|
This version of DocBook V5.0 will become the official Committee
|
|
Specification version of DocBook V5.0 as soon as the
|
|
Technical Committee balloting process is finished.
|
|
- Added DocBook Specification in PDF, HTML and XML
|
|
* Thu May 24 2007 toms@suse.de
|
|
- Updated to release 5.0CR4:
|
|
* Fixed RFE 1708032: Pattern naming inconsistency; changed
|
|
db.href.attribute to db.href.attributes.
|
|
* Fixed RFE 1700154: Added sortas to <termdef>.
|
|
* Fixed RFE 1686919: Added an NVDL rules file.
|
|
* Fixed RFE 1705596: Aded db.programming.inlines (<classname>,
|
|
<exceptionname>, <function>, <initializer>, <interfacename>,
|
|
<methodname>, <modifier>, <ooclass>, <ooexception>, <oointerface>,
|
|
<parameter>, <returnvalue>, <type>, and <varname>) to the
|
|
content model of <code>.
|
|
* Fixed RFE 1689228: Fixed typo in Schematron assertion.
|
|
* Fri Mar 23 2007 toms@suse.de
|
|
- Updated to release 5.0CR3:
|
|
* RFE 1679775: Changed semantics of <termdef>. A <firstterm> is now
|
|
required (instead of a <glossterm> as in previous releases). This
|
|
allows the definition of one term to refer to another.
|
|
* RFE 1682917: Added pgwide attribute to <example>.
|
|
* RFE 1644553: Added label attribute to CALS and HTML tables.
|
|
* RFE 1588693: Added an <acknowledgements> element, peer to
|
|
<dedication>, replacing <ackno> which had only been available at the
|
|
end of <article>.
|
|
* After several months of consideration and experimentation, we decided
|
|
to allow <info> in HTML tables.
|
|
* RFE 1673820: Adopted "http://docbook.org/xlink/role/olink" as an XLink
|
|
role (that is, the xlink:role attribute) value to identify OLinks
|
|
expressed using XLink attributes.
|
|
* Wed Mar 14 2007 toms@suse.de
|
|
- Updated to release 5.0CR2:
|
|
* Fixed RFE 1630203: Allow empty glossary.
|
|
* Fixed RFE 1627845: Allow optional caption on CALS table and informaltable.
|
|
* Related to RFE 1627845: Allow inlines in HTML table caption.
|
|
* Fixed RFE 1589139 (and RFE 1621178): Allow title and titleabbrev on qandaentry.
|
|
* Fixed RFE 1675932: Restore localname, prefix and namespace as class attribute values on tag.
|
|
* Fixed RFE 1669465: Schematron rules should refer to @xml:id, not @id.
|
|
* Mon Feb 19 2007 toms@suse.de
|
|
- First release of 5.0CR1
|