LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-30-2009, 10:54 PM   #1
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
TeXLive Build Script for Slackware


For anyone interested in building TeXLive on Slackware who doesn't want to bother with the ISO images that they provide, I think I have a solution. This *definitely* still needs some testing, as I'm a novice TeX user at best, but it works for what little bit of TeX that I use.
http://slackware.org.uk/people/rlwor.../12.2/texlive/
Thanks to Darren Austin for providing a fast mirror for this.

Feedback is welcome and encouraged.
 
Old 03-31-2009, 02:59 AM   #2
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 421

Rep: Reputation: 45
Hmm, still, I have the question about tlmgr which shipped with texlive2008. For more info: http://www.tug.org/texlive/tlmgr.html . What if I do a update with it? Won't it mess up the package content tracking?
 
Old 03-31-2009, 08:05 AM   #3
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Original Poster
Rep: Reputation: Disabled
grissiom,
I honestly don't know. Assuming tlmgr does what I *think* it does, I suspect that it's pretty safe, as it should be mostly replacing files that are included in the package already. It's certainly not the most optimal solution, I suppose, but in the grand scheme of things, it should be okay. Worst case scenario, you can just "rm -rf /usr/share/texmf*" and start over
 
Old 03-31-2009, 10:59 AM   #4
trashbird1240
Member
 
Registered: Sep 2006
Location: Durham, NC
Distribution: Slackware, Ubuntu (yes, both)
Posts: 463

Rep: Reputation: 31
tlmgr only affects the texmf and texmf-doc trees. I've been using TexLive for a while now, with no problems (I installed it into /usr/local, but I would like to try your script).

Joel
 
Old 03-31-2009, 11:27 AM   #5
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Original Poster
Rep: Reputation: Disabled
I just uploaded packages, but please wait for them to sync from the mirror and then get them there: http://slackware.org.uk/people/rlworkman/12.2/
 
Old 03-31-2009, 07:49 PM   #6
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 421

Rep: Reputation: 45
Quote:
Originally Posted by rworkman View Post
grissiom,
Assuming tlmgr does what I *think* it does, I suspect that it's pretty safe, as it should be mostly replacing files that are included in the package already. It's certainly not the most optimal solution, I suppose, but in the grand scheme of things, it should be okay. Worst case scenario, you can just "rm -rf /usr/share/texmf*" and start over
No, it *removes* and *add* files as I was happy with it.(Texlive2008 in my box is not tracked by slackware pkg system). I don't know how other distro deal with it.

Hmm, "rm -rf /usr/share/texmf*" can do the work but does it violate the the slackware packaging principle or sort of that?
 
Old 03-31-2009, 08:19 PM   #7
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by grissiom View Post
Hmm, "rm -rf /usr/share/texmf*" can do the work but does it violate the the slackware packaging principle or sort of that?
Well, the idea was that you'd only do this if TeXlive got stuffed up - you'd wipe those dirs and then reinstall the packages :-)
 
Old 03-31-2009, 08:38 PM   #8
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 421

Rep: Reputation: 45
Quote:
Originally Posted by rworkman View Post
Well, the idea was that you'd only do this if TeXlive got stuffed up - you'd wipe those dirs and then reinstall the packages :-)
Yes, I know~ Hmm, in my mind, a pkg system is poor if it cannot guarantee that the system will go back to it's original after "installpkg some-pkg && remove the-same-pkg". Oh, I may too pigheaded on this question so kick me if you don't agree
 
Old 03-31-2009, 09:00 PM   #9
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by grissiom View Post
Yes, I know~ Hmm, in my mind, a pkg system is poor if it cannot guarantee that the system will go back to it's original after "installpkg some-pkg && remove the-same-pkg". Oh, I may too pigheaded on this question so kick me if you don't agree
I understood you to say that tlmgr can *add* new files to the system. How would the package manager know to remove those?
 
Old 03-31-2009, 11:55 PM   #10
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 421

Rep: Reputation: 45
Quote:
Originally Posted by rworkman View Post
I understood you to say that tlmgr can *add* new files to the system. How would the package manager know to remove those?
Hmm, I am only an end user that did not read it's source code. But I think when update, tlmgr will retrieve a file list from the remote server, and remove the files that are not in the list but exist in local, add files that are in the list but not in local, update files that the version of remote and local are not the same. Roughly a rsync in my eyes.
 
Old 04-03-2009, 09:51 AM   #11
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Original Poster
Rep: Reputation: Disabled
I just synced some a new build of the main texlive package - I had forgotten to adjust the PATH settings in /etc/profile.d/texlive.*sh
I'll try to ping Darren and get the mirror updated asap.
 
