summaryrefslogtreecommitdiffstats
path: root/abs/extra/texlive-pictures/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra/texlive-pictures/PKGBUILD')
-rw-r--r--abs/extra/texlive-pictures/PKGBUILD68
1 files changed, 68 insertions, 0 deletions
diff --git a/abs/extra/texlive-pictures/PKGBUILD b/abs/extra/texlive-pictures/PKGBUILD
new file mode 100644
index 0000000..bf41cf1
--- /dev/null
+++ b/abs/extra/texlive-pictures/PKGBUILD
@@ -0,0 +1,68 @@
+# $Id: PKGBUILD$
+# Maintainer: Rémy Oudompheng <remy@archlinux.org>
+
+pkgname=texlive-pictures
+pkgver=2017.46740
+_revnr=${pkgver#2017.}
+pkgrel=1
+pkgdesc="TeX Live - Packages for drawings graphics"
+license=('GPL')
+arch=(any)
+depends=('texlive-core')
+groups=('texlive-most')
+url='http://tug.org/texlive/'
+source=("https://sources.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip"
+ "$pkgname.maps"
+ "xypdf-rev1.21.patch")
+options=('!emptydirs')
+sha256sums=('2dccd8d34c097dedd3dba8f8f26f141afd5bc90f86d5f6106f39e993fe8144c1'
+ '847676e2322065219992ef249a68cddb26d71e192e8d59db58f264c5e11c8be9'
+ '4e5cedf4775542461b442c06bdabb3eb4e20a04f54e493bc753a958577e78175')
+
+build() {
+ cd "$srcdir"
+ for p in *.tar.xz; do
+ bsdtar -xf $p
+ done
+ rm -rf {tlpkg,doc,source} || true
+
+ patch -Np1 -i "${srcdir}/xypdf-rev1.21.patch" -d "${srcdir}/tex/generic/xypic"
+}
+
+package() {
+ cd "$srcdir"
+ install -m755 -d $pkgdir/var/lib/texmf/arch/installedpkgs
+ sed -i '/^#/d' CONTENTS
+ install -m644 CONTENTS $pkgdir/var/lib/texmf/arch/installedpkgs/${pkgname}_${_revnr}.pkgs
+ install -m644 $pkgname.maps $pkgdir/var/lib/texmf/arch/installedpkgs/
+ install -m755 -d $pkgdir/usr/share
+ wanteddirs=$(for d in *; do test -d $d && [[ $d != texmf* ]] && echo $d; done) || true
+ for dir in $wanteddirs; do
+ find $dir -type d -exec install -d -m755 $pkgdir/usr/share/texmf-dist/'{}' \;
+ find $dir -type f -exec install -m644 '{}' $pkgdir/usr/share/texmf-dist/'{}' \;
+ done
+ if [[ -d texmf-dist ]]; then
+ find texmf-dist -type d -exec install -d -m755 $pkgdir/usr/share/'{}' \;
+ find texmf-dist -type f -exec install -m644 '{}' $pkgdir/usr/share/'{}' \;
+ fi
+ if [[ -d $pkgdir/usr/share/texmf-dist/scripts ]]; then
+ find $pkgdir/usr/share/texmf-dist/scripts -type f -exec chmod a+x '{}' \;
+ fi
+
+ _linked_scripts="
+cachepic/cachepic.tlu
+epspdf/epspdftk.tcl
+epspdf/epspdf.tlu
+fig4latex/fig4latex
+getmap/getmapdl.lua
+mathspic/mathspic.pl
+mkpic/mkpic
+petri-nets/pn2pdf
+"
+ install -m755 -d $pkgdir/usr/bin
+ for _script in ${_linked_scripts}; do
+ _scriptbase=$(basename $_script)
+ _scriptbase=${_scriptbase%.*}
+ ln -s /usr/share/texmf-dist/scripts/${_script} ${pkgdir}/usr/bin/${_scriptbase}
+ done
+}