[arch-commits] Commit in (5 files)

Andreas Radke andyrtr at archlinux.org
Thu Jul 25 15:22:59 UTC 2019


    Date: Thursday, July 25, 2019 @ 15:22:58
  Author: andyrtr
Revision: 358578

add pkg

Added:
  docbook-xsl-ns/
  docbook-xsl-ns/repos/
  docbook-xsl-ns/trunk/
  docbook-xsl-ns/trunk/PKGBUILD
  docbook-xsl-ns/trunk/docbook-xsl-ns.install

------------------------+
 PKGBUILD               |   34 ++++++++++++++++++++++++++++++++++
 docbook-xsl-ns.install |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)

Added: docbook-xsl-ns/trunk/PKGBUILD
===================================================================
--- docbook-xsl-ns/trunk/PKGBUILD	                        (rev 0)
+++ docbook-xsl-ns/trunk/PKGBUILD	2019-07-25 15:22:58 UTC (rev 358578)
@@ -0,0 +1,34 @@
+# Maintainer: AndyRTR <andyrtr at archlinux.org>
+# Contributor: Pierre Metzner <openhab.doc at web.de> 
+
+pkgname=docbook-xsl-ns
+pkgver=1.79.2
+pkgrel=2
+pkgdesc='The recommended namespaced XML stylesheets for Docbook5 transformations'
+arch=(any)
+license=(custom)
+url='http://docbook.org/'
+depends=(libxml2 libxslt sed)
+install="$pkgname.install"
+provides=('docbook5-xsl')
+source=("https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F$pkgver/docbook-xsl-$pkgver.tar.gz")
+sha256sums=('966188d7c05fc76eaca115a55893e643dd01a3486f6368733c9ad974fcee7a26')
+
+package() {
+  cd docbook-xsl-$pkgver
+
+  _pkgroot="$pkgdir"/usr/share/xml/docbook/stylesheet/docbook-xsl-ns-$pkgver
+
+  install -dm755 ${_pkgroot}
+  install -m644 VERSION VERSION.xsl ${_pkgroot}
+
+  for fn in assembly common eclipse epub epub3 fo highlighting html htmlhelp javahelp lib \
+      manpages params profiling roundtrip template website xhtml xhtml-1_1 xhtml5; do
+	    echo ${_pkgroot}/${fn}
+        install -dm755 ${_pkgroot}/${fn}
+	    install -m644 ${fn}/*.{xml,xsl,dtd,ent} ${_pkgroot}/${fn} || true  # ignore missing files
+  done
+
+  install -dm755 "$pkgdir"/etc/xml
+  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}

Added: docbook-xsl-ns/trunk/docbook-xsl-ns.install
===================================================================
--- docbook-xsl-ns/trunk/docbook-xsl-ns.install	                        (rev 0)
+++ docbook-xsl-ns/trunk/docbook-xsl-ns.install	2019-07-25 15:22:58 UTC (rev 358578)
@@ -0,0 +1,46 @@
+post_install() {
+  if [ ! -f etc/xml/catalog ]; then
+    xmlcatalog --noout --create etc/xml/catalog
+  fi
+  _NEW=`echo $1 | sed 's|\(.*\)\-.*|\1|'`
+
+  xmlcatalog --noout --add "rewriteSystem" \
+    "http://cdn.docbook.org/release/xsl/${_NEW}" \
+    "/usr/share/xml/docbook/stylesheet/docbook-xsl-ns-${_NEW}" \
+    etc/xml/catalog
+
+  xmlcatalog --noout --add "rewriteURI" \
+    "http://cdn.docbook.org/release/xsl/${_NEW}" \
+    "/usr/share/xml/docbook/stylesheet/docbook-xsl-ns-${_NEW}" \
+    etc/xml/catalog
+
+  xmlcatalog --noout --add "rewriteSystem" \
+    "http://cdn.docbook.org/release/xsl/current" \
+    "/usr/share/xml/docbook/stylesheet/docbook-xsl-ns-${_NEW}" \
+    etc/xml/catalog
+
+  xmlcatalog --noout --add "rewriteURI" \
+    "http://cdn.docbook.org/release/xsl/current" \
+    "/usr/share/xml/docbook/stylesheet/docbook-xsl-ns-${_NEW}" \
+    etc/xml/catalog
+
+  xmlcatalog --noout --add "rewriteSystem" \
+    "http://docbook.sourceforge.net/release/xsl/current" \
+    "/usr/share/xml/docbook/stylesheet/docbook-xsl-ns-${_NEW}" \
+    etc/xml/catalog
+
+  xmlcatalog --noout --add "rewriteURI" \
+    "http://docbook.sourceforge.net/release/xsl/current" \
+    "/usr/share/xml/docbook/stylesheet/docbook-xsl-ns-${_NEW}" \
+    etc/xml/catalog
+}
+
+post_upgrade() {
+  post_remove $2
+  post_install $1
+}
+
+post_remove() {
+  _OLD=`echo $1 | sed 's|\(.*\)\-.*|\1|'`
+  xmlcatalog --noout --del "/usr/share/xml/docbook/stylesheet/docbook-xsl-ns-${_OLD}" etc/xml/catalog
+}


More information about the arch-commits mailing list