Old 11-15-2009, 01:51 AM   #12
tramni1980
Member
 
Registered: Jul 2006
Location: Tübingen, Germany
Distribution: Slackware64-13.37
Posts: 737

Rep: Reputation: 37
Hello!

I modified Robby's script to adjust it for TeX Live 2009.

My version of the script creates a working TeX Live 2009 Slackware package. However, it certainly
has some flaws, as I am not a TeX Live expert, I simply use it for my work with LaTeX.

I think the following structure has to be achieved (PLEASE CORRECT ME IF I AM WRONG):

1. All executables, i.e. the files from the "inst/bin" folder under /usr/share/texmf/bin
2. The contents of all folders named "texmf" under a single "texmf" folder: /usr/share/texmf
3. The contents of all folders named "texmf-dist" under a single "texmf-dist" folder:
/usr/share/texmf-dist

Any ideas what tweaks I need to make to achieve the above 3 goals? I already tried manually moving
the files and directories to achieve the desired structure, but it all ended with a faulty texlive
package: there were broken symlinks and/or the kpathsea library did not work. All my efforts to fix
this by setting environmental variables after the installation failed. I suppose something has to
be tuned during the configure stage, but what? Also, to fix the broken symlinks, probably a snippet
of code has to be written?

What post-install command do you recommend to be run? Currently the file, named doinst.sh, which is
executed automatically with the installation of the package, runs the following 3 commands:

Code:
chroot . /usr/share/texmf/bin/mktexlsr
chroot . /usr/share/texmf/bin/fmtutil-sys --all
chroot . /usr/share/texmf/bin/updmap-sys --syncwithtrees
I have to mention that during the trial and effort phase while I was trifling with the directory
structure, these commands failed to execute. It seems that they require the "bin" folder to be under
"/usr/share/texmf" and nowhere else.

I am posting the contents of the build folder at the end of this post because I could not attach the tar.bz2 version of the folder . The files that you need to download are:
ftp://tug.org/historic/systems/texli...-source.tar.xz
and
ftp://tug.org/historic/systems/texli...7-texmf.tar.xz
The build time on my 2.5 GHz dualcore system is about one hour. The three files that are produced are:

9.0M texlive-20091107-i686-1.txz
534M texlive-docs-20091107-noarch-1.txz
358M texlive-texmf-20091107-i686-1.txz

Of course when uncompressed on the system they take more place . Please take care to modify the variables at the beginning of the texlive.SlackBuild script to suit to your system .

Any suggestions to improve the script are welcome. Above all, I wish to make it Slackware-compliant
and eventually to submit it to slackbuilds.org.

For the users of the glossaries package, please install the latest version of the package, because
the one that TeX Live 2009 ships with does not work with xindy.

Regards,

Martin Ivanov

15.11.2009

texlive.SlackBuild:
Code:
#!/bin/sh

# TexLive build script for Slackware

# Copyright 2009  Robby Workman, Northport, AL, USA
# Copyright 2009  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Modified by Martin Ivanov <tramni@abv.bg> 
# URL: ftp://tug.org/historic/systems/texlive/2009
# You only need these two files:
#   texlive-20091107-source.tar.xz
#   texlive-20091107-texmf.tar.xz

set -e

VERSION=20091107
TEXMF_VERSION=20091107
ARCH=${ARCH:-i686}
BUILD=${BUILD:-1}

CWD=$(pwd)
TMP=${TMP:-/home/marto/build/tmp}
PKG=$TMP/package-texlive-main
PKG_TEXDOCS=$TMP/package-texlive-docs
PKG_TEXMF=$TMP/package-texlive-texmf
OUTPUT=${OUTPUT:-/home/marto/build/packages/LaTeX}

TEXLIVEDIR=${TEXLIVEDIR:-/usr/share}

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
fi

rm -rf $PKG $PKG_TEXDOCS $PKG_TEXMF
mkdir -p $TMP $PKG $PKG_TEXDOCS $PKG_TEXMF $OUTPUT
cd $TMP
rm -rf texlive-$VERSION-source
tar xvf $CWD/texlive-$VERSION-source.tar.?z || exit 1
cd texlive-$VERSION-source
chown -R root:root .
chmod -R a-s .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 -exec chmod 644 {} \;

