# Maintainer: anergy.25110321@gmail.com pkgname=ptexlive pkgver=20080715 pkgrel=1 pkgdesc="ptexlive, texlive patched for japanese" license=('GPL') arch=('i686' 'x86_64') optdepends=('freetype2') makedepends=('') conflicts=('texlive-omega' 'texlive-bin' 'texlive-core') provides=('texlive-core' 'texlive-bin') url='http://tutimura.ath.cx/ptexlive/' source=("http://tutimura.ath.cx/~nob/tex/ptexlive/${pkgname}-${pkgver}.tar.gz" \ 'ftp://tug.org/historic/systems/texlive/2007/texlive2007-live-20070212.iso.bz2' \ 'texmf.cnf' 'ptexlive.sh') md5sums=('d834b89d20604b1072325ccef2f8b227'\ '93b700ba72994e34cd29456139cd67c9' \ '369052460477a2dfb3d2347ff501c8c5' \ 'b5a6b5862fc182be5f53b17afb1c2ad2') build() { # configure to check freetype2, set texlive iso mount path, and so on. sed -e"29,32s/^#//" -e "11d;12a ISO_DIR=/mnt/iso" -e"1a PREFIX=${pkgdir}/opt/texlive" -e"1a DATA_DIR=${pkgdir}/opt/texlive" ptexlive.sample.en > ../ptexlive.cfg for script in *.sh do if test -x $script then sed -i -e"s/root_check//" $script fi done CHECKFSTAB=`cat /etc/fstab |grep '/tmp/isoimage[[:space:]+]/mnt/iso[[:space:]+]auto[[:space:]+]'|grep loop|grep user` if [[ -x $CHECKFSTAB ]] then echo "to build this package, you have to add following line to /etc/fstab." echo "" echo "/tmp/isoimage /mnt/iso auto loop,user,noauto 0 0" echo "" echo "and be sure to make /mnt/iso." echo $CHECKFSTAB return 1 fi unset CHECKFSTAB cd ${srcdir} umount /tmp/isoimage ln --symbolic -f ${srcdir}/texlive2007-live-20070212.iso /tmp/isoimage || return 1 mount /tmp/isoimage cd ${pkgname}-${pkgver} # if ~/.texmf-var and ~/.texmf-config exist, move them back to avoid warning and error. if test -e ${HOME}/.texmf-var then mv ${HOME}/.texmf-var ${HOME}/.texmf-var.bak HASTEXVAR=true fi if test -e ${HOME}/.texmf-config then mv ${HOME}/.texmf-config ${HOME}/.texmf-config.bak HASTEXCONF=true fi return 1 unset TEXTDOMAIN unset TEXTDOMAINDIR make make install # install shellscript and repaired texmf.cnf install -D -m755 ${srcdir}/ptexlive.sh "${pkgdir}/etc/profile.d/ptexlive.sh" || return 1 install -m644 ${srcdir}/texmf.cnf "${pkgdir}/opt/texlive/share/texmf/web2c/texmf.cnf" || return 1 umount /tmp/isoimage if [ HASTEXVAR=true ] then mv ${HOME}/.texmf-var.bak ${HOME}/.texmf-var fi if [ HASTEXCONF=true ] then mv ${HOME}/.texmf-conf.bak ${HOME}/.texmf-conf fi }