extra/texlive-bin to 2011.3-4

This commit is contained in:
Kevin Mihelich 2012-02-06 10:41:43 -05:00
parent a7c223cd80
commit b9b85e7738
2 changed files with 92 additions and 70 deletions

View file

@ -1,3 +1,4 @@
# $Id: PKGBUILD 148935 2012-02-05 11:56:42Z ibiru $
# Maintainer: Rémy Oudompheng <remy@archlinux.org>
# Contributor: francois <francois.archlinux.org>
@ -10,7 +11,7 @@ plugrel=1
pkgname=texlive-bin
pkgver=2011.3
_luatex_ver=0.70.1
pkgrel=1
pkgrel=4
pkgdesc="TeX Live binaries"
license=('GPL')
arch=('i686' 'x86_64')
@ -52,12 +53,12 @@ md5sums=('220a4f4cc0d915bf8fcbcb553dcee1ae'
'e7f0197559ef865d8c01683dab3b8526')
build() {
if [ "${CARCH}" = "armv7h" ]; then
if [ "${CARCH}" = "x86_64" ]; then
export CFLAGS="${CFLAGS} -fPIC"
export CXXFLAGS="${CXXFLAGS} -fPIC"
fi
cd $srcdir
cd "$srcdir"
# Building LuaTeX
# cd luatex-beta-${_luatex_ver}
cd luatex
@ -110,7 +111,9 @@ build() {
test ! -d Work && mkdir Work
cd Work
echo "--> Initial configuration..."
# we use temporary prefix to avoid messing the existing $pkgdir/usr/share/texmf tree
# we use temporary prefix to avoid messing the existing
# $pkgdir/usr/share/texmf tree
# system zlib is disabled due to issues with zlib 1.2.6 (FS#28221)
../configure --prefix=/usr -C \
--sysconfdir=/etc \
--datarootdir=/usr/share \
@ -124,15 +127,15 @@ build() {
--disable-t1utils \
--disable-bibtexu \
--disable-xz \
--with-system-zlib \
--with-system-zziplib \
--with-system-pnglib \
--without-system-zlib \
--without-system-zziplib \
--without-system-pnglib \
--with-system-ncurses \
--with-system-t1lib \
--with-system-gd \
--with-system-poppler \
--with-system-xpdf \
--with-system-freetype2 \
--without-system-gd \
--without-system-poppler \
--without-system-xpdf \
--without-system-freetype2 \
--without-system-graphite \
--with-freetype2-libdir=/usr/lib \
--with-freetype2-include=/usr/include/freetype2 \
@ -149,63 +152,63 @@ build() {
}
package() {
cd $srcdir
cd "$srcdir"
#############################################################
### install texmf tree
echo "-------------------------------------------------------"
echo "--> installing the texmf tree"
echo "-------------------------------------------------------"
install -m755 -d $pkgdir/usr/share
cp -r texmf $pkgdir/usr/share/
install -d -m755 $pkgdir/etc/texmf/web2c
install -d -m755 $pkgdir/etc/texmf/chktex
install -d -m755 $pkgdir/etc/texmf/dvips/config
install -d -m755 $pkgdir/etc/texmf/dvipdfm/config
install -d -m755 $pkgdir/etc/texmf/dvipdfmx
install -d -m755 $pkgdir/etc/texmf/tex/generic/config
install -d -m755 $pkgdir/etc/texmf/ttf2pk
install -d -m755 $pkgdir/etc/texmf/xdvi
install -d -m755 $pkgdir/etc/fonts/conf.avail
install -m644 $srcdir/09-texlive-fonts.conf $pkgdir/etc/fonts/conf.avail/
install -m755 -d "$pkgdir"/usr/share
cp -r texmf "$pkgdir"/usr/share/
install -d -m755 "$pkgdir"/etc/texmf/web2c
install -d -m755 "$pkgdir"/etc/texmf/chktex
install -d -m755 "$pkgdir"/etc/texmf/dvips/config
install -d -m755 "$pkgdir"/etc/texmf/dvipdfm/config
install -d -m755 "$pkgdir"/etc/texmf/dvipdfmx
install -d -m755 "$pkgdir"/etc/texmf/tex/generic/config
install -d -m755 "$pkgdir"/etc/texmf/ttf2pk
install -d -m755 "$pkgdir"/etc/texmf/xdvi
install -d -m755 "$pkgdir"/etc/fonts/conf.avail
install -m644 "$srcdir"/09-texlive-fonts.conf "$pkgdir"/etc/fonts/conf.avail/
# move man files to /usr/share/man
for i in 1 5; do
install -d -m755 $pkgdir/usr/share/man/man$i
mv $pkgdir/usr/share/texmf/doc/man/man$i/*.$i $pkgdir/usr/share/man/man$i/
install -d -m755 "$pkgdir"/usr/share/man/man$i
mv "$pkgdir"/usr/share/texmf/doc/man/man$i/*.$i "$pkgdir"/usr/share/man/man$i/
done
# move info files to /usr/share/info
install -d -m755 $pkgdir/usr/share/info
mv $pkgdir/usr/share/texmf/doc/info/*.info $pkgdir/usr/share/info/
rm -rf $pkgdir/usr/share/texmf/doc/{man,info}
install -d -m755 "$pkgdir"/usr/share/info
mv "$pkgdir"/usr/share/texmf/doc/info/*.info "$pkgdir"/usr/share/info/
rm -rf "$pkgdir"/usr/share/texmf/doc/{man,info}
# copy config files to $TEXMFCONFIG tree
cp -a $pkgdir/usr/share/texmf/chktex/chktexrc \
$pkgdir/etc/texmf/chktex/
cp -a $pkgdir/usr/share/texmf/web2c/mktex.cnf \
$pkgdir/etc/texmf/web2c/
cp -a $pkgdir/usr/share/texmf/web2c/updmap.cfg \
$pkgdir/etc/texmf/web2c/
cp -a $pkgdir/usr/share/texmf/web2c/fmtutil.cnf \
$pkgdir/etc/texmf/web2c/
cp -a $pkgdir/usr/share/texmf/dvips/config/config.ps \
$pkgdir/etc/texmf/dvips/config/
cp -a $pkgdir/usr/share/texmf/dvipdfm/config/config \
$pkgdir/etc/texmf/dvipdfm/config/
cp -a $pkgdir/usr/share/texmf/dvipdfmx/dvipdfmx.cfg \
$pkgdir/etc/texmf/dvipdfmx/
cp -a $pkgdir/usr/share/texmf/tex/generic/config/pdftexconfig.tex \
$pkgdir/etc/texmf/tex/generic/config/
cp -a $pkgdir/usr/share/texmf/tex/generic/config/language.dat \
$pkgdir/etc/texmf/tex/generic/config/
cp -a $pkgdir/usr/share/texmf/tex/generic/config/language.def \
$pkgdir/etc/texmf/tex/generic/config/
cp -a $pkgdir/usr/share/texmf/ttf2pk/ttf2pk.cfg \
$pkgdir/etc/texmf/ttf2pk/
cp -a $pkgdir/usr/share/texmf/xdvi/XDvi \
$pkgdir/etc/texmf/xdvi/
cp -a "$pkgdir"/usr/share/texmf/chktex/chktexrc \
"$pkgdir"/etc/texmf/chktex/
cp -a "$pkgdir"/usr/share/texmf/web2c/mktex.cnf \
"$pkgdir"/etc/texmf/web2c/
cp -a "$pkgdir"/usr/share/texmf/web2c/updmap.cfg \
"$pkgdir"/etc/texmf/web2c/
cp -a "$pkgdir"/usr/share/texmf/web2c/fmtutil.cnf \
"$pkgdir"/etc/texmf/web2c/
cp -a "$pkgdir"/usr/share/texmf/dvips/config/config.ps \
"$pkgdir"/etc/texmf/dvips/config/
cp -a "$pkgdir"/usr/share/texmf/dvipdfm/config/config \
"$pkgdir"/etc/texmf/dvipdfm/config/
cp -a "$pkgdir"/usr/share/texmf/dvipdfmx/dvipdfmx.cfg \
"$pkgdir"/etc/texmf/dvipdfmx/
cp -a "$pkgdir"/usr/share/texmf/tex/generic/config/pdftexconfig.tex \
"$pkgdir"/etc/texmf/tex/generic/config/
cp -a "$pkgdir"/usr/share/texmf/tex/generic/config/language.dat \
"$pkgdir"/etc/texmf/tex/generic/config/
cp -a "$pkgdir"/usr/share/texmf/tex/generic/config/language.def \
"$pkgdir"/etc/texmf/tex/generic/config/
cp -a "$pkgdir"/usr/share/texmf/ttf2pk/ttf2pk.cfg \
"$pkgdir"/etc/texmf/ttf2pk/
cp -a "$pkgdir"/usr/share/texmf/xdvi/XDvi \
"$pkgdir"/etc/texmf/xdvi/
# remove TL specific warnings in the language.{dat,def} files:
sed -i -e '/DO NOT EDIT/,+3 d' $pkgdir/etc/texmf/tex/generic/config/language.*
sed -i -e '/DO NOT EDIT/,+3 d' "$pkgdir"/etc/texmf/tex/generic/config/language.*
# clean updmap.cfg
sed -i '/^\(Map\|MixedMap\)/d' $pkgdir/etc/texmf/web2c/updmap.cfg
sed -i '/^#! \(Map\|MixedMap\)/d' $pkgdir/etc/texmf/web2c/updmap.cfg
sed -i '/^\(Map\|MixedMap\)/d' "$pkgdir"/etc/texmf/web2c/updmap.cfg
sed -i '/^#! \(Map\|MixedMap\)/d' "$pkgdir"/etc/texmf/web2c/updmap.cfg
#############################################################
### install
@ -215,34 +218,34 @@ package() {
echo "--> Proceeding with make install ..."
echo "-------------------------------------------------------"
cd Work
make DESTDIR=${pkgdir} texmf=$pkgdir/usr/share/texmf install
rm -rf ${pkgdir}/usr/{texmf,share/texmf-dist}
make DESTDIR="${pkgdir}" texmf="$pkgdir"/usr/share/texmf install
rm -rf "${pkgdir}"/usr/{texmf,share/texmf-dist}
# replace upstream texmf.cnf with ours
rm -f $pkgdir/usr/share/texmf/web2c/texmf.cnf
install -m644 $srcdir/texmf.cnf $pkgdir/etc/texmf/web2c/texmf.cnf
rm -f "$pkgdir"/usr/share/texmf/web2c/texmf.cnf
install -m644 "$srcdir"/texmf.cnf "$pkgdir"/etc/texmf/web2c/texmf.cnf
# since the location of texmf.cnf is hard-wired to be under /usr/share/texmf/web2c
# we make a symlink from /etc/texmf/web2c/texmf.cnf to the latter
ln -sf /etc/texmf/web2c/texmf.cnf $pkgdir/usr/share/texmf/web2c/texmf.cnf
ln -sf /etc/texmf/web2c/texmf.cnf "$pkgdir"/usr/share/texmf/web2c/texmf.cnf
# fix location of TEXMFCACHE for luatools
sed -i 's#texlive2010#texlive#' $pkgdir/usr/share/texmf/web2c/texmfcnf.lua
sed -i 's#texlive2010#texlive#' "$pkgdir"/usr/share/texmf/web2c/texmfcnf.lua
## remove aleph from fmtutil.cnf
sed -i -e '/aleph/d' $pkgdir/usr/share/texmf/web2c/fmtutil.cnf
sed -i -e '/aleph/d' "$pkgdir"/usr/share/texmf/web2c/fmtutil.cnf
## install luatex binary
#install -m755 $srcdir/luatex-beta-${_luatex_ver}/build/texk/web2c/luatex $pkgdir/usr/bin/
install -m755 $srcdir/luatex/build/texk/web2c/luatex $pkgdir/usr/bin/
cd $pkgdir/usr/bin
#install -m755 "$srcdir"/luatex-beta-${_luatex_ver}/build/texk/web2c/luatex "$pkgdir"/usr/bin/
install -m755 "$srcdir"/luatex/build/texk/web2c/luatex "$pkgdir"/usr/bin/
cd "$pkgdir"/usr/bin
/bin/ln -s luatex texlua
/bin/ln -s luatex texluac
## install Perl libraries
mkdir -p $pkgdir/usr/share/tlpkg/TeXLive
install -m644 ${srcdir}/source/utils/biber/TeXLive/*.pm $pkgdir/usr/share/tlpkg/TeXLive
mkdir -p "$pkgdir"/usr/share/tlpkg/TeXLive
install -m644 "${srcdir}"/source/utils/biber/TeXLive/*.pm "$pkgdir"/usr/share/tlpkg/TeXLive
# create symlinks for formats
echo "--> Create symlinks for TeX formats ..."
PATH="$PATH:${pkgdir}/usr/bin" texlinks -f $pkgdir/usr/share/texmf/web2c/fmtutil.cnf $pkgdir/usr/bin/
PATH="$PATH:${pkgdir}/usr/bin" texlinks -f "$pkgdir"/usr/share/texmf/web2c/fmtutil.cnf "$pkgdir"/usr/bin/
#############################################################
# remove dangling symlinks
_bibtexextra_scripts="
@ -339,7 +342,7 @@ vpe"
${_pstricks_scripts} \
${_science_scripts} \
tlmgr; do
rm -f $pkgdir/usr/bin/$s
rm -f "$pkgdir"/usr/bin/$s
done
###################################################################
}

View file

@ -1,3 +1,6 @@
infodir=usr/share/info
filelist=(dvipng.info dvips.info eplain.info epspdf.info fontname.info kpathsea.info latex2e-es.info latex2e.info latex2man.info mf2pt1.info tds.info texdraw.info web2c.info)
post_install() {
echo ">>> texlive: updating the filename database..."
usr/bin/mktexlsr
@ -5,6 +8,11 @@ post_install() {
usr/bin/fmtutil-sys --all 1>/dev/null
echo " done."
echo " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"
[[ -x usr/bin/install-info ]] || return 0
for file in "${filelist[@]}"; do
install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
done
}
post_upgrade() {
@ -14,5 +22,16 @@ post_upgrade() {
usr/bin/fmtutil-sys --all 1>/dev/null
echo " done."
echo " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"
[[ -x usr/bin/install-info ]] || return 0
for file in "${filelist[@]}"; do
install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
done
}
pre_remove() {
[[ -x usr/bin/install-info ]] || return 0
for file in "${filelist[@]}"; do
install-info --delete "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
done
}