TL_BUILD_ENV='CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS"' \
TL_CONFIGURE_ARGS="\
  --program-prefix="" \
  --program-suffix="" \
  --build=$ARCH-slackware-linux \
  --disable-native-texlive-build \
  --enable-xindy \
  --enable-xindy-docs \
  --enable-auto-core \
  --enable-etex \
  --enable-epsfwin \
  --enable-hp2627win \
  --enable-mftalkwin \
  --enable-nextwin \
  --enable-regiswin \
  --enable-tektronixwin \
  --enable-unitermwin \
  --enable-timing \
  --enable-mktextex-default \
  --enable-dependency-tracking \
  --with-tex-banner='TeX Live 2009/Slackware' \
  --with-editor=emacs \
  --with-system-xpdf \
  --with-system-gd \
  --with-system-freetype2 \
  --with-system-t1lib \
  --with-system-libpng \
  --with-system-zlib \
  --with-x" \
./Build

# with any of the following two options enabled the compilation fails:
#  --enable-suntoolswin
#  --enable-xindy-rules: the mainatainer of xindy-make-rules claims to have fixed that bug, but in
# texlive 2009 things will certainly remain as they are. Anyway this option is not necessary as the
# texmf tree already contains everything necessary for xindy to work :)

# Install the documentation from the sources while we're still here
mkdir -p $PKG/usr/doc/texlive-$VERSION
cp -aR README* ChangeLog $CWD/{texlive.SlackBuild,slack-desc*,texmf.cnf,profile.d} \
$PKG/usr/doc/texlive-$VERSION
zcat $CWD/doinst.sh.gz > $PKG/usr/doc/texlive-$VERSION/doinst.sh
find $PKG/usr/doc/texlive-$VERSION -type f -exec chmod 644 {} \;

cd $TMP
rm -rf texlive-$TEXMF_VERSION-texmf
tar xvf $CWD/texlive-$TEXMF_VERSION-texmf.tar.?z || exit 1
cd texlive-$TEXMF_VERSION-texmf
chown -R root:root .
chmod -R a-s .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 -exec chmod 644 {} \;

