summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authoradityam2010-01-24 14:51:49 -0500
committerAditya Mahajan2016-04-02 13:08:37 -0400
commite950bb805df24aa666761b65ac038a21438b3469 (patch)
tree6f12ac3a6ad98e755b230d98278b65daa9d2811f /PKGBUILD
downloadaur-e950bb805df24aa666761b65ac038a21438b3469.tar.gz
Initial upload
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD80
1 files changed, 80 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..22d9035c1d8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,80 @@
+# Maintainer: Aditya Mahajan <adityam at umich dot edu>
+pkgname=context-minimals-git
+pkgver=20100122
+pkgrel=1
+pkgdesc="A standalone ConTeXt distribution"
+url="http://www.contextgarden.net"
+license=('GPL')
+arch=('i686' 'x86_64')
+depends=('ruby')
+makedepends=('rsync')
+optdepends=('fontconfig: xetex support')
+
+conflicts=()
+replaces=()
+backup=()
+
+install=context-minimals-git.install
+
+# ConTeXt minimals uses a different naming convention for architectures
+_platform_map['i686']='linux'
+_platform_map['x86_64']='linux-64'
+
+_platform=${_platform_map[$arch]}
+
+_rsyncurl=rsync://contextgarden.net/minimals/setup/${_platform}/bin
+_dest=/opt/context-minimals
+
+# This is the only way to get yaourt to store the files in
+# /var/abs/local/yaourtbuild so that rsyncing the next time is efficient
+
+_gitroot="http://dl.contextgarden.net/distribution/git/"
+_gitname="master"
+
+# Font directories
+_texlivefontdir="/usr/share/texmf-dist/fonts/"
+_userfontdir="\$HOME/.fonts"
+_osfontdir="/usr/share/fonts"
+
+build() {
+ msg "Downloading the latest scripts first"
+ rsync -rlptv $_rsyncurl $srcdir
+ msg "Initializing download directory"
+
+ mkdir -p $srcdir/tex/texmf-cache
+
+ msg "Starting download or update of ConTeXt distribution"
+ $srcdir/bin/texlua $srcdir/bin/mtxrun --script $srcdir/bin/mtx-update.lua \
+ --platform=$_platform --texroot=$srcdir/tex --engine=all --extras=all \
+ --context=beta --update --force --make || return 1
+
+ # The setuptex that comes with minimals does not work in a multi-user
+ # environment. So, we modify it appropriately.
+
+ echo "TEXMFOS=${_dest}/texmf-${_platform}" > $srcdir/tex/setuptex
+ echo "export TEXMFOS" >> $srcdir/tex/setuptex
+ echo "" >> $srcdir/tex/setuptex
+ echo "TEXMFCACHE=\$HOME/texmf-cache:${_dest}/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
+ ln -s -f $_texlivefontdir $srcdir/tex/texmf-fonts/fonts
+ fi
+
+
+ install -d $pkgdir/opt || return 1
+ msg "Copying files"
+ cp -r --preserve=links $srcdir/tex $pkgdir/$_dest || return 1
+}