[arch-commits] Commit in (18 files)

Rémy Oudompheng remy at archlinux.org
Mon Jan 10 06:19:06 EST 2011


    Date: Monday, January 10, 2011 @ 06:19:06
  Author: remy
Revision: 105549

Change to a simpler updmap.cfg generation logic, use a updmap-local.cfg file.

Modified:
  texlive-games/trunk/PKGBUILD
  texlive-games/trunk/texlive.install
  texlive-langcjk/trunk/PKGBUILD
  texlive-langcjk/trunk/texlive.install
  texlive-langcyrillic/trunk/PKGBUILD
  texlive-langcyrillic/trunk/texlive.install
  texlive-langextra/trunk/PKGBUILD
  texlive-langextra/trunk/texlive.install
  texlive-langgreek/trunk/PKGBUILD
  texlive-langgreek/trunk/texlive.install
  texlive-latexextra/trunk/PKGBUILD
  texlive-latexextra/trunk/texlive.install
  texlive-music/trunk/PKGBUILD
  texlive-music/trunk/texlive.install
  texlive-pictures/trunk/PKGBUILD
  texlive-pictures/trunk/texlive.install
  texlive-science/trunk/PKGBUILD
  texlive-science/trunk/texlive.install

--------------------------------------------+
 texlive-games/trunk/PKGBUILD               |    2 
 texlive-games/trunk/texlive.install        |   84 +++++++++-------------
 texlive-langcjk/trunk/PKGBUILD             |    2 
 texlive-langcjk/trunk/texlive.install      |   96 +++++++++----------------
 texlive-langcyrillic/trunk/PKGBUILD        |    2 
 texlive-langcyrillic/trunk/texlive.install |   84 +++++++++-------------
 texlive-langextra/trunk/PKGBUILD           |    2 
 texlive-langextra/trunk/texlive.install    |  101 +++++++++------------------
 texlive-langgreek/trunk/PKGBUILD           |    2 
 texlive-langgreek/trunk/texlive.install    |   89 +++++++++--------------
 texlive-latexextra/trunk/PKGBUILD          |    2 
 texlive-latexextra/trunk/texlive.install   |   86 +++++++++-------------
 texlive-music/trunk/PKGBUILD               |    2 
 texlive-music/trunk/texlive.install        |   84 +++++++++-------------
 texlive-pictures/trunk/PKGBUILD            |    2 
 texlive-pictures/trunk/texlive.install     |   85 +++++++++-------------
 texlive-science/trunk/PKGBUILD             |    2 
 texlive-science/trunk/texlive.install      |   87 +++++++++--------------
 18 files changed, 323 insertions(+), 491 deletions(-)

Modified: texlive-games/trunk/PKGBUILD
===================================================================
--- texlive-games/trunk/PKGBUILD	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-games/trunk/PKGBUILD	2011-01-10 11:19:06 UTC (rev 105549)
@@ -2,7 +2,7 @@
 
 pkgname=texlive-games
 pkgver=2010.20619
-pkgrel=1
+pkgrel=2
 pkgdesc="TeX Live - Setups for typesetting various board games, including chess"
 license=('GPL')
 arch=(any)

Modified: texlive-games/trunk/texlive.install
===================================================================
--- texlive-games/trunk/texlive.install	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-games/trunk/texlive.install	2011-01-10 11:19:06 UTC (rev 105549)
@@ -1,66 +1,52 @@
 PKGNAME="texlive-games"
-UPDMAP="/etc/texmf/web2c/updmap.cfg"
+UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
 SYNCWITHTREES=''
-NEWMAPS=`mktemp`
-cat <<EOF > $NEWMAPS
-Map SkakNew.map
-EOF
 
