# Maintainer: Firmicus pkgname=texlive-core pkgver=2009.15574 pkgrel=1 pkgdesc="TeX Live core distribution" license=('GPL') arch=(any) depends=('texlive-bin') optdepends=('perl' 'ruby' 'ghostscript' 'psutils' 't1utils') groups=('texlive-most') conflicts=('tetex') provides=('tetex') replaces=('tetex') url='http://tug.org/texlive/' source=("ftp://ftp.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip" "$pkgname.maps") install=texlive.install backup=(usr/share/texmf-config/tex/context/config/cont-usr.tex) md5sums=('0e1fd3bac4a1cfeac6f370eb59fa0e49' '088bf643ad1853f40cdf8cccf62b6e18') build() { cd $srcdir install -m755 -d $pkgdir/usr/share/texmf-var/arch/installedpkgs || return 1 sed -i '/^#/d' CONTENTS || return 1 _revnr=`echo $pkgver | sed 's/2009\.//'` install -m644 CONTENTS $pkgdir/usr/share/texmf-var/arch/installedpkgs/${pkgname}_${_revnr}.pkgs || return 1 install -m644 $pkgname.maps $pkgdir/usr/share/texmf-var/arch/installedpkgs/ || return 1 echo -n " --> extracting all packages... " for p in *.tar.xz; do bsdtar -xf $p || return 1 done echo "done" rm -rf {tlpkg,doc,source,omega} install -m755 -d $pkgdir/usr/share || return 1 wanteddirs=$(for d in *; do test -d $d && [[ $d != texmf* ]] && echo $d; done) for dir in $wanteddirs; do find $dir -type d -exec install -d -m755 $pkgdir/usr/share/texmf-dist/'{}' \; || return 1 find $dir -type f -exec install -m644 '{}' $pkgdir/usr/share/texmf-dist/'{}' \; || return 1 done find texmf-dist -type d -exec install -d -m755 $pkgdir/usr/share/'{}' \; || return 1 find texmf-dist -type f -exec install -m644 '{}' $pkgdir/usr/share/'{}' \; || return 1 if [[ -d $pkgdir/usr/share/texmf-dist/scripts ]]; then find $pkgdir/usr/share/texmf-dist/scripts -type f -exec chmod a+x '{}' \; fi # copy config file to texmf-config mkdir -p $pkgdir/usr/share/texmf-config/tex/context/config cp -a $pkgdir/usr/share/texmf-dist/tex/context/config/cont-usr.tex \ $pkgdir/usr/share/texmf-config/tex/context/config/cont-usr.tex # remove obsolete stuff (we don't provide the omega and aleph binaries anyway) #rm -rf $pkgdir/usr/share/texmf-dist/omega rm -f $pkgdir/usr/share/texmf-dist/tex/plain/config/{omega,aleph}.ini # more cleanup rm -rf $pkgdir/usr/share/texmf-dist/scripts/context/stubs/mswin/ }