# HG changeset patch # User Pierre-Jean Fichet # Date 1241085993 0 # Node ID 962995a7d54adda9629f1904e81502161a3c5ce4 # Parent ee1eaa7c9cc212a89403bbef6bd185d8e90546a2 add get-texlive diff -r ee1eaa7c9cc2 -r 962995a7d54a get-texlive/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-texlive/receipt Thu Apr 30 10:06:33 2009 +0000 @@ -0,0 +1,25 @@ +# SliTaz package receipt. + +PACKAGE="get-texlive" +VERSION="2008" +CATEGORY="office" +SHORT_DESC="get texlive distribution for tex, latex..." +MAINTAINER="sygne@ombres.eu" +WEB_SITE="http://www.tug.org/texlive/" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/bin + cp stuff/$PACKAGE $fs/usr/bin +} + +# post install +post_install() +{ + echo -e " +To get texlive, run \033[1mget-texlive\033[0m as root. +This will install about 31 Mo of tools in /usr/local/texlive +" +} + diff -r ee1eaa7c9cc2 -r 962995a7d54a get-texlive/stuff/get-texlive --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-texlive/stuff/get-texlive Thu Apr 30 10:06:33 2009 +0000 @@ -0,0 +1,141 @@ +#!/bin/sh +# download, pack and install a minimal texlive scheme. + +PACKAGE="texlive" +VERSION="2008" +CATEGORY="office" +SHORT_DESC="latex text processor" +MAINTAINER="sygne@ombres.eu" +DEPENDS="wget perl openssl" +SOURCE="install-tl" +TARBALL="$SOURCE-unx.tar.gz" +WEB_SITE="http://www.tug.org/$PACKAGE/" +WGET_URL="http://mirror.ctan.org/systems/$PACKAGE/tlnet/$VERSION/$TARBALL" +ROOT="$1" + + Check if we are root +if test $(id -u) != 0 ; then + echo -e "\nYou must be root to run `basename $0`." + echo -e "Please use 'su' and root password to become super-user.\n" + exit 0 +fi + + Avoid reinstall +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then + echo -e "\n$PKG package is already installed.\n" + exit 0 +fi + +# We need softwares. +for pkg in $DEPENDS +do + if [ ! -d /var/lib/tazpkg/installed/$pkg ]; then + tazpkg get-install $pkg + fi +done + + +# Make working directory +TMP=/tmp/$(basename $0)$$ +mkdir -p $TMP +TOP=$PWD +cd $TMP + +# Get files +echo -e "\033[1;33m Getting $PACKAGE install script\033[0m" +wget $WGET_URL +tar -xzf $TARBALL + + +# launch texlive install script +echo -e "\033[1;33m Launching $PACKAGE install script\033[0m" +cd $SOURCE +PREFIX="$TMP/$SOURCE/$PACKAGE-$VERSION/fs/usr/local/$PACKAGE" +mkdir -p $PREFIX + +cat > slitaz.profile < $PACKAGE-$VERSION/receipt <> profile + mv profile /etc/profile + fi + + echo -e " + +\033[1;33m - A texlive minimal scheme is now installed - \033[0m + +Verify that \033[1mPATH\033[0m is well formatted in /etc/profile, +and contain \033[1m/usr/local/\$PACKAGE/\$VERSION/bin/i386-linux/\033[0m + +To improve texlive, run \033[1mtlmgr\033[0m as root. +If you prefer graphicals interfaces, install perl-tk, +and run\033[1m tlmgr gui\033[0m. + +The tlmgr man page can be found here: +http://tug.org/texlive/doc/tlmgr.html +" +} +EOT + + +# Pack +tazpkg pack $PACKAGE-$VERSION + + +CONFIRM="y" +if [ -z "$ROOT" ]; then + echo "Unpacked size: 34M" + echo -e -n "\nPlease confirm installation of $PACKAGE-$VERSION (y/N): " + read CONFIRM +fi +if [ $CONFIRM = "y" ] + then + # Install pseudo package + tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT +fi + +# Clean +cd $TOP +rm -rf $TMP + +exit 0