-pre_install() {
-	cat $NEWMAPS >> $UPDMAP
-}
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
 
 post_install() {
-	echo    ">>> texlive: updating the filename database..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }
 
-
-pre_upgrade() {
-  if [[ "$2" == 200* ]]; then
-    OLDMAPS="/usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
-  else # >= 2010
-    OLDMAPS="/var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
-  fi
-  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 $OLDMAPS 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..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+  echo    " done." 
 }
 
 pre_remove() {
-for m in `cut -d' ' -f2 $NEWMAPS`; do 
+for m in `cut -d' ' -f2 $MAPFILE`; do 
   sed -i "/\s$m/d" $UPDMAP ; 
 done
 }
 
 post_remove() {
-  post_install
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }

Modified: texlive-langcjk/trunk/PKGBUILD
===================================================================
--- texlive-langcjk/trunk/PKGBUILD	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-langcjk/trunk/PKGBUILD	2011-01-10 11:19:06 UTC (rev 105549)
@@ -2,7 +2,7 @@
 
 pkgname=texlive-langcjk
 pkgver=2010.20535
-pkgrel=1
+pkgrel=2
 pkgdesc="TeX Live - CJK (Chinese, Japanese, Korean) macros and fonts"
 license=('GPL')
 arch=(any)

Modified: texlive-langcjk/trunk/texlive.install
===================================================================
--- texlive-langcjk/trunk/texlive.install	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-langcjk/trunk/texlive.install	2011-01-10 11:19:06 UTC (rev 105549)
@@ -1,78 +1,52 @@
 PKGNAME="texlive-langcjk"
-UPDMAP="/etc/texmf/web2c/updmap.cfg"
+UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
 SYNCWITHTREES=''
-NEWMAPS=`mktemp`
-cat <<EOF > $NEWMAPS
-Map bkaiu.map
-Map bsmiu.map
-Map dgj.map
-Map dmj.map
-Map garuda-c90.map
-Map gbsnu.map
-Map gkaiu.map
-Map mc2j.map
-Map mcj.map
-Map mr2j.map
-Map mrj.map
-Map norasi-c90.map
-Map umj.map
-EOF
 
-pre_install() {
-	cat $NEWMAPS >> $UPDMAP
-}
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
 
 post_install() {
-	echo    ">>> texlive: updating the filename database..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }
 
-
-pre_upgrade() {
-  if [[ "$2" == 200* ]]; then
-    OLDMAPS="/usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
-  else # >= 2010
-    OLDMAPS="/var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
-  fi
-  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 $OLDMAPS 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..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+  echo    " done." 
 }
 
 pre_remove() {
-for m in `cut -d' ' -f2 $NEWMAPS`; do 
+for m in `cut -d' ' -f2 $MAPFILE`; do 
   sed -i "/\s$m/d" $UPDMAP ; 
 done
 }
 
 post_remove() {
-  post_install
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }

Modified: texlive-langcyrillic/trunk/PKGBUILD
===================================================================
--- texlive-langcyrillic/trunk/PKGBUILD	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-langcyrillic/trunk/PKGBUILD	2011-01-10 11:19:06 UTC (rev 105549)
@@ -2,7 +2,7 @@
 
 pkgname=texlive-langcyrillic
 pkgver=2010.20522
-pkgrel=1
+pkgrel=2
 pkgdesc="TeX Live - Fonts and macro packages to typeset Cyrillic texts"
 license=('GPL')
 arch=(any)

Modified: texlive-langcyrillic/trunk/texlive.install
===================================================================
--- texlive-langcyrillic/trunk/texlive.install	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-langcyrillic/trunk/texlive.install	2011-01-10 11:19:06 UTC (rev 105549)
@@ -1,66 +1,52 @@
 PKGNAME="texlive-langcyrillic"
-UPDMAP="/etc/texmf/web2c/updmap.cfg"
+UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
 SYNCWITHTREES=''
-NEWMAPS=`mktemp`
-cat <<EOF > $NEWMAPS
-Map cmcyr.map
-EOF
 
-pre_install() {
-	cat $NEWMAPS >> $UPDMAP
-}
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
 
 post_install() {
-	echo    ">>> texlive: updating the filename database..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }
 
-
-pre_upgrade() {
-  if [[ "$2" == 200* ]]; then
-    OLDMAPS="/usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
-  else # >= 2010
-    OLDMAPS="/var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
-  fi
-  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 $OLDMAPS 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..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+  echo    " done." 
 }
 
 pre_remove() {
-for m in `cut -d' ' -f2 $NEWMAPS`; do 
+for m in `cut -d' ' -f2 $MAPFILE`; do 
   sed -i "/\s$m/d" $UPDMAP ; 
 done
 }
 
 post_remove() {
-  post_install
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }

Modified: texlive-langextra/trunk/PKGBUILD
===================================================================
--- texlive-langextra/trunk/PKGBUILD	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-langextra/trunk/PKGBUILD	2011-01-10 11:19:06 UTC (rev 105549)
@@ -2,7 +2,7 @@
 
 pkgname=texlive-langextra
 pkgver=2010.20648
-pkgrel=1
+pkgrel=2
 pkgdesc="TeX Live - Bundle of all extra language support"
 license=('GPL')
 arch=(any)

Modified: texlive-langextra/trunk/texlive.install
===================================================================
--- texlive-langextra/trunk/texlive.install	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-langextra/trunk/texlive.install	2011-01-10 11:19:06 UTC (rev 105549)
@@ -1,83 +1,52 @@
 PKGNAME="texlive-langextra"
-UPDMAP="/etc/texmf/web2c/updmap.cfg"
+UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.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 concretevn.map
-Map grotesqvn.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
-}
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
 
 post_install() {
-	echo    ">>> texlive: updating the filename database..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }
 
-
-pre_upgrade() {
-  if [[ "$2" == 200* ]]; then
-    OLDMAPS="/usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
-  else # >= 2010
-    OLDMAPS="/var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
-  fi
-  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 $OLDMAPS 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..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+  echo    " done." 
 }
 
 pre_remove() {
-for m in `cut -d' ' -f2 $NEWMAPS`; do 
+for m in `cut -d' ' -f2 $MAPFILE`; do 
   sed -i "/\s$m/d" $UPDMAP ; 
 done
 }
 
 post_remove() {
-  post_install
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }

Modified: texlive-langgreek/trunk/PKGBUILD
===================================================================
--- texlive-langgreek/trunk/PKGBUILD	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-langgreek/trunk/PKGBUILD	2011-01-10 11:19:06 UTC (rev 105549)
@@ -2,7 +2,7 @@
 
 pkgname=texlive-langgreek
 pkgver=2010.20945
-pkgrel=1
+pkgrel=2
 pkgdesc="TeX Live - Fonts and support for typesetting Greek"
 license=('GPL')
 arch=(any)

Modified: texlive-langgreek/trunk/texlive.install
===================================================================
--- texlive-langgreek/trunk/texlive.install	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-langgreek/trunk/texlive.install	2011-01-10 11:19:06 UTC (rev 105549)
@@ -1,71 +1,52 @@
 PKGNAME="texlive-langgreek"
-UPDMAP="/etc/texmf/web2c/updmap.cfg"
+UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
 SYNCWITHTREES=''
-NEWMAPS=`mktemp`
-cat <<EOF > $NEWMAPS
-Map gfsbaskerville.map
-Map gfsporson.map
-Map grverb.map
-Map kerkis.map
-MixedMap cbgreek-full.map
-MixedMap iby.map
-EOF
 
-pre_install() {
-	cat $NEWMAPS >> $UPDMAP
-}
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
 
 post_install() {
-	echo    ">>> texlive: updating the filename database..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }
 
-
-pre_upgrade() {
-  if [[ "$2" == 200* ]]; then
-    OLDMAPS="/usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
-  else # >= 2010
-    OLDMAPS="/var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
-  fi
-  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 $OLDMAPS 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..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+  echo    " done." 
 }
 
 pre_remove() {
-for m in `cut -d' ' -f2 $NEWMAPS`; do 
+for m in `cut -d' ' -f2 $MAPFILE`; do 
   sed -i "/\s$m/d" $UPDMAP ; 
 done
 }
 
 post_remove() {
-  post_install
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }

Modified: texlive-latexextra/trunk/PKGBUILD
===================================================================
--- texlive-latexextra/trunk/PKGBUILD	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-latexextra/trunk/PKGBUILD	2011-01-10 11:19:06 UTC (rev 105549)
@@ -2,7 +2,7 @@
 
 pkgname=texlive-latexextra
 pkgver=2010.20943
-pkgrel=1
+pkgrel=2
 pkgdesc="TeX Live - Large collection of add-on packages for LaTeX"
 license=('GPL')
 arch=(any)

Modified: texlive-latexextra/trunk/texlive.install
===================================================================
--- texlive-latexextra/trunk/texlive.install	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-latexextra/trunk/texlive.install	2011-01-10 11:19:06 UTC (rev 105549)
@@ -1,68 +1,52 @@
 PKGNAME="texlive-latexextra"
-UPDMAP="/etc/texmf/web2c/updmap.cfg"
+UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
 SYNCWITHTREES=''
-NEWMAPS=`mktemp`
-cat <<EOF > $NEWMAPS
-Map epiolmec.map
-MixedMap esint.map
-MixedMap manfnt.map
-EOF
 
-pre_install() {
-	cat $NEWMAPS >> $UPDMAP
-}
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
 
 post_install() {
-	echo    ">>> texlive: updating the filename database..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }
 
-
-pre_upgrade() {
-  if [[ "$2" == 200* ]]; then
-    OLDMAPS="/usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
-  else # >= 2010
-    OLDMAPS="/var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
-  fi
-  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 $OLDMAPS 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..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+  echo    " done." 
 }
 
 pre_remove() {
-for m in `cut -d' ' -f2 $NEWMAPS`; do 
+for m in `cut -d' ' -f2 $MAPFILE`; do 
   sed -i "/\s$m/d" $UPDMAP ; 
 done
 }
 
 post_remove() {
-  post_install
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }

Modified: texlive-music/trunk/PKGBUILD
===================================================================
--- texlive-music/trunk/PKGBUILD	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-music/trunk/PKGBUILD	2011-01-10 11:19:06 UTC (rev 105549)
@@ -2,7 +2,7 @@
 
 pkgname=texlive-music
 pkgver=2010.20424
-pkgrel=1
+pkgrel=2
 pkgdesc="TeX Live - Music typesetting packages"
 license=('GPL')
 arch=(any)

Modified: texlive-music/trunk/texlive.install
===================================================================
--- texlive-music/trunk/texlive.install	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-music/trunk/texlive.install	2011-01-10 11:19:06 UTC (rev 105549)
@@ -1,66 +1,52 @@
 PKGNAME="texlive-music"
-UPDMAP="/etc/texmf/web2c/updmap.cfg"
+UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
 SYNCWITHTREES=''
-NEWMAPS=`mktemp`
-cat <<EOF > $NEWMAPS
-MixedMap musix.map
-EOF
 
-pre_install() {
-	cat $NEWMAPS >> $UPDMAP
-}
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
 
 post_install() {
-	echo    ">>> texlive: updating the filename database..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }
 
-
-pre_upgrade() {
-  if [[ "$2" == 200* ]]; then
-    OLDMAPS="/usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
-  else # >= 2010
-    OLDMAPS="/var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
-  fi
-  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 $OLDMAPS 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..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+  echo    " done." 
 }
 
 pre_remove() {
-for m in `cut -d' ' -f2 $NEWMAPS`; do 
+for m in `cut -d' ' -f2 $MAPFILE`; do 
   sed -i "/\s$m/d" $UPDMAP ; 
 done
 }
 
 post_remove() {
-  post_install
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }

Modified: texlive-pictures/trunk/PKGBUILD
===================================================================
--- texlive-pictures/trunk/PKGBUILD	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-pictures/trunk/PKGBUILD	2011-01-10 11:19:06 UTC (rev 105549)
@@ -2,7 +2,7 @@
 
 pkgname=texlive-pictures
 pkgver=2010.20936
-pkgrel=1
+pkgrel=2
 pkgdesc="TeX Live - Packages for drawings graphics"
 license=('GPL')
 arch=(any)

Modified: texlive-pictures/trunk/texlive.install
===================================================================
--- texlive-pictures/trunk/texlive.install	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-pictures/trunk/texlive.install	2011-01-10 11:19:06 UTC (rev 105549)
@@ -1,67 +1,52 @@
 PKGNAME="texlive-pictures"
-UPDMAP="/etc/texmf/web2c/updmap.cfg"
+UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
 SYNCWITHTREES=''
-NEWMAPS=`mktemp`
-cat <<EOF > $NEWMAPS
-Map knitfont.map
-MixedMap xypic.map
-EOF
 
-pre_install() {
-	cat $NEWMAPS >> $UPDMAP
-}
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
 
 post_install() {
-	echo    ">>> texlive: updating the filename database..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }
 
-
-pre_upgrade() {
-  if [[ "$2" == 200* ]]; then
-    OLDMAPS="/usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
-  else # >= 2010
-    OLDMAPS="/var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
-  fi
-  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 $OLDMAPS 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..."
-	/usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	/usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+  echo    " done." 
 }
 
 pre_remove() {
-for m in `cut -d' ' -f2 $NEWMAPS`; do 
+for m in `cut -d' ' -f2 $MAPFILE`; do 
   sed -i "/\s$m/d" $UPDMAP ; 
 done
 }
 
 post_remove() {
-  post_install
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }

Modified: texlive-science/trunk/PKGBUILD
===================================================================
--- texlive-science/trunk/PKGBUILD	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-science/trunk/PKGBUILD	2011-01-10 11:19:06 UTC (rev 105549)
@@ -2,7 +2,7 @@
 
 pkgname=texlive-science
 pkgver=2010.20944
-pkgrel=1
+pkgrel=2
 pkgdesc="TeX Live - Typesetting for natural and computer sciences"
 license=('GPL')
 arch=(any)

Modified: texlive-science/trunk/texlive.install
===================================================================
--- texlive-science/trunk/texlive.install	2011-01-10 11:10:07 UTC (rev 105548)
+++ texlive-science/trunk/texlive.install	2011-01-10 11:19:06 UTC (rev 105549)
@@ -1,71 +1,52 @@
 PKGNAME="texlive-science"
 UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
 SYNCWITHTREES=''
-NEWMAPS=`mktemp`
-cat <<EOF > $NEWMAPS
-Map chemarrow.map
-EOF
 
-pre_install() {
-	cat $NEWMAPS >> $UPDMAP
-}
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
 
 post_install() {
-	echo    ">>> texlive: updating the filename database..."
-	usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	usr/bin/updmap-sys --quiet --nohash
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }
 
-
-pre_upgrade() {
-  if [[ "$2" == 200* ]]; then
-    OLDMAPS="usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
-    echo "Info: copying previous updmap.cfg from /usr/share/texmf-config/web2c/"
-    echo "      to /etc/texmf/web2c/ (and keeping new one as updmap.cfg.pacnew)"
-    mv etc/texmf/web2c/updmap.cfg etc/texmf/web2c/updmap.cfg.pacnew 
-    cp usr/share/texmf-config/web2c/updmap.cfg.pacsave etc/texmf/web2c/updmap.cfg
-  else
-    # $2 >= 2010
-    OLDMAPS="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
-  fi
-
-  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 $OLDMAPS not found" 
-    SYNCWITHTREES="--syncwithtrees"
-  fi
-}
-
-
 post_upgrade() {
-	echo    ">>> texlive: updating the filename database..."
-	usr/bin/mktexlsr
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
-	echo    " done." 
+  TMPFILE=`mktemp`
+  echo    ">>> texlive: saving updmap.cfg as $TMPFILE..."
+  cp "$UPDMAP" "$TMPFILE"
+  echo    ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+  echo    "             into /etc/texmf/web2c/updmap-local.cfg"
+  cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+  cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+  [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+  echo    " done." 
 }
 
 pre_remove() {
-for m in `cut -d' ' -f2 $NEWMAPS`; do 
+for m in `cut -d' ' -f2 $MAPFILE`; do 
   sed -i "/\s$m/d" $UPDMAP ; 
 done
 }
 
 post_remove() {
-  post_install
+  echo    ">>> texlive: updating the filename database..."
+  usr/bin/mktexlsr
+  echo    ">>> texlive: updating the fontmap files with updmap..."
+  usr/bin/updmap-sys --quiet --nohash
+  echo    " done." 
 }



More information about the arch-commits mailing list