summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Necib ÇAPAR2022-08-13 03:41:10 +0200
committer Willy Sudiarto Raharjo2022-08-13 03:41:10 +0200
commit17d03b859dae24cc455a0aaa84921e9173ae1199 (patch)
tree110a5d6b84685d4922195be23c5c074addef2fd6
parent7b841676836d42940b2d6ac667efaa90d99a12e2 (diff)
downloadslackbuilds-17d03b859dae24cc455a0aaa84921e9173ae1199.tar.gz
system/docbook-xml5: Added (DocBook XML V5.0).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/docbook-xml5/README20
-rw-r--r--system/docbook-xml5/docbook-xml5.SlackBuild94
-rw-r--r--system/docbook-xml5/docbook-xml5.info10
-rw-r--r--system/docbook-xml5/doinst.sh114
-rw-r--r--system/docbook-xml5/douninst.sh6
-rw-r--r--system/docbook-xml5/slack-desc19
6 files changed, 263 insertions, 0 deletions
diff --git a/system/docbook-xml5/README b/system/docbook-xml5/README
new file mode 100644
index 0000000000..733596e825
--- /dev/null
+++ b/system/docbook-xml5/README
@@ -0,0 +1,20 @@
+'docbook-xml5' is a group of shell scripts and
+required files used for creating a removable
+SlackBuild package for DocBook5 XML dtd and schemas
+with XML stylesheets in a namespace.
+
+After the installation of the DocBook5 XML dtd and schemas
+with XML stylesheets in a namespace /etc/xml/docbook
+catalog file will be created if it DOESN'T exist otherwise
+it will be updated accordingly depending on the installation
+state of the 'docbookMathML1mods' package. Also following
+symbolic links will be created for the XML stylesheets
+that must be used with DocBook5 XML dtd and schemas:
+
+ /usr/share/xml/docbook/stylesheet/docbook-xsl-ns
+ /usr/share/xml/docbook/xsl-ns-stylesheets
+
+After uninstallation of the 'docbook-xml5' package
+/etc/xml/docbook and /usr/share/xml/ will be reset
+automatically to the original state defined by the
+'linuxdoc-tools'
diff --git a/system/docbook-xml5/docbook-xml5.SlackBuild b/system/docbook-xml5/docbook-xml5.SlackBuild
new file mode 100644
index 0000000000..523d5416aa
--- /dev/null
+++ b/system/docbook-xml5/docbook-xml5.SlackBuild
@@ -0,0 +1,94 @@
+#!/bin/bash
+
+# docbook-xml5.SlackBuild - SlackBuild script for creating a pkg. of DocBook5 DTD and Schemas
+# Copyright © 2022 Necib ÇAPAR <necipcapar@gmail.com>
+
+# This file is part of docbook-xml5
+
+# docbook-xml5 is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# docbook-xml5 is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=docbook-xml5
+VERSION=${VERSION:-5.0.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+ARCH=noarch
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# create installation directory tree for the original files
+mkdir --parents $PKG/usr/share/xml/docbook/5.0
+cp --archive $TMP/$PRGNAM-$VERSION/docbook-5.0/* $PKG/usr/share/xml/docbook/5.0/
+cp --archive $TMP/$PRGNAM-$VERSION/catalog_docbook-5.0.0.xml $PKG/usr/share/xml/docbook/5.0/
+cp --archive $TMP/$PRGNAM-$VERSION/xsl-ns-stylesheets-1.79.2 $PKG/usr/share/xml/docbook/
+# create symbolic-links
+mkdir --parents $PKG/usr/share/xml/docbook/stylesheet
+cd $PKG/usr/share/xml/docbook/stylesheet
+ln -sf ../xsl-ns-stylesheets-1.79.2 docbook-xsl-ns
+cd ..
+ln -sf xsl-ns-stylesheets-1.79.2 xsl-ns-stylesheets
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/xml/docbook/5.0/{ChangeLog,README,VERSION,docs} $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/douninst.sh > $PKG/install/douninst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/docbook-xml5/docbook-xml5.info b/system/docbook-xml5/docbook-xml5.info
new file mode 100644
index 0000000000..4b59e67ea4
--- /dev/null
+++ b/system/docbook-xml5/docbook-xml5.info
@@ -0,0 +1,10 @@
+PRGNAM="docbook-xml5"
+VERSION="5.0.0"
+HOMEPAGE="https://github.com/N-Tek/docbook-xml5"
+DOWNLOAD="https://github.com/N-Tek/docbook-xml5/releases/download/v5.0.0/docbook-xml5-5.0.0.tar.gz"
+MD5SUM="d2c9b3f7469e691c2c7c81c0c9090901"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="%README%"
+MAINTAINER="Necib ÇAPAR"
+EMAIL="necipcapar@gmail.com"
diff --git a/system/docbook-xml5/doinst.sh b/system/docbook-xml5/doinst.sh
new file mode 100644
index 0000000000..784c61c307
--- /dev/null
+++ b/system/docbook-xml5/doinst.sh
@@ -0,0 +1,114 @@
+catalog_filepath=etc/xml/docbook
+
+if [ ! -e etc/xml ]; then
+ mkdir -p etc/xml
+ xmlcatalog --noout --create $catalog_filepath
+fi
+
+# DocBook V4.5 Entries
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//DTD DocBook XML V4.5//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
+ $catalog_filepath
+xmlcatalog --noout --add 'rewriteSystem' \
+ "http://www.oasis-open.org/docbook/xml/4.5" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ $catalog_filepath
+xmlcatalog --noout --add 'rewriteURI' \
+ "http://www.oasis-open.org/docbook/xml/4.5" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//DTD DocBook XML V4.1.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" \
+ $catalog_filepath
+xmlcatalog --noout --add 'rewriteSystem' \
+ "http://www.oasis-open.org/docbook/xml/4.1.2" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ $catalog_filepath
+xmlcatalog --noout --add 'rewriteURI' \
+ "http://www.oasis-open.org/docbook/xml/4.1.2" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//DTD DocBook XML V4.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" \
+ $catalog_filepath
+xmlcatalog --noout --add 'rewriteSystem' \
+ "http://www.oasis-open.org/docbook/xml/4.2" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ $catalog_filepath
+xmlcatalog --noout --add 'rewriteURI' \
+ "http://www.oasis-open.org/docbook/xml/4.2" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//DTD DocBook XML V4.3//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
+ $catalog_filepath
+xmlcatalog --noout --add 'rewriteSystem' \
+ "http://www.oasis-open.org/docbook/xml/4.3" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ $catalog_filepath
+xmlcatalog --noout --add 'rewriteURI' \
+ "http://www.oasis-open.org/docbook/xml/4.3" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ $catalog_filepath
+xmlcatalog --noout --add 'public' \
+ "-//OASIS//DTD DocBook XML V4.4//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" \
+ $catalog_filepath
+xmlcatalog --noout --add 'rewriteSystem' \
+ "http://www.oasis-open.org/docbook/xml/4.4" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ $catalog_filepath
+xmlcatalog --noout --add 'rewriteURI' \
+ "http://www.oasis-open.org/docbook/xml/4.4" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ $catalog_filepath
+
+# 'docbookMathML1mods' package installation check
+if [ -e var/lib/pkgtools/packages/docbookMathML1mods* ]; then
+ xmlcatalog --noout --add 'nextCatalog' \
+ '' \
+ "file:///usr/share/xml/docbook/custom/mathml/catalog_DocBook_MathML1_mods.xml" \
+ $catalog_filepath
+fi
+
+# DocBook V5.0.0 catalog entry
+xmlcatalog --noout --add 'nextCatalog' \
+ '' \
+ "file:///usr/share/xml/docbook/5.0/catalog_docbook-5.0.0.xml" \
+ $catalog_filepath
diff --git a/system/docbook-xml5/douninst.sh b/system/docbook-xml5/douninst.sh
new file mode 100644
index 0000000000..898113f8f4
--- /dev/null
+++ b/system/docbook-xml5/douninst.sh
@@ -0,0 +1,6 @@
+catalog_filepath=etc/xml/docbook
+
+# Remove DocBook V5.0.0 catalog entry
+xmlcatalog --noout --del \
+ "file:///usr/share/xml/docbook/5.0/catalog_docbook-5.0.0.xml" \
+ $catalog_filepath
diff --git a/system/docbook-xml5/slack-desc b/system/docbook-xml5/slack-desc
new file mode 100644
index 0000000000..847d417628
--- /dev/null
+++ b/system/docbook-xml5/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+docbook-xml5: docbook-xml5 (DocBook XML V5.0)
+docbook-xml5:
+docbook-xml5: DocBook XML v5.0 dtd and schemas with XML stylesheets in a namespace
+docbook-xml5:
+docbook-xml5:
+docbook-xml5:
+docbook-xml5:
+docbook-xml5:
+docbook-xml5:
+docbook-xml5: https://cdn.docbook.org/release/xsl/current/
+docbook-xml5: http://docbook.org/xml/5.0/docbook-5.0.zip