mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
81 lines
1.8 KiB
Text
81 lines
1.8 KiB
Text
PKGNAME="texlive-langextra"
|
|
UPDMAP="/usr/share/texmf-config/web2c/updmap.cfg"
|
|
SYNCWITHTREES=''
|
|
NEWMAPS=`mktemp`
|
|
cat <<EOF > $NEWMAPS
|
|
Map arabi.map
|
|
Map arevvn.map
|
|
Map burmese.map
|
|
Map chartervn.map
|
|
Map cjhebrew.map
|
|
Map cmbrightvn.map
|
|
Map comicvn.map
|
|
Map concretevn.map
|
|
Map grotesqvn.map
|
|
Map mscorevn.map
|
|
Map skt.map
|
|
Map txttvn.map
|
|
Map urwvn.map
|
|
Map vntopia.map
|
|
MixedMap arabtex.map
|
|
MixedMap dvng.map
|
|
MixedMap ethiop.map
|
|
MixedMap mongolian.map
|
|
MixedMap vnrother.map
|
|
MixedMap vnrtext.map
|
|
EOF
|
|
|
|
pre_install() {
|
|
cat $NEWMAPS >> $UPDMAP
|
|
}
|
|
|
|
post_install() {
|
|
echo ">>> texlive: updating the filename database..."
|
|
texconfig-sys rehash
|
|
echo ">>> texlive: updating the fontmap files with updmap..."
|
|
updmap-sys --quiet --nohash
|
|
echo " done."
|
|
}
|
|
|
|
|
|
pre_upgrade() {
|
|
OLDMAPS="/usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
|
|
if [ -f $OLDMAPS ] ; then
|
|
MAPSDIFF=`mktemp`
|
|
TOADD=`mktemp`
|
|
diff -B $OLDMAPS $NEWMAPS | sed 's/\s\+/ /g' > $MAPSDIFF
|
|
TOREMOVE=`cat $MAPSDIFF | egrep '^<' | cut -d' ' -f3`
|
|
cat $MAPSDIFF | egrep '^>' | sed 's/^> //' > $TOADD
|
|
if [ "x$TOREMOVE" != "x" ]; then
|
|
for map in $TOREMOVE; do
|
|
sed -i "/\s$map/d" $UPDMAP
|
|
done
|
|
fi
|
|
if [ -s $TOADD ]; then
|
|
cat $TOADD >> $UPDMAP
|
|
fi
|
|
else
|
|
echo "Warning: file $PKGNAME.maps not found"
|
|
echo "(ignore the above if updating from TL2008 or from TL2009 in testing)"
|
|
SYNCWITHTREES="--syncwithtrees"
|
|
fi
|
|
}
|
|
|
|
|
|
post_upgrade() {
|
|
echo ">>> texlive: updating the filename database..."
|
|
texconfig-sys rehash
|
|
echo ">>> texlive: updating the fontmap files with updmap..."
|
|
updmap-sys --quiet --nohash $SYNCWITHTREES
|
|
echo " done."
|
|
}
|
|
|
|
pre_remove() {
|
|
for m in `cut -d' ' -f2 $NEWMAPS`; do
|
|
sed -i "/\s$m/d" $UPDMAP ;
|
|
done
|
|
}
|
|
|
|
post_remove() {
|
|
post_install
|
|
}
|