@Hamza
sorry for not placing CODE tag, I apologize.
Some modules that are needed to build the kerTeX module on your own if desired are the following:
Code: Select all
guest@porteus:~$ ls /mnt/sdb1/porteus/modules/ -l
total 183576
-rwxrwxrwx 1 root root 503808 Feb 14 07:48 bison-2.7-i486-1.xzm*
-rwxrwxrwx 1 root root 53248 Feb 14 07:49 ed-1.6-i486-1.xzm*
-rwxrwxrwx 1 root root 798720 Feb 14 07:50 flex-2.5.37-i486-1.xzm*
-rwxrwxrwx 1 root root 815104 Feb 14 07:59 lftp-4.3.8-i486-1.xzm*
-rwxrwxrwx 1 root root 196608 Feb 14 07:52 m4-1.4.16-i486-1.xzm*
-rwxrwxrwx 1 root root 331776 Feb 14 07:57 readline-5.2-i486-4.xzm*
readline is actually not needed, but I used it so I could build lftp on porteus itself using SlackBuild. The following are encouraged to have on your system(s) when using kerTeX since a dvi viewer is not present:
Code: Select all
-rwxrwxrwx 1 root root 11636736 Feb 14 08:11 ghostscript-9.05-i486-3.xzm*
-rwxrwxrwx 1 root root 3629056 Feb 14 10:46 ghostscript-fonts-std-8.11.xzm*
A new module has been built:
Code: Select all
guest@porteus:~/Downloads$ ls -l /tmp/*.xzm
-rw-r--r-- 1 root root 170016768 Feb 15 17:51 /tmp/kertex-0.9999.7.6-i486-1_ast.xzm
http://www.mediafire.com/?okyegugl9xolnqy
To create a module for kerTeX :
I am posting commands used to create new i486 module for kertex built in razor i486 rc 2:
Code: Select all
#!/bin/sh
create_slackdesc()
{
cat > slack-desc << EOF
# 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------------------------------------------------------|
kerTeX: kerTeX (kerTeX Tex Distribution)
kerTeX:
kerTeX: This is a TeX kernel system providing what everything is based
kerTeX: upon: Donald E. Knuth's Digital Typography system; with some
kerTeX: useful additions. This system includes, of course, METAFONT
kerTeX: and TeX; but auxiliaries are also included. All the programs
kerTeX: (latest published version) are included here. In addition, other
kerTeX: programs linked to Tomas Rokicki's dvi to PostScript driver
kerTeX: (dvips(1)) are added. Oren Patashnik's BibTeX (0.99d) is here
kerTeX: too! John Hobby's MetaPost is included! The NTS team e-TeX
kerTeX: is here! And D.E. Knuth and Silvio Levy' CWEB are here too!
EOF
}
create_doinstsh()
{
cat > doinst.sh <<- _EOF_
#!/bin/sh
#\$Id: doinst.sh,v 1.1 2012/03/09 19:15:09 tlaronde Exp \$
# C) 2012 Thierry Laronde <tlaronde AT polynum.com>
#
# A SlackBuild post-install script just to advertise what has to be
# done.
#
# For the moment, we just display the basic "what's next".
#
cat <<"EOT" >&2
==================================================================
You're done!
Thank you for using KerTeX
You must now, as an _unprivileged_ user build the fonts and compile
the dump.
Just run:
which_kertex
to see where stuff is installed. And then run:
\$KERTEX_BINDIR/adm/kertex.sh install
Note that the man pages are put in kerTeX realm. So you will have to
add the paths (man.config(5)). This is so in order for you to test
different TeX distribution without one stepping on the others toes.
The path is displayed by which_kertex(1).
You should probably also edit dvips config to be found here:
\$KERTEX_LIBDIR/dvips/dvips.cnf
to match the resolution and memory of your printer device, and to use
or not T1 version of Donald E. Knuth's Computer Modern Fonts.
==================================================================
EOT
exit 0
_EOF_
}
create_addkertexpath()
{
cat > add-kertex-path.sh << EOT
#!/bin/sh
PATH=\$PATH:/usr/bin/kertex/
MANPATH=\$MANPATH:/usr/share/kertex/man
EOT
}
pause()
{
echo "Press ENTER key to continue . . . "
read key
}
create_slackdesc
pause
# check if slack-desc is created
cat slack-desc
pause
# create add-kertex-path.sh to create path
create_addkertexpath
pause
cat add-kertex-path.sh
pause
# create doinstall.sh file
create_doinstsh
pause
# show the file doinst.sh and check that it works
cat doinst.sh
pause
# get all of the *.sh add on packages for kerTeX
wget http://downloads.kergis.com/kertex/amstex.sh
wget http://downloads.kergis.com/kertex/latex.sh
wget http://downloads.kergis.com/kertex/graphics@latex.sh
wget http://downloads.kergis.com/kertex/babel@latex.sh
wget http://downloads.kergis.com/kertex/cyrillic@latex.sh
wget http://downloads.kergis.com/kertex/ams@latex.sh
wget http://downloads.kergis.com/kertex/lm@latex.sh
wget http://downloads.kergis.com/kertex/ec@latex.sh
wget http://downloads.kergis.com/kertex/cracs@latex.sh
wget http://downloads.kergis.com/kertex/biblatex@latex.sh
wget http://downloads.kergis.com/kertex/comment@latex.sh
wget http://downloads.kergis.com/kertex/csquotes@latex.sh
wget http://downloads.kergis.com/kertex/etoolbox@latex.sh
wget http://downloads.kergis.com/kertex/logreq@latex.sh
wget http://downloads.kergis.com/kertex/memoir@latex.sh
wget http://downloads.kergis.com/kertex/oberdiek@latex.sh
wget http://downloads.kergis.com/kertex/reqtools@latex.sh
wget http://downloads.kergis.com/kertex/url@latex.sh
wget http://downloads.kergis.com/kertex/cm-super@latex.sh
wget http://downloads.kergis.com/kertex/cite@latex.sh
wget http://downloads.kergis.com/kertex/ellipsis@latex.sh
wget http://downloads.kergis.com/kertex/filecontents@latex.sh
wget http://downloads.kergis.com/kertex/float@latex.sh
wget http://downloads.kergis.com/kertex/footmisc@latex.sh
wget http://downloads.kergis.com/kertex/geometry@latex.sh
wget http://downloads.kergis.com/kertex/lh@latex.sh
wget http://downloads.kergis.com/kertex/natbib@latex.sh
wget http://downloads.kergis.com/kertex/ruhyphen@latex.sh
wget http://downloads.kergis.com/kertex/todo@latex.sh
wget http://downloads.kergis.com/kertex/harvard@latex.sh
http://downloads.kergis.com/kertex/ncctools@latex.sh
pause
# make all *.sh files executable
chmod +x *.sh
# make kertex.SlackBuild executable
chmod +x kertex.SlackBuild
# get the main program or build using SlackBuild
PATH=$PATH:/usr/bin/kertex/
# build the package
./kertex.SlackBuild
# the package is building
pause
# become root, su -, then run
# installpkg kertex-0.999*
#Then kerTeX is installed but not fully/correctly, as regular user we run
cd /usr/share/kertex/adm/
sh kertex.sh install
#this will install kertex and ask for root password, now officially it is installed
#we proceed to install the add on packages to enhance the tex/latex experience:
# install latex.sh first
sh latex.sh install
pause
sh graphics.sh install
pause
# install all packages one by one
for i in *.sh ; do sh $i install ; done ;
# or install one by one comment below if you like to do above command only
# if using FAT32 filesystem use sh instead of ./ because executable files don't work well in this filesystem :(
pause
./latex.sh install
pause
./graphics\@latex.sh install
pause
./babel\@latex.sh install
pause
./cyrillic\@latex.sh install
pause
./cracs\@latex.sh install
pause
./ams\@latex.sh install
pause
./lm\@latex.sh install
pause
./ec\@latex.sh install
pause
./biblatex\@latex.sh install
pause
./comment\@latex.sh install
pause
./csquotes\@latex.sh install
pause
./etoolbox\@latex.sh install
pause
./logreq\@latex.sh install
pause
./memoir\@latex.sh install
pause
./oberdiek\@latex.sh install
pause
./reqtools\@latex.sh install
pause
./url\@latex.sh install
pause
./cm-super\@latex.sh install
pause
./cite\@latex.sh install
pause
./ellipsis\@latex.sh install
pause
./filecontents\@latex.sh install
pause
./float\@latex.sh install
pause
./footmisc\@latex.sh install
pause
./geometry\@latex.sh install
pause
./lh\@latex.sh install
pause
./natbib\@latex.sh install
pause
./ruhyphen\@latex.sh install
pause
./todo\@latex.sh install
pause
./harvard\@latex.sh install
pause
./ncctools@latex.sh install
pause
# try to build big kertex tgz with all packages installed
# remember to copy /tmp/*.tar.gz to /tmp/pkg to call
mkdir -p /tmp/pkg
cp /tmp/*.tar.gz /tmp/pkg
pause
#
# use the following command to build a slackware package
KERTEX_PKG_DIR=/tmp/pkg ./kertex.SlackBuild
# a txz package will be created in /tmp/
guest@porteus:~/Downloads$
kertex.SlackBuild is as follows:
Code: Select all
#!/bin/sh
#$Id: kertex.SlackBuild,v 1.9 2012/03/22 17:01:18 tlaronde Exp $
# Template generated by Alien's SlackBuild Toolkit: http://slackware.com/~alien/AST
# Copyright 2009, 2010, 2011, 2012 Eric Hameleers, Eindhoven, Netherlands
# Copyright 2012 olivares14031@gmail.com
# Copyright 2012 tlaronde AT polynum.com
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
# any purpose with or without fee is hereby granted, provided that
# the above copyright notice and this permission notice appear in all
# copies.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
# CONTRIBUTORS 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.
# -----------------------------------------------------------------------------
#
# Slackware SlackBuild script
# ===========================
# By: tlaronde@polynum.com suggested by olivares14031@gmail.com
# For: kerTeX
# Descr: kerTeX Tex Distribution
# URL: http://www.kergis.com/en/kertex.html
# Needs:
# Changelog:
# 0.9999.3.0-1: 08/Mar/2012 by tlaronde@polynum.com
# * Sketching how R.I.S.K. has to be used by the package
# framework.
# 0.9995-1: 06/Mar/2012 by olivares14031@gmail.com
# * Initial build.
#
# Run 'sh kerTeX.SlackBuild' to build a Slackware package.
# The package (.tgz) and .txt file as well as build logs are created in /tmp .
# Install it using 'installpkg'.
#
# -----------------------------------------------------------------------------
# [TL] Note that the official name is: kerTeX with a small leading 'k'
# to emphasize that TeX is the important part. There is no LaTeX is there
# is no TeX...
#
# [TL] A supplementary tip: if KERTEX_PKG_DIR is set in the environment
# at packaging time, the _kerTeX_ packages put in this dir will be
# added to the package. These are _kerTeX_ packages built from a running
# kerTeX. There are (if bin fmt, base etc.) binary dependent but hier
# independent. This is the crux.
# [TL] Actually, packaging kerTeX for whatever packaging framework is a
# simple 4 steps process:
#
# 1) Create a R.I.S.K. configuration file to take into account custom
# values given by the packager when calling this script, and
# configuring the kerTeX installed hierarchy conforming to the host
# filesystem hierarchy.
#
# 2) Let R.I.S.K. build everything (removing all that is
# automake/autoconf specific, since R.I.S.K. is a framework on is own).
#
# 3) Let R.I.S.K. install everything according to the filesystem
# hierarchy configured in a subdirectory.
#
# 4) Let the host packaging system gather this result. But since
# R.I.S.K. refuses to process if root, we will indeed install in a
# subdir and package while R.I.S.K. has switched to root for its own
# installation! So 4) is embedded in 3).
#
# As long as the version is concerned, this script could be always
# cutting edge: if there is saved in SRCDIR a tarball with the
# SlackBuild expected name, we use it. If not we download the latest
# version and set the version accordingly. This means that updating
# should be removing the saved tarball...
#
# For R.I.S.K. it refuses to process if being root, and switches only
# when needed. Period.
#
if test $(id -u) -eq 0; then
echo "Don't run me as root _now_!" >&2
echo "I will switch to root only when needed." >&2
exit 1
fi
#========== STEP 1
#
# [TL] We respect the packaging framework protocol: the names, and will
# be configuring R.I.S.K. after these.
# Set initial variables:
PRGNAM=kertex
VERSION=0.9999.4.0 # to be set with the version of a _saved_ tarball
BUILD=${BUILD:-1}
# The TAG is a unique identifier for all your Slackware packages.
# Use your initials as the value for TAG for instance.
TAG=${TAG:-_ast}
# Where do we look for sources?
# [TL] The bundle can be already here (for packaging various flavors)
# renamed with the Slackbuild convention. If not, we will download
# from kergis.com, using the name of the bundle there.
#
SRCDIR=$(cd $(dirname $0); pwd)
SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
SRCURL=http://downloads.kergis.com/kertex/kertex_bundle.tar
# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
# We will remove this TMP. So create an unlikely name (if someone
# defines TMP as '/'...), for concurrent builds, and don't fiddle with
# it once set! The risk suffix will be verified.
#
TMP=${TMP:-/tmp/}/_$$-$PRGNAM-risk
readonly TMP
# PKG will be installed "chrooted" here for packaging. Root created,
# root deleted.
#
PKG=$TMP/package-$PRGNAM
# The result. So not deleted... and not created either: must exist!
#
OUTPUT=${OUTPUT:-/tmp}
# [TL] R.I.S.K. has its own way (does cross-compilation). And needs
# explicit configuration. This script is a generic one. So we will
# only build package for this matrix arch, except that for Intel based
# we build for i486.
#
ARCH=$(uname -m)
case $ARCH in
i?86) ARCH=i486; XCFLAGS="-march=i486 -mtune=i686 -O2";
;;
arm*) ARCH=arm;
;;
esac
# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
# Catch unitialized variables:
set -u
P1=${1:-1}
# Save old umask and set to 0022:
_UMASK_=$(umask)
umask 0022
# Create working directories:
OBJDIRPREFIX=$TMP/build # R.I.S.K.
rm -fr $TMP
mkdir -p $OBJDIRPREFIX
TMPDIR=$OBJDIRPREFIX
export OBJDIRPREFIX TMPDIR
#========== STEP 2
#
# [TL] R.I.S.K. processing. This is simply the get_mk_install.sh
# customized.
#
# We need a writable directory and not SRCDIR.
#
cd $TMP
if ! [ -f ${SOURCE} ]; then
wget -nv -T 20 -O "kertex_bundle.tar" "${SRCURL}" || true
if [ $? -ne 0 -o ! -s kertex_bundle.tar ]; then
echo "Downloading 'kertex_bundle.tar' failed... aborting the build."
exit 1
fi
tar xf kertex_bundle.tar
else
tar xzf $SOURCE
fi
for src in knuth etex bibtex ams adobe kertex_M kertex_T risk_comp; do
tar xzf ${src}_*.tar.gz
rm ${src}_*.tar.gz
done
# And then updating the version. If this is the saved bundle: it should
# be unchanged. Downloaded: at least equal or newer.
#
VERSION=$(sed -n 's/^VERSION: *\([^ ][^ ]*\) *$/\1/p' kertex_T/CID)
# This is a fake configuration for kertex_M, just in order that the
# name is the default one for the dir with the tools.
# This is for illustration purpose. Since kertex_M is on matrix
# (not installed) we do not set anything.
#
cat >$OBJDIRPREFIX/slackbuild <<EOT
EOT
# Start compiling kertex_M.
#
(
cd kertex_M;
cd `../risk_comp/sys/posix/sh/rkconfig $OBJDIRPREFIX/slackbuild`;
make SAVE_SPACE=YES;
)
# Then compile kertex_T.
# Real configuration, with chrooting for the installation (the map).
# And customization for url retrievers (kerTeX packaging system for
# Slackware.
#
cat >$OBJDIRPREFIX/slackbuild <<EOT
SYS_FTPC=lftp
SYS_HTTPC=lftp
CFLAGS="\$CFLAGS ${XCFLAGS:- }"
TARGETCHROOT=$PKG
TARGETBINDIR=/usr/bin
TARGETLIBDIR=/usr/share
CLIB=\$(rk_which_lib_of NULL stdio.h)
EOT
cd kertex_T
cd `../risk_comp/sys/posix/sh/rkconfig $OBJDIRPREFIX/slackbuild`
make SAVE_SPACE=YES
#===== embedding 4) in 3)...
#
# [TL] R.I.S.K. switches to root only when strictly needed. We are hence
# going to build the package during R.I.S.K. install procedure. So
# we add the custom Slackbuild stuff.
#
# This is the real chunk of commands to build the package.
# Replace the variables.
#
cat >.rkcomp/$$.slackbuild <<EOT
PRGNAM=$PRGNAM
VERSION=$VERSION
BUILD=$BUILD
TAG=$TAG
PKG=$PKG
SRCDIR=$SRCDIR
TMP=$TMP
OUTPUT=$OUTPUT
THIS=$(basename $0)
ARCH=$ARCH
MANDIR=/usr/share/kertex/man
KERTEX_PKG_DIR=${KERTEX_PKG_DIR:-}
EOT
# Then add chunk verbatim.
#
cat >>.rkcomp/$$.slackbuild <<"EOT"
set -u # we are root, don't write randomly...
# If there are kerTeX packages to apply do it now.
if test "x$KERTEX_PKG_DIR" != x; then
(
cd $TMP
mkdir _kxpkg
cd _kxpkg
for pkg in $KERTEX_PKG_DIR/*.tar.gz; do
tar xzf $pkg
done
# Apply bin
cd $PKG/usr/bin/kertex
for pkg in $TMP/_kxpkg/*-bin.tar; do
tar xf $pkg
done
# Apply lib
cd $PKG/usr/share/kertex
for pkg in $TMP/_kxpkg/*-lib.tar; do
tar xf $pkg
done
# Set KXPATHS
cd $PKG/usr/share/kertex
for kxpath in $TMP/_kxpkg/*.kxpath; do
while read rootdir addpath; do
if test -s $rootdir/KXPATH; then
ed $rootdir/KXPATH <<ENDEDSCRIPT
1s|\$|;$addpath;|
w
q
ENDEDSCRIPT
else
echo ";$addpath;" >$rootdir/KXPATH
fi
done <$kxpath
done
)
rm -fr $TMP/_kxpkg
fi
# Put stuff where SlackBuilt expect them to be (and to be cleaned).
#
rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
# remove old log files
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $SRCDIR/$THIS > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;
# Compress the man page(s):
if [ -d $PKG$MANDIR ]; then
find $PKG$MANDIR -type f -exec gzip -9f {} \;
fi
# Strip binaries (if any):
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
# Add a SlackBuild post-install if there is:
if [ -f $SRCDIR/doinst.sh ]; then
cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh
fi
# add paths for kertex
if [ -f $SRCDIR/add-kertex-path.sh ]; then
mkdir -p $PKG/etc/profile.d
cat $SRCDIR/add-kertex-path.sh >> $PKG/etc/profile.d/add-kertex-path.sh
chmod 755 $PKG/etc/profile.d/add-kertex-path.sh
fi
# Build the package:
cd $PKG
makepkg --linkadd y --chown n\
$OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} 2>&1\
| tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}\
> ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}"\
> $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
# Done with the temporary install. Root created, root deleted.
# Just for catching blunders, test name.
#
test "${PKG%$PRGNAM}" != "$PKG" && rm -fr $PKG
EOT
# We simply add this to our own post-install.
#
ed -s .rkcomp/install_bin/post-install <<EOT
?exit 0?-r .rkcomp/$$.slackbuild
w
q
EOT
# Creating a whole install in the $PKG subdir, and creating the package
# by the way.
#
make local_install SAVE_SPACE=YES
# Cleaning our own risk stuff. Check name
#
test "${TMP%risk}" != "$TMP" && rm -fr $TMP
running
would return
Code: Select all
guest@porteus:~$ which_kertex
# WARNING!!! WARNING!!! WARNING!!!
#
# 1) The path separator is now, everywhere, semicolon ';' and not
# colon ':'.
# 2) The pkg stuff is now in /usr/share/kertex/pkg/. Run instead of pkg_core:
# /bin/sh /usr/share/kertex/pkg/kertex.sh install
#
KERTEX_VERSION=0.9999.7.6
KERTEX_HOST=linux-i686-3.7.5-porteus
KERTEX_SHELL=/bin/sh
KERTEX_BINDIR=/usr/bin/kertex
KERTEX_LIBDIR=/usr/share/kertex
KERTEX_MANDIR=/usr/share/kertex/man
KERTEX_USER0=root
KERTEX_GROUP0=wheel
If anyone has further questions, comments or observations please let me know. I will be offline for weekends have no internet
, but will hopefully get back on Mondays to answer questions if possible. Thanks to all users for reporting errors, bugs, and suggestions.
Best Regards,
Antonio