Accepting request 533605 from home:thomas-schraitle:branches:Publishing
- New version 5.1 - no DTD and XSD schemas for version 5.1 anymore! - Changes in spec file: - used spec-cleaner - removed obsolete stuff - install files through Makefile - install NVDL files under /usr/share/xml/docbook/schema/nvdl instead as "documentation" OBS-URL: https://build.opensuse.org/request/show/533605 OBS-URL: https://build.opensuse.org/package/show/Publishing/docbook_5?expand=0&rev=18
This commit is contained in:
parent
9a7bef228d
commit
d98791b915
90
Makefile
Normal file
90
Makefile
Normal file
@ -0,0 +1,90 @@
|
||||
#
|
||||
# Makefile to install DocBook 5.x
|
||||
#
|
||||
# Author:
|
||||
# Thomas Schraitle <toms@opensuse.org>
|
||||
#
|
||||
|
||||
ifndef PREFIX
|
||||
PREFIX := /usr
|
||||
endif
|
||||
|
||||
SHELL := /bin/bash
|
||||
PACKAGE := docbook_5
|
||||
VERSION := 5.1
|
||||
CDIR := $(shell pwd)
|
||||
#
|
||||
DATADIR := $(PREFIX)/share
|
||||
#
|
||||
BINDIR := $(DESTDIR)$(PREFIX)/bin
|
||||
# Catalog stuff
|
||||
DB_CATALOG_SRC := $(PACKAGE).xml
|
||||
CATALOG_DIR := $(DESTDIR)/etc/xml/catalog.d
|
||||
DB_CATALOG := $(CATALOG_DIR)/$(DB_CATALOG_SRC)
|
||||
#
|
||||
DB_XML_PATH := $(DESTDIR)$(DATADIR)/xml/docbook
|
||||
SCHEMA_PATH := $(DB_XML_PATH)/schema
|
||||
#
|
||||
XSLT_PATH := $(DB_XML_PATH)/stylesheet/upgrade
|
||||
#
|
||||
DTD_PATH := $(SCHEMA_PATH)/dtd
|
||||
RNG_PATH := $(SCHEMA_PATH)/rng
|
||||
SCH_PATH := $(SCHEMA_PATH)/sch
|
||||
XSD_PATH := $(SCHEMA_PATH)/xsd
|
||||
NVDL_PATH := $(SCHEMA_PATH)/nvdl
|
||||
#
|
||||
PATHS_50 := $(DTD_PATH)/5.0 $(RNG_PATH)/5.0 $(SCH_PATH)/5.0 $(XSD_PATH)/5.0 $(NVDL_PATH)/5.0
|
||||
PATHS_51 := $(RNG_PATH)/5.1 $(SCH_PATH)/5.1 $(NVDL_PATH)/5.1
|
||||
#
|
||||
DB_VERSIONS := 5.0 5.1
|
||||
|
||||
INST_DIRECTORIES := $(PATHS_50) $(PATHS_51) $(CATALOG_DIR) $(BINDIR) $(XSLT_PATH)
|
||||
|
||||
#-----------------------------
|
||||
all: $(DB_CATALOG)
|
||||
all: $(BINDIR)/db4-entities.pl
|
||||
all: $(XSLT_PATH)/db4-upgrade.xsl
|
||||
all: installdb50 installdb51
|
||||
@echo "Ready."
|
||||
|
||||
|
||||
#-----------------------------
|
||||
.PHONY: installdb50
|
||||
installdb50: | $(PATHS_50)
|
||||
@echo "### Installing DocBook 5.0 DTD, XSD, NVDL, RNG, and SCH"
|
||||
install -m644 docbook-5.0/dtd/docbook.dtd $(DTD_PATH)/5.0
|
||||
install -m644 docbook-5.0/docbook.nvdl $(NVDL_PATH)/5.0
|
||||
install -m644 docbook-5.0/xsd/*.xsd $(XSD_PATH)/5.0
|
||||
install -m644 docbook-5.0/rng/* $(RNG_PATH)/5.0
|
||||
install -m644 docbook-5.0/sch/* $(SCH_PATH)/5.0
|
||||
|
||||
.PHONY: installdb51
|
||||
installdb51: | $(PATHS_51)
|
||||
@echo "### Installing DocBook 5.1 NVDL, RNG, and SCH"
|
||||
install -m644 docbook-5.1/docbook.nvdl $(NVDL_PATH)/5.1
|
||||
install -m644 docbook-5.1/rng/* $(RNG_PATH)/5.1
|
||||
install -m644 docbook-5.1/sch/* $(SCH_PATH)/5.1
|
||||
|
||||
|
||||
.PHONY: install
|
||||
install: all | $(INST_DIRECTORIES)
|
||||
|
||||
|
||||
|
||||
$(DB_CATALOG): $(DB_CATALOG_SRC) | $(CATALOG_DIR)
|
||||
@echo "### Installing XML Catalog..."
|
||||
install -m644 $< $@
|
||||
|
||||
|
||||
$(BINDIR)/db4-entities.pl: docbook-5.1/tools/db4-entities.pl | $(BINDIR)
|
||||
@echo "### Installing script db4-entities.pl"
|
||||
install -m655 $< $@
|
||||
|
||||
$(XSLT_PATH)/db4-upgrade.xsl: docbook-5.1/tools/db4-upgrade.xsl | $(XSLT_PATH)
|
||||
@echo "### Installing upgrade stylesheet..."
|
||||
install -m644 $< $@
|
||||
|
||||
# create needed directories
|
||||
#
|
||||
$(INST_DIRECTORIES):
|
||||
@mkdir -p $@
|
BIN
docbook-5.0-docs.tar.bz2
(Stored with Git LFS)
Normal file
BIN
docbook-5.0-docs.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a3555f07b06b0ee33a35f069ae7c16950e318d8b902da4bdc30af997de6fa4bb
|
||||
size 93197
|
File diff suppressed because it is too large
Load Diff
BIN
docbook-5.1-docs.tar.bz2
(Stored with Git LFS)
Normal file
BIN
docbook-5.1-docs.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
docbook-5.1.tar.bz2
(Stored with Git LFS)
Normal file
BIN
docbook-5.1.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6cefc3a9aa197e053c750d0b47d2d5694a5e5082d4788be510ae8e0ed4265733
|
||||
size 291821
|
@ -1,18 +1,20 @@
|
||||
README.SUSE (2015-02-17)
|
||||
README.SUSE (2017-10-12)
|
||||
=====================================
|
||||
|
||||
XML CATALOG Files
|
||||
------------------
|
||||
XML CATALOG File
|
||||
----------------
|
||||
|
||||
XML catalogs are available through /etc/xml/catalog which points to
|
||||
/etc/xml/suse-catalog.xml.
|
||||
The main DocBook catalog is located in /etc/xml/catalog.d/docbook_5.xml
|
||||
|
||||
|
||||
DocBook V5.1CR3
|
||||
---------------
|
||||
|
||||
Currently, this is a candidate release (CR). It doesn't come with a
|
||||
decent DTD, nor with an XSD.
|
||||
DocBook V5.1
|
||||
------------
|
||||
|
||||
DocBook is a general purpose schema particularly well suited to books and
|
||||
papers about computer hardware and software (though it is by no means
|
||||
limited to these applications).
|
||||
|
||||
The Version 5.1 release introduces assemblies for topic-oriented authoring.
|
||||
It also addresses a selection of bugs and feature requests.
|
||||
|
||||
For further details, see the documentation in the package docbook_5-doc
|
||||
|
@ -1,3 +1,18 @@
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 11 15:10:23 UTC 2017 - thomas.schraitle@suse.com
|
||||
|
||||
- New version 5.1
|
||||
- no DTD and XSD schemas for version 5.1 anymore!
|
||||
|
||||
- Changes in spec file:
|
||||
- used spec-cleaner
|
||||
- removed obsolete stuff
|
||||
- install files through Makefile
|
||||
- install NVDL files under /usr/share/xml/docbook/schema/nvdl
|
||||
instead as "documentation"
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 17 12:00:51 UTC 2016 - fvogt@suse.com
|
||||
|
||||
|
193
docbook_5.spec
193
docbook_5.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package docbook_5
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 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
|
||||
@ -16,38 +16,41 @@
|
||||
#
|
||||
|
||||
|
||||
%define schemaversions 5.0 5.1
|
||||
%define lastschemaversion 5.1
|
||||
#
|
||||
Name: docbook_5
|
||||
Version: 5.1.0
|
||||
Release: 0
|
||||
Summary: DocBook Schemas (DTD, RELAX NG, W3C Schema) for Version 5.x
|
||||
License: SUSE-Oasis-Specification-Notice
|
||||
Group: Productivity/Publishing/DocBook
|
||||
Version: 5.1CR3
|
||||
Release: 0
|
||||
Url: http://www.oasis-open.org/docbook/
|
||||
# XML Catalog Entry
|
||||
Source1: docbook_5.xml
|
||||
Source2: docbook_5-README.SUSE
|
||||
# DocBook Sources
|
||||
Source3: docbook-5.0-docs.tar.bz2
|
||||
Source4: docbook-5.1-docs.tar.bz2
|
||||
Source5: Makefile
|
||||
# DB 5.0
|
||||
Source500: docbook-5.0.tar.bz2
|
||||
# DB 5.1
|
||||
Source510: docbook-5.1.tar.bz2
|
||||
#
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: sgml-skel
|
||||
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
|
||||
Source4: docbook-5.0-spec-cd-01.html
|
||||
Source5: docbook-5.0-spec-cd-01.xml
|
||||
# DB 5.0
|
||||
Source500: docbook-5.0.tar.bz2
|
||||
# DB 5.1CR3
|
||||
Source510: docbook-5.1CR3.tar.bz2
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
Url: http://www.oasis-open.org/docbook/
|
||||
|
||||
%define schemaversions 5.0 5.1
|
||||
%define lastschemaversion 5.1
|
||||
|
||||
%description
|
||||
The version 5.0 release is a complete rewrite of DocBook in RELAX NG.
|
||||
DocBook is a schema. It is particularly well-suited to books and papers
|
||||
about computer hardware and software (though it is not limited to these
|
||||
applications at all).
|
||||
|
||||
The version 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.
|
||||
@ -58,12 +61,8 @@ Group: Documentation/HTML
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
The documentation for the DocBook 5.x specification (%schemaversions)
|
||||
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
|
||||
%define INSTALL_SCRIPT install -m755
|
||||
%define xml_dir %{_datadir}/xml
|
||||
%define xml_docbook_dir %{xml_dir}/docbook
|
||||
%define xml_schema_dir %{xml_dir}/docbook/schema
|
||||
@ -71,130 +70,35 @@ The documentation for the DocBook 5.x specification (%schemaversions)
|
||||
%define xml_docbook_rng_dir %{xml_schema_dir}/rng
|
||||
%define xml_docbook_sch_dir %{xml_schema_dir}/sch
|
||||
%define xml_docbook_xsd_dir %{xml_schema_dir}/xsd
|
||||
%define xml_docbook_nvdl_dir %{xml_schema_dir}/nvdl
|
||||
%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_config_dir %{_localstatedir}/lib/xml
|
||||
%define xml_sysconf_dir %{_sysconfdir}/xml
|
||||
|
||||
%prep
|
||||
%setup -n %{name} -c -T
|
||||
# Copy catalog
|
||||
cp -p %{S:1} .
|
||||
# Copy README
|
||||
cp -p %{S:2} .
|
||||
# Copy the DocBook Specifications:
|
||||
cp %{S:3} %{S:4} %{S:5} .
|
||||
%setup -q -n %{name} -c -T
|
||||
# Copy catalog, README, and Makefile
|
||||
cp -p %{SOURCE1} %{SOURCE2} %{SOURCE5} .
|
||||
|
||||
tar -xjf %{S:500}
|
||||
tar -xjf %{S:510}
|
||||
|
||||
mv docbook-%{version} docbook-%{lastschemaversion}
|
||||
# Unpack the sources:
|
||||
tar -xf %{SOURCE500}
|
||||
tar -xf %{SOURCE510}
|
||||
# Unpack the documentation:
|
||||
tar -xf %{SOURCE3}
|
||||
tar -xf %{SOURCE4}
|
||||
|
||||
chmod -R a+rX,g-w,o-w .
|
||||
find . -type f | xargs chmod a-x
|
||||
|
||||
%build
|
||||
xmlcatbin=/usr/bin/xmlcatalog
|
||||
|
||||
# ---------------------
|
||||
# Build XML catalog files for each Schema
|
||||
|
||||
for v in %{schemaversions}; do
|
||||
|
||||
for s in dtd rng sch xsd; do
|
||||
cat=docbook-${v}/${s}/catalog.xml
|
||||
$xmlcatbin --noout --create ${cat}
|
||||
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"-//OASIS//DTD DocBook XML ${v}//EN" \
|
||||
"docbook.dtd" ${cat}
|
||||
|
||||
for http in "http://www.oasis-open.org/docbook/xml" \
|
||||
"http://www.docbook.org/xml" \
|
||||
"http://docbook.org/xml" ; do
|
||||
|
||||
case ${s} in
|
||||
dtd)
|
||||
$xmlcatbin --noout --add "system" \
|
||||
"${http}/${v}/dtd/docbook.dtd" \
|
||||
"docbook.dtd" ${cat}
|
||||
;;
|
||||
rng)
|
||||
for ff in docbook.rng docbook.rnc \
|
||||
"docbookxi.${s}" docbookxi.rnc \
|
||||
assembly.rng assembly.rnc \
|
||||
dbits.rng dbits.rnc; do
|
||||
$xmlcatbin --noout --add "system" \
|
||||
"${http}/${v}/${s}/${ff}" \
|
||||
"${ff}" ${cat}
|
||||
$xmlcatbin --noout --add "uri" \
|
||||
"${http}/${v}/${s}/${ff}" \
|
||||
"${ff}" ${cat}
|
||||
done
|
||||
;;
|
||||
sch)
|
||||
$xmlcatbin --noout --add "system" \
|
||||
"${http}/${v}/${s}/docbook.${s}" \
|
||||
"docbook.${s}" ${cat}
|
||||
$xmlcatbin --noout --add "uri" \
|
||||
"${http}/${v}/${s}/docbook.${s}" \
|
||||
"docbook.${s}" ${cat}
|
||||
;;
|
||||
xsd)
|
||||
for ff in "docbook.${s}" "docbookxi.${s}" xlink.xsd xml.xsd; do
|
||||
$xmlcatbin --noout --add "system" \
|
||||
"${http}/${v}/${s}/${ff}" \
|
||||
"${ff}" ${cat}
|
||||
$xmlcatbin --noout --add "uri" \
|
||||
"${http}/${v}/${s}/${ff}" \
|
||||
"${ff}" ${cat}
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
done
|
||||
done
|
||||
# Nothing to build
|
||||
|
||||
%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/catalog.d
|
||||
%{INSTALL_DIR} $cat_dir
|
||||
%{INSTALL_DATA} %{name}.xml $cat_dir
|
||||
|
||||
for v in %{schemaversions}; do
|
||||
# Create directories
|
||||
mkdir -p $RPM_BUILD_ROOT%{xml_docbook_dtd_dir}/$v \
|
||||
$RPM_BUILD_ROOT%{xml_docbook_rng_dir}/$v \
|
||||
$RPM_BUILD_ROOT%{xml_docbook_sch_dir}/$v \
|
||||
$RPM_BUILD_ROOT%{xml_docbook_xsd_dir}/$v
|
||||
#
|
||||
%{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 latest version. If not found, fall back to 5.0
|
||||
if [ ! -e docbook-$v/tools/db4-entities.pl ] ; then
|
||||
v=5.0
|
||||
fi
|
||||
|
||||
%{INSTALL_SCRIPT} 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
|
||||
make DESTDIR=%{buildroot}
|
||||
|
||||
# cleanup
|
||||
%fdupes $RPM_BUILD_ROOT
|
||||
%fdupes %{buildroot}
|
||||
|
||||
%post
|
||||
update-xml-catalog
|
||||
@ -203,32 +107,33 @@ update-xml-catalog
|
||||
update-xml-catalog
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%config %{xml_sysconf_dir}/catalog.d/docbook_5.xml
|
||||
%doc *README*
|
||||
# Use the last version of DocBook:
|
||||
%doc docbook-%{lastschemaversion}/docbook.nvdl
|
||||
#
|
||||
%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_nvdl_dir}
|
||||
%dir %{xml_docbook_style_dir}
|
||||
# 5.0
|
||||
%{xml_docbook_dtd_dir}/5.0
|
||||
%{xml_docbook_rng_dir}/5.0
|
||||
%{xml_docbook_sch_dir}/5.0
|
||||
%{xml_docbook_xsd_dir}/5.0
|
||||
%{xml_docbook_style_dir}/upgrade
|
||||
# 5.1CR3
|
||||
%{xml_docbook_dtd_dir}/%{lastschemaversion}
|
||||
%{xml_docbook_nvdl_dir}/5.0
|
||||
# 5.1
|
||||
%{xml_docbook_rng_dir}/%{lastschemaversion}
|
||||
%{xml_docbook_sch_dir}/%{lastschemaversion}
|
||||
%{xml_docbook_xsd_dir}/%{lastschemaversion}
|
||||
%{xml_docbook_nvdl_dir}/%{lastschemaversion}
|
||||
# Upgrade stylesheet
|
||||
%{xml_docbook_style_dir}/upgrade
|
||||
#
|
||||
%{_bindir}/db4-entities.pl
|
||||
|
||||
%files doc
|
||||
%defattr(-, root, root)
|
||||
%doc docbook-5.0/docs/* docbook-5.0-spec-cd-01.{pdf,html,xml}
|
||||
%doc docbook*spec-cd-01.{pdf,html,xml}
|
||||
%doc docbook*-os.{pdf,html,xml}
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user