summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Necib ÇAPAR2022-08-13 03:43:59 +0200
committer Willy Sudiarto Raharjo2022-08-13 03:43:59 +0200
commit745a7b999d151eebd8f0bdc781a47b7751797b6a (patch)
tree298fed0480adf3c45f587904260ea16ae6439a21
parent17d03b859dae24cc455a0aaa84921e9173ae1199 (diff)
downloadslackbuilds-745a7b999d151eebd8f0bdc781a47b7751797b6a.tar.gz
system/docbookMathML1mods: Added (DocBook MathML1 modules).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/docbookMathML1mods/README13
-rw-r--r--system/docbookMathML1mods/docbookMathML1mods.SlackBuild84
-rw-r--r--system/docbookMathML1mods/docbookMathML1mods.info10
-rw-r--r--system/docbookMathML1mods/doinst.sh117
-rw-r--r--system/docbookMathML1mods/douninst.sh6
-rw-r--r--system/docbookMathML1mods/slack-desc19
6 files changed, 249 insertions, 0 deletions
diff --git a/system/docbookMathML1mods/README b/system/docbookMathML1mods/README
new file mode 100644
index 0000000000..1de359c304
--- /dev/null
+++ b/system/docbookMathML1mods/README
@@ -0,0 +1,13 @@
+'docbookMathML1mods' is a group of shell scripts, SGML catalog
+and required files used for creating a removable
+SlackBuild package for DocBook MathML modules' DTDs.
+
+After the installation of DocBook MathML modules' DTDs
+/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 'docbook-xml5' package.
+
+After uninstallation of the 'docbookMathML1mods' 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/docbookMathML1mods/docbookMathML1mods.SlackBuild b/system/docbookMathML1mods/docbookMathML1mods.SlackBuild
new file mode 100644
index 0000000000..049724c857
--- /dev/null
+++ b/system/docbookMathML1mods/docbookMathML1mods.SlackBuild
@@ -0,0 +1,84 @@
+#!/bin/bash
+
+# docbookMathML1mods.SlackBuild - SlackBuild script for creating a pkg. of MathML modules
+# Copyright © 2022 Necib ÇAPAR <necipcapar@gmail.com>
+
+# This file is part of docbookMathML1mods
+
+# docbookMathML1mods 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.
+
+# docbookMathML1mods 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=docbookMathML1mods
+VERSION=${VERSION:-1.0.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+ARCH=noarch
+
+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/custom/
+cp --archive ./mathml $PKG/usr/share/xml/docbook/custom/mathml
+cp --archive $TMP/$PRGNAM-$VERSION/catalog_DocBook_MathML1_mods.xml $PKG/usr/share/xml/docbook/custom/mathml
+cp --archive $TMP/$PRGNAM-$VERSION/catalog_DocBook_MathML1_mods $PKG/usr/share/xml/docbook/custom/mathml
+
+mkdir -p $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/docbookMathML1mods/docbookMathML1mods.info b/system/docbookMathML1mods/docbookMathML1mods.info
new file mode 100644
index 0000000000..e74fec06aa
--- /dev/null
+++ b/system/docbookMathML1mods/docbookMathML1mods.info
@@ -0,0 +1,10 @@
+PRGNAM="docbookMathML1mods"
+VERSION="1.0.0"
+HOMEPAGE="https://github.com/N-Tek/docbookMathML1mods"
+DOWNLOAD="https://github.com/N-Tek/docbookMathML1mods/releases/download/v1.0.0/docbookMathML1mods-1.0.0.tar.gz"
+MD5SUM="ef9773243803aa1c1823cf147f4a5f81"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="%README%"
+MAINTAINER="Necib ÇAPAR"
+EMAIL="necipcapar@gmail.com"
diff --git a/system/docbookMathML1mods/doinst.sh b/system/docbookMathML1mods/doinst.sh
new file mode 100644
index 0000000000..ba6d5a25d7
--- /dev/null
+++ b/system/docbookMathML1mods/doinst.sh
@@ -0,0 +1,117 @@
+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
+
+# DocBook MathML1 modules' catalog entry
+xmlcatalog --noout --add 'nextCatalog' \
+ '' \
+ "file:///usr/share/xml/docbook/custom/mathml/catalog_DocBook_MathML1_mods.xml" \
+ $catalog_filepath
+
+# 'docbook-xml5' package installation check
+if [ -e var/lib/pkgtools/packages/docbook-xml5* ]; then
+ xmlcatalog --noout --del \
+ "file:///usr/share/xml/docbook/5.0/catalog_docbook-5.0.0.xml" \
+ $catalog_filepath
+ xmlcatalog --noout --add 'nextCatalog' \
+ '' \
+ "file:///usr/share/xml/docbook/5.0/catalog_docbook-5.0.0.xml" \
+ $catalog_filepath
+fi
diff --git a/system/docbookMathML1mods/douninst.sh b/system/docbookMathML1mods/douninst.sh
new file mode 100644
index 0000000000..9c41b1c65c
--- /dev/null
+++ b/system/docbookMathML1mods/douninst.sh
@@ -0,0 +1,6 @@
+catalog_filepath=etc/xml/docbook
+
+# Remove DocBook MathML1 modules' catalog entry
+xmlcatalog --noout --del \
+ "file:///usr/share/xml/docbook/custom/mathml/catalog_DocBook_MathML1_mods.xml" \
+ $catalog_filepath
diff --git a/system/docbookMathML1mods/slack-desc b/system/docbookMathML1mods/slack-desc
new file mode 100644
index 0000000000..7ab6d07891
--- /dev/null
+++ b/system/docbookMathML1mods/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------------------------------------------------------|
+docbookMathML1mods: docbookMathML1mods (DocBook MathML1 modules)
+docbookMathML1mods:
+docbookMathML1mods: DocBook MathML modules for version 1.0, 1.1CR1, 1.1b1
+docbookMathML1mods: (Modular superset of DocBook XML V4.3)
+docbookMathML1mods:
+docbookMathML1mods:
+docbookMathML1mods:
+docbookMathML1mods:
+docbookMathML1mods:
+docbookMathML1mods:
+docbookMathML1mods: https://docbook.org/xml/mathml/