# Move the docs to texlive-docs
# Perhaps consider shipping only english docs??
mkdir -p $PKG_TEXDOCS$TEXLIVEDIR/{texmf,texmf-dist}
mv texmf/doc $PKG_TEXDOCS$TEXLIVEDIR/texmf
mv texmf-dist/doc $PKG_TEXDOCS$TEXLIVEDIR/texmf-dist
cp -R $TMP/texlive-$VERSION-source/inst/texmf/doc/* $PKG_TEXDOCS$TEXLIVEDIR/texmf/doc
rm -rf $TMP/texlive-$VERSION-source/inst/texmf/doc

# Move the non-essential texmf-dist stuff into place
# texmf-dist goes into texlive-texmf
mkdir -p $PKG_TEXMF$TEXLIVEDIR
mv texmf-dist $PKG_TEXMF$TEXLIVEDIR
cp -R $TMP/texlive-$VERSION-source/inst/texmf-dist/* $PKG_TEXMF$TEXLIVEDIR/texmf-dist

# Move the required texmf stuff into place
# texmf goes into texlive-main
mkdir -p $PKG$TEXLIVEDIR
mv texmf $PKG$TEXLIVEDIR
cp -R $TMP/texlive-$VERSION-source/inst/* $PKG$TEXLIVEDIR/texmf
# Remove unnecessary symlink
rm $PKG$TEXLIVEDIR/texmf/bin/man
# create texmf-local
# add texmf.cnf to $TEXLIVEDIR to fix the texmf-local environmental variable
mkdir -p $PKG$TEXLIVEDIR/texmf-local
cp -a $CWD/texmf.cnf $PKG$TEXLIVEDIR

# Bring the man pages into the main package
mv $PKG_TEXDOCS$TEXLIVEDIR/texmf/doc/man $PKG$TEXLIVEDIR/texmf

# Compress the man pages
( cd $PKG$TEXLIVEDIR/texmf/man || exit 1
  rm -f Makefile
  find . -type f -name "*.pdf" -exec rm -f {} \;
  find . -type f -exec gzip -9 {} \;
  for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)

mkdir -p $PKG/etc/profile.d
cat $CWD/profile.d/texlive.sh > $PKG/etc/profile.d/texlive.sh
cat $CWD/profile.d/texlive.csh > $PKG/etc/profile.d/texlive.csh
chmod 0755 $PKG/etc/profile.d/*

mkdir -p $PKG/install $PKG_TEXDOCS/install $PKG_TEXMF/install
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc.texlive > $PKG/install/slack-desc
cat $CWD/slack-desc.texdocs > $PKG_TEXDOCS/install/slack-desc
cat $CWD/slack-desc.texmf > $PKG_TEXMF/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/texlive-$VERSION-$ARCH-$BUILD.txz

cd $PKG_TEXMF
/sbin/makepkg -l y -c n $OUTPUT/texlive-texmf-$TEXMF_VERSION-$ARCH-$BUILD.txz

cd $PKG_TEXDOCS
/sbin/makepkg -l y -c n $OUTPUT/texlive-docs-$TEXMF_VERSION-noarch-$BUILD.txz
In the build directory you have to make a folder named "profile.d", containing the following 2 files:
texlive.csh:

Code:
#!/bin/csh
# Add path and MANPATH for texlive:
set path = ( $path /usr/share/texmf/bin )
setenv MANPATH ${MANPATH}:/usr/share/texmf/man
and texlive.sh:
Code:
#!/bin/sh
# Add PATH and MANPATH for texlive:
PATH="$PATH:/usr/share/texmf/bin"
MANPATH="$MANPATH:/usr/share/texmf/man"
In the build directory you need 3 slack-desc files :
slack-desc.texdocs:

Code:
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

            |-----handy-ruler-------------------------------------------------|
texlive-docs: texlive-docs (Documentation for texlive)
texlive-docs:
texlive-docs: This package contains documentation for texlive.
texlive-docs:
texlive-docs:
texlive-docs:
texlive-docs:
texlive-docs:
texlive-docs:
texlive-docs:
texlive-docs:
slack-desc.texlive:

Code:
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

       |-----handy-ruler------------------------------------------------------|
texlive: texlive (texlive binaries and support files)
texlive:
texlive: This package contains the binaries and support files required for 
texlive: the texlive TeX distribution, such as input files for TeX, runtime
texlive: configuration files, hyphenation tables, manpages, and the computer
texlive: modern fonts.
texlive:
texlive:
texlive:
texlive:
texlive:
and slack-desc.texmf:

Code:
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

             |-----handy-ruler------------------------------------------------|
texlive-texmf: texlive-texmf (TeX formats and packages for texlive)
texlive-texmf:
texlive-texmf: This package contains the formats (plain, LaTeX, ConTeXt, etc.)
texlive-texmf: and all the packages used by them, along with most everything
texlive-texmf: used in day-to-day TeXing except the binaries themselves.
texlive-texmf:
texlive-texmf: The contents of this package should be mostly independent.
texlive-texmf: 
texlive-texmf:
texlive-texmf:
texlive-texmf:
In the build directory you also need a texmf.cnf file:

Code:
TEXMFLOCAL=/usr/share/texmf-local
and doinst.sh.gz - a gzipped doinst.sh file:

Code:
# This one shouldn't be needed, but just in case...
chroot . /usr/share/texmf/bin/mktexlsr 1>/dev/null 2>&1
# This one is definitely needed
# What I don't know is what happens if the texlive-texmf package is
# not installed yet - maybe we need to run this from it too?
chroot . /usr/share/texmf/bin/fmtutil-sys --all 1>/dev/null 2>&1
# This one also shouldn't be needed, but again, just in case...
chroot . /usr/share/texmf/bin/updmap-sys --syncwithtrees 1>/dev/null 2>&1
 
Old 11-15-2009, 04:11 AM   #13
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,434

Rep: Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867
maybe you missed it, robby submitted it a few days ago on slackbuilds.
 
Old 11-15-2009, 04:42 AM   #14
tramni1980
Member
 
Registered: Jul 2006
Location: Tübingen, Germany
Distribution: Slackware64-13.37
Posts: 737

Rep: Reputation: 37
I see.
I am sorry for not having noticed that.
 
Old 11-15-2009, 04:47 AM   #15
eddyvp
Member
 
Registered: Feb 2007
Location: Belgium
Distribution: Slackware
Posts: 37

Rep: Reputation: 17
I installed it from Slackbuilds.org yesterday (Slackware-current) and after testing it for a couple of hours, found no problems hitherto.

Thanks to rworkman for the buildscript.

Greetings,

Eddy
 
  


Reply

Tags
slackware, texlive


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a Shell Script to Build Slackware CDs Woodsman Slackware 3 01-17-2009 07:16 AM
Help: Chinese support in TeXlive chp Linux - Software 0 09-26-2008 10:27 AM
TexLive ahallam Red Hat 1 11-08-2006 11:00 PM
slackware build script questions gravityworks Slackware 13 03-01-2006 10:01 PM


All times are GMT -5. The time now is 10:47 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration