Accepting request 403806 from home:favogt:branches:Publishing
Split documentation into -doc subpackage Use newer sgml-spec OBS-URL: https://build.opensuse.org/request/show/403806 OBS-URL: https://build.opensuse.org/package/show/Publishing/docbook_5?expand=0&rev=16
This commit is contained in:
parent
ff3800ac8f
commit
9a7bef228d
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 17 12:00:51 UTC 2016 - fvogt@suse.com
|
||||
|
||||
- Split documentation into -doc subpackage
|
||||
- Use newer sgml-spec
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 12 12:44:54 UTC 2015 - toms@opensuse.org
|
||||
|
||||
|
142
docbook_5.spec
142
docbook_5.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package docbook_5
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -22,11 +22,13 @@ License: SUSE-Oasis-Specification-Notice
|
||||
Group: Productivity/Publishing/DocBook
|
||||
Version: 5.1CR3
|
||||
Release: 0
|
||||
# Requires: libxml2
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: sgml-skel
|
||||
PreReq: /usr/bin/xmlcatalog sgml-skel
|
||||
PreReq: sed grep awk
|
||||
Requires: sgml-skel >= 0.7
|
||||
Requires(post): sgml-skel >= 0.7
|
||||
Requires(postun): sgml-skel >= 0.7
|
||||
# XML Catalog Entry
|
||||
Source1: docbook_5.xml
|
||||
Source2: docbook_5-README.SUSE
|
||||
# DocBook Specifications:
|
||||
Source3: docbook-5.0-spec-cd-01.pdf
|
||||
@ -50,6 +52,14 @@ 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.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: Documentation/HTML
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
The documentation for the DocBook 5.x specification (%schemaversions)
|
||||
|
||||
%define INSTALL install -m755 -s
|
||||
%define INSTALL_DIR install -d -m755
|
||||
%define INSTALL_DATA install -m644
|
||||
@ -68,6 +78,8 @@ have arisen as a natural consequence of DocBook's long, slow evolution.
|
||||
|
||||
%prep
|
||||
%setup -n %{name} -c -T
|
||||
# Copy catalog
|
||||
cp -p %{S:1} .
|
||||
# Copy README
|
||||
cp -p %{S:2} .
|
||||
# Copy the DocBook Specifications:
|
||||
@ -82,55 +94,7 @@ 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=%{name}.xml
|
||||
$xmlcatbin --create --noout $CATALOG
|
||||
|
||||
# Iterate over all versions...
|
||||
for v in %{schemaversions}; do
|
||||
|
||||
docbookdir=%{xml_docbook_dtd_dir}/${v}
|
||||
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"-//OASIS//DTD DocBook XML ${v}//EN" \
|
||||
"file://%{xml_docbook_dtd_dir}/${v}/docbook.dtd" ${CATALOG}
|
||||
|
||||
# We need to create lots of URIs...
|
||||
for http in "http://www.oasis-open.org/docbook/xml" \
|
||||
"http://www.docbook.org/xml" \
|
||||
"http://docbook.org/xml" ; do
|
||||
# DTDs
|
||||
$xmlcatbin --noout --add "rewriteSystem" \
|
||||
"${http}/${v}" \
|
||||
"file://$docbookdir" $CATALOG
|
||||
$xmlcatbin --noout --add "rewriteURI" \
|
||||
"${http}/${v}" \
|
||||
"file://$docbookdir" $CATALOG
|
||||
# RNG, RNG+XInclude
|
||||
$xmlcatbin --noout --add "rewriteSystem" \
|
||||
"${http}/${v}/rng/" \
|
||||
"file://%{xml_docbook_rng_dir}/${v}/" ${CATALOG}
|
||||
$xmlcatbin --noout --add "rewriteURI" \
|
||||
"${http}/${v}/rng/" \
|
||||
"file://%{xml_docbook_rng_dir}/${v}/" ${CATALOG}
|
||||
# XSD, XSD+XInclude
|
||||
$xmlcatbin --noout --add "rewriteSystem" \
|
||||
"${http}/${v}/xsd/" \
|
||||
"file://%{xml_docbook_xsd_dir}/${v}/" ${CATALOG}
|
||||
$xmlcatbin --noout --add "rewriteURI" \
|
||||
"${http}/${v}/xsd/" \
|
||||
"file://%{xml_docbook_xsd_dir}/${v}/" ${CATALOG}
|
||||
# Schematron
|
||||
$xmlcatbin --noout --add "rewriteSystem" \
|
||||
"${http}/${v}/sch/" \
|
||||
"file://%{xml_docbook_sch_dir}/${v}/" ${CATALOG}
|
||||
$xmlcatbin --noout --add "rewriteURI" \
|
||||
"${http}/${v}/sch/" \
|
||||
"file://%{xml_docbook_sch_dir}/${v}/" ${CATALOG}
|
||||
done
|
||||
|
||||
done
|
||||
|
||||
# ---------------------
|
||||
# Build XML catalog files for each Schema
|
||||
@ -193,57 +157,14 @@ for v in %{schemaversions}; do
|
||||
done
|
||||
done
|
||||
|
||||
%define FOR_ROOT_CAT for-catalog-%{name}-%{version}.xml
|
||||
CATALOG=etc/xml/$CATALOG
|
||||
rm -f %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --create %{FOR_ROOT_CAT}.tmp
|
||||
|
||||
for v in %{schemaversions}; 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
|
||||
|
||||
for http in "http://www.oasis-open.org/docbook/xml" \
|
||||
"http://www.docbook.org/xml" \
|
||||
"http://docbook.org/xml" ; do
|
||||
$xmlcatbin --noout --add "delegateSystem" \
|
||||
"${http}/${v}/dtd/" \
|
||||
"file://%{xml_docbook_dtd_dir}/${v}/catalog.xml" \
|
||||
%{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegateSystem" \
|
||||
"${http}/${v}/rng/" \
|
||||
"file://%{xml_docbook_rng_dir}/${v}/catalog.xml" \
|
||||
%{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegateSystem" \
|
||||
"${http}/${v}/xsd/" \
|
||||
"file://%{xml_docbook_xsd_dir}/${v}/catalog.xml" \
|
||||
%{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegateSystem" \
|
||||
"${http}/${v}/sch/" \
|
||||
"file://%{xml_docbook_sch_dir}/${v}/catalog.xml" \
|
||||
%{FOR_ROOT_CAT}.tmp
|
||||
done
|
||||
done
|
||||
|
||||
# Create tag
|
||||
sed '/<catalog/a\
|
||||
<group id="%{name}-%{version}">
|
||||
/<\/catalog/i\
|
||||
</group>' \
|
||||
%{FOR_ROOT_CAT}.tmp > %{FOR_ROOT_CAT}
|
||||
|
||||
%install
|
||||
# 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
|
||||
cat_dir=%{buildroot}/etc/xml/catalog.d
|
||||
%{INSTALL_DIR} $cat_dir
|
||||
%{INSTALL_DATA} %{FOR_ROOT_CAT} %{name}.xml $cat_dir
|
||||
%{INSTALL_DATA} %{name}.xml $cat_dir
|
||||
|
||||
for v in %{schemaversions}; do
|
||||
# Create directories
|
||||
@ -276,31 +197,17 @@ fi
|
||||
%fdupes $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
# in case of an update, remove old
|
||||
if [ "2" = "$1" ]; then
|
||||
/usr/bin/edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||
--del %{name}-%{version} || true
|
||||
fi
|
||||
/usr/bin/edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||
--add /etc/xml/%{FOR_ROOT_CAT}
|
||||
update-xml-catalog
|
||||
|
||||
%postun
|
||||
# remove entries only on removal of file
|
||||
|
||||
if [ "0" = "$1" -a ! -f %{xml_sysconf_dir}/%{FOR_ROOT_CAT} ] ; then
|
||||
/usr/bin/edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||
--del %{name}-%{version}
|
||||
fi
|
||||
update-xml-catalog
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%config %{xml_sysconf_dir}/docbook_5.xml
|
||||
%config %{xml_sysconf_dir}/%{FOR_ROOT_CAT}
|
||||
%config %{xml_sysconf_dir}/catalog.d/docbook_5.xml
|
||||
%doc *README*
|
||||
%doc docbook-5.0-spec-cd-01.{pdf,html,xml}
|
||||
# Use the last version of DocBook:
|
||||
%doc docbook-5.0/docs/* docbook-%{lastschemaversion}/docbook.nvdl
|
||||
#%%{sgml_dir}/CATALOG.*
|
||||
%doc docbook-%{lastschemaversion}/docbook.nvdl
|
||||
%dir %{xml_docbook_dir}/schema
|
||||
%dir %{xml_docbook_dtd_dir}
|
||||
%dir %{xml_docbook_rng_dir}
|
||||
@ -318,7 +225,10 @@ fi
|
||||
%{xml_docbook_rng_dir}/%{lastschemaversion}
|
||||
%{xml_docbook_sch_dir}/%{lastschemaversion}
|
||||
%{xml_docbook_xsd_dir}/%{lastschemaversion}
|
||||
|
||||
%{_bindir}/db4-entities.pl
|
||||
|
||||
%files doc
|
||||
%defattr(-, root, root)
|
||||
%doc docbook-5.0/docs/* docbook-5.0-spec-cd-01.{pdf,html,xml}
|
||||
|
||||
%changelog
|
||||
|
56
docbook_5.xml
Normal file
56
docbook_5.xml
Normal file
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
|
||||
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
|
||||
<group id="docbook_5">
|
||||
<public publicId="-//OASIS//DTD DocBook XML 5.0//EN" uri="file:///usr/share/xml/docbook/schema/dtd/5.0/docbook.dtd"/>
|
||||
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/5.0" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.0"/>
|
||||
<rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/5.0" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.0"/>
|
||||
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/5.0/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.0/"/>
|
||||
<rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/5.0/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.0/"/>
|
||||
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/5.0/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.0/"/>
|
||||
<rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/5.0/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.0/"/>
|
||||
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/5.0/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.0/"/>
|
||||
<rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/5.0/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.0/"/>
|
||||
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/5.0" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.0"/>
|
||||
<rewriteURI uriStartString="http://www.docbook.org/xml/5.0" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.0"/>
|
||||
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/5.0/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.0/"/>
|
||||
<rewriteURI uriStartString="http://www.docbook.org/xml/5.0/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.0/"/>
|
||||
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/5.0/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.0/"/>
|
||||
<rewriteURI uriStartString="http://www.docbook.org/xml/5.0/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.0/"/>
|
||||
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/5.0/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.0/"/>
|
||||
<rewriteURI uriStartString="http://www.docbook.org/xml/5.0/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.0/"/>
|
||||
<rewriteSystem systemIdStartString="http://docbook.org/xml/5.0" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.0"/>
|
||||
<rewriteURI uriStartString="http://docbook.org/xml/5.0" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.0"/>
|
||||
<rewriteSystem systemIdStartString="http://docbook.org/xml/5.0/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.0/"/>
|
||||
<rewriteURI uriStartString="http://docbook.org/xml/5.0/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.0/"/>
|
||||
<rewriteSystem systemIdStartString="http://docbook.org/xml/5.0/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.0/"/>
|
||||
<rewriteURI uriStartString="http://docbook.org/xml/5.0/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.0/"/>
|
||||
<rewriteSystem systemIdStartString="http://docbook.org/xml/5.0/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.0/"/>
|
||||
<rewriteURI uriStartString="http://docbook.org/xml/5.0/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.0/"/>
|
||||
<public publicId="-//OASIS//DTD DocBook XML 5.1//EN" uri="file:///usr/share/xml/docbook/schema/dtd/5.1/docbook.dtd"/>
|
||||
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/5.1" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.1"/>
|
||||
<rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/5.1" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.1"/>
|
||||
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/5.1/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.1/"/>
|
||||
<rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/5.1/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.1/"/>
|
||||
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/5.1/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.1/"/>
|
||||
<rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/5.1/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.1/"/>
|
||||
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/5.1/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.1/"/>
|
||||
<rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/5.1/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.1/"/>
|
||||
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/5.1" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.1"/>
|
||||
<rewriteURI uriStartString="http://www.docbook.org/xml/5.1" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.1"/>
|
||||
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/5.1/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.1/"/>
|
||||
<rewriteURI uriStartString="http://www.docbook.org/xml/5.1/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.1/"/>
|
||||
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/5.1/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.1/"/>
|
||||
<rewriteURI uriStartString="http://www.docbook.org/xml/5.1/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.1/"/>
|
||||
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/5.1/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.1/"/>
|
||||
<rewriteURI uriStartString="http://www.docbook.org/xml/5.1/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.1/"/>
|
||||
<rewriteSystem systemIdStartString="http://docbook.org/xml/5.1" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.1"/>
|
||||
<rewriteURI uriStartString="http://docbook.org/xml/5.1" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/5.1"/>
|
||||
<rewriteSystem systemIdStartString="http://docbook.org/xml/5.1/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.1/"/>
|
||||
<rewriteURI uriStartString="http://docbook.org/xml/5.1/rng/" rewritePrefix="file:///usr/share/xml/docbook/schema/rng/5.1/"/>
|
||||
<rewriteSystem systemIdStartString="http://docbook.org/xml/5.1/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.1/"/>
|
||||
<rewriteURI uriStartString="http://docbook.org/xml/5.1/xsd/" rewritePrefix="file:///usr/share/xml/docbook/schema/xsd/5.1/"/>
|
||||
<rewriteSystem systemIdStartString="http://docbook.org/xml/5.1/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.1/"/>
|
||||
<rewriteURI uriStartString="http://docbook.org/xml/5.1/sch/" rewritePrefix="file:///usr/share/xml/docbook/schema/sch/5.1/"/>
|
||||
</group>
|
||||
</catalog>
|
Loading…
Reference in New Issue
Block a user