#
# This is a strictly POSIX 1003.2 shell (Bourne shell) script 
# sketching the addition of LaTeX/graphics to the TeX Kernel system: 
# kerTeX.
#
# No shebang, since there is a bootstrapping problem: this script has
# to run on whatever host the kerTeX system runs on.
# It has to be invoked with whatever Bourne shell like interpreter is
# present on the host.
#
# C) 2012 Thierry Laronde <tlaronde@polynum.com>
# All rights reserved and absolutely no warranty! Use at your own 
# risks.
#
set -e

# Needed post action (build, apply, remove) routines.
#
pkg_post_build()
{
	pkg_log "Package $PKG_NAME.tar.gz created."
}

pkg_post_apply()
{
	pkg_log "Package $PKG_NAME installed."
}

pkg_post_remove()
{
	pkg_log "Package $PKG_NAME removed."
}

#==================== AUTOMATIC PROCESSING
# First include the pecularities of the TeX kernel system host.
#
. which_kertex

# Then we now how to find the library that defines routines and does
# some checks, argument processing and initializations. See the file
# directly for explanations.
#
. $KERTEX_BINDIR/lib/pkglib.sh

#==================== CUSTOM PROCESSING: we are in TMPDIR
#
# Note: we use FTP to be able to list the dir, since there is no
# bundle.
#

pkg_get

# latex(1) and elatex(1) will use strictly the same macro file. So
# we generate the files using latex(1) (we could have used elatex(1)).
#
cd $TMPDIR/lib/$PKG_NAME
$KERTEX_BINDIR/latex graphics.ins
$KERTEX_BINDIR/latex graphics-drivers.ins

# We move the files in LaTeX dir but note that the listing will be
# in latex/graphics in the CID...
#
mv *.sty *.def ..

#===== CUSTOM PROCESSING FINISHED
#
# Time to do whether the build or the install.
#
pkg_do_action

# not reached
exit 0

# Since we have exited above, no need to comment out the CID.

BEGIN_CID
NAME: latex/graphics
VERSION: 2005-12-01
LICENCE: LaTeX Project Public Licence 
	http://www.latex-project.org/lppl.txt
KERTEX_VERSION: 0.999.0.2
DESCRIPTION:
This is a collection of LaTeX packages for:
	- producing colour
	- including graphics (eg PostScript) files 
	- rotation and scaling of text
in LaTeX documents.
SOURCES:
ftp://anonymous:kertex@ftp.ctan.org/
	LCD HOME/
	GET /tex-archive/macros/latex/required/graphics/ /^.*$/
END:
END_CID


