diff options
author | Aditya Mahajan | 2019-04-04 15:49:28 -0400 |
---|---|---|
committer | Aditya Mahajan | 2019-04-04 16:13:46 -0400 |
commit | a2438cdf479f2db9da6ef64edb484be697f8dae4 (patch) | |
tree | 8f8990645c5512676a5c2d962d901e3b0a3655df | |
download | aur-a2438cdf479f2db9da6ef64edb484be697f8dae4.tar.gz |
First version
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 108 | ||||
-rw-r--r-- | luametatex.install | 19 |
3 files changed, 148 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b80caa3b137f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = luametatex + pkgdesc = ConTeXt LuaMetaTeX distribution + pkgver = 2019.04.03 + pkgrel = 1 + url = http://www.contextgarden.net + install = luametatex.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = curl + makedepends = unzip + makedepends = rsync + optdepends = ghostscript: support for PS and EPS images + optdepends = graphicsmagick: support for GIF and TIFF images + optdepends = inkscape: support for SVG images + optdepends = pstoedit: support for metapost outlines for fonts + optdepends = zint: support for barcodes + optdepends = curl: loading remote content + +pkgname = luametatex + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0af60861c25e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,108 @@ +# Maintainer: Aditya Mahajan <adityam at umich dot edu> +pkgname=luametatex +pkgver=2019.04.03 +pkgrel=1 +pkgdesc="ConTeXt LuaMetaTeX distribution" +url="http://www.contextgarden.net" +license=('GPL') +arch=('i686' 'x86_64') +optdepends=('ghostscript: support for PS and EPS images' + 'graphicsmagick: support for GIF and TIFF images' + 'inkscape: support for SVG images' + 'pstoedit: support for metapost outlines for fonts' + 'zint: support for barcodes' + 'curl: loading remote content') + +makedepends=('curl' 'unzip' 'rsync') +conflicts=() +replaces=() +backup=() + +install=luametatex.install +PKGEXT=".pkg.tar.gz" + +# ConTeXt minimals uses a different naming convention for architectures + +declare -A _platform_map + +_platform_map['i686']='linux-32' +_platform_map['x86_64']='linux-64' + +_zipfile=${_platform_map[$CARCH]}.zip + +_lmtxserver=lmtx.pragma-ade.nl +_wget=http://${_lmtxserver}/install-lmtx/context-${_zipfile} +_dest=/opt/luametatex + +# Font directories +_texlivefontdir="/usr/share/texmf-dist/fonts/" +_contextmodulesdir="/opt/context-minimals/texmf-modules" +_userfontdir="\$HOME/.fonts" +_osfontdir="/usr/share/fonts" + +pkgver() { + cd "$scrdir" + grep -e '\\edef\\contextversion' tex/texmf-context/tex/context/base/mkiv/context.mkiv | sed -n 's/.*{\(.*\) .*}/\1/p' +} + +prepare() { + msg "Downloading the latest scripts" + curl ${_wget} --output ${_zipfile} || return 1 + cd $srcdir && unzip -o ${_zipfile} || return 1 + + msg "Starting download or update of ConTeXt distribution" + chmod +x $srcdir/bin/mtxrun + $srcdir/bin/mtxrun --script $srcdir/bin/mtx-install.lua --update \ + --server="${_lmtxserver}" \ + --instance="install-lmtx" || return 1 + # Generate a setuptex file + + echo "TEXMFOS=${_dest}/texmf-${_platform}" > $srcdir/tex/setuptex + echo "export TEXMFOS" >> $srcdir/tex/setuptex + echo "" >> $srcdir/tex/setuptex + echo "TEXMFCACHE=\$HOME/texmf-cache" >> $srcdir/tex/setuptex + echo "export TEXMFCACHE" >> $srcdir/tex/setuptex + echo "" >> $srcdir/tex/setuptex + echo "unset TEXINPUTS MPINPUTS MFINPUTS" >> $srcdir/tex/setuptex + echo "" >> $srcdir/tex/setuptex + echo "PATH=\$TEXMFOS/bin:\$PATH" >> $srcdir/tex/setuptex + echo "export PATH" >> $srcdir/tex/setuptex + echo "" >> $srcdir/tex/setuptex + echo "OSFONTDIR=\"$_userfontdir;$_osfontdir;\"" \ + >> $srcdir/tex/setuptex + echo "export OSFONTDIR" >> $srcdir/tex/setuptex + # If texlive exists, use fonts from texlive + if [ -d $_texlivefontdir ] + then + mkdir -p $srcdir/tex/texmf-fonts + if [ -L $srcdir/tex/texmf-fonts/fonts ] + then + rm $srcdir/tex/texmf-fonts/fonts + fi + ln -s $_texlivefontdir $srcdir/tex/texmf-fonts/fonts + fi + + # If context-minimal exists, use modules from minimals + if [ -d $_contextmodulesdir ] + then + if [ -d $srcdir/tex/texmf-modules ] + then + rmdir $srcdir/tex/texmf-modules || return 1 + elif [ -L $srcdir/tex/texmf-modules ] + then + rm $srcdir/tex/texmf-modules || return 1 + fi + ln -s $_contextmodulesdir $srcdir/tex/texmf-modules || return 1 + fi +} + + +package() +{ + install -d $pkgdir/opt || return 1 + msg "Copying files" + # cp -r does not delete old files that are present in texmf-cache from + # previous installation + # cp -r --preserve=links $srcdir/tex $pkgdir/$_dest || return 1 + rsync -az --links --delete --info=progress2 $srcdir/tex/ $pkgdir/$_dest || return 1 +} diff --git a/luametatex.install b/luametatex.install new file mode 100644 index 000000000000..b172c6f7c8fb --- /dev/null +++ b/luametatex.install @@ -0,0 +1,19 @@ +post_install() { + echo "*************************************************************" + echo "To use luametatex run" + echo " source /opt/luametatex/setuptex" + echo "from your shell (as a normal user)" + echo "*************************************************************" +} + +post_upgrade() { + echo "*************************************************************" + echo "To use luametatex run" + echo " source /opt/luametatex/setuptex" + echo "from your shell (as a normal user)" + echo "*************************************************************" +} + +pre_remove() { + /bin/true +} |