[arch-commits] Commit in texlive-music/repos (4 files)

François Charette francois at archlinux.org
Thu Sep 3 18:47:48 UTC 2009


    Date: Thursday, September 3, 2009 @ 14:47:48
  Author: francois
Revision: 50934

Merged revisions 49981,50925 via svnmerge from 
svn+ssh://gerolde.archlinux.org/srv/svn-packages/texlive-music/trunk

........
  r49981 | francois | 2009-08-18 10:58:15 +0200 (Tue, 18 Aug 2009) | 1 line
  
  better handling of mapfiles during install
........
  r50925 | francois | 2009-09-03 20:36:55 +0200 (Thu, 03 Sep 2009) | 1 line
  
  add missing map files!
........

Added:
  texlive-music/repos/extra-any/texlive-music.maps
    (from rev 50925, texlive-music/trunk/texlive-music.maps)
Modified:
  texlive-music/repos/extra-any/	(properties)
  texlive-music/repos/extra-any/PKGBUILD
  texlive-music/repos/extra-any/texlive.install

--------------------+
 PKGBUILD           |    8 +++++---
 texlive-music.maps |    1 +
 texlive.install    |   48 ++++++++++++++++++++++++++++++++++++++----------
 3 files changed, 44 insertions(+), 13 deletions(-)


Property changes on: texlive-music/repos/extra-any
___________________________________________________________________
Modified: svnmerge-integrated
   - /texlive-music/trunk:1-47197
   + /texlive-music/trunk:1-50933

Modified: extra-any/PKGBUILD
===================================================================
--- extra-any/PKGBUILD	2009-09-03 18:47:02 UTC (rev 50933)
+++ extra-any/PKGBUILD	2009-09-03 18:47:48 UTC (rev 50934)
@@ -2,17 +2,18 @@
 
 pkgname=texlive-music
 pkgver=2009.13822
-pkgrel=1
+pkgrel=2
 pkgdesc="TeX Live - Music typesetting packages"
 license=('GPL')
 arch=(any)
 depends=('texlive-core')
 groups=('texlive-most')
 url='http://tug.org/texlive/'
-source=("ftp://ftp.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip")
+source=("ftp://ftp.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip" "$pkgname.maps")
 options=('!emptydirs')
 install=texlive.install
-md5sums=('3604870c33fe1439941491ff5b23ffc6')
+md5sums=('d05eff84cc6305d386af9d306f9cbbe5'
+         '6af96d016e18492867d6f4ba2eff0a31')
 
 build() {
    cd $srcdir
@@ -20,6 +21,7 @@
    sed -i '/^#/d' CONTENTS || return 1
    _revnr=`echo $pkgver | sed 's/2009\.//'`
    install -m644 CONTENTS $pkgdir/usr/share/texmf-var/arch/installedpkgs/${pkgname}_${_revnr}.pkgs || return 1
+   install -m644 $pkgname.maps $pkgdir/usr/share/texmf-var/arch/installedpkgs/ || return 1
    for p in *.tar.xz; do 
 	   bsdtar -xf $p || return 1
    done

Copied: texlive-music/repos/extra-any/texlive-music.maps (from rev 50925, texlive-music/trunk/texlive-music.maps)
===================================================================
--- extra-any/texlive-music.maps	                        (rev 0)
+++ extra-any/texlive-music.maps	2009-09-03 18:47:48 UTC (rev 50934)
@@ -0,0 +1 @@
+MixedMap musix.map

Modified: extra-any/texlive.install
===================================================================
--- extra-any/texlive.install	2009-09-03 18:47:02 UTC (rev 50933)
+++ extra-any/texlive.install	2009-09-03 18:47:48 UTC (rev 50934)
@@ -1,7 +1,13 @@
-pre_install() {
-        cat >> /usr/share/texmf-config/web2c/updmap.cfg <<EOF
+PKGNAME="texlive-music"
+UPDMAP="/usr/share/texmf-config/web2c/updmap.cfg"
+SYNCWITHTREES=''
+NEWMAPS=`mktemp`
+cat <<EOF > $NEWMAPS
 MixedMap musix.map
 EOF
+
+pre_install() {
+	cat $NEWMAPS >> $UPDMAP
 }
 
 post_install() {
@@ -12,23 +18,45 @@
 	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
+	updmap-sys --quiet --nohash $SYNCWITHTREES
 	echo    " done." 
 }
 
 pre_remove() {
-	sed -i "/^M.\+musix\.map/d" /usr/share/texmf-config/web2c/updmap.cfg
+for m in `cut -d' ' -f2 $NEWMAPS`; do 
+  sed -i "/\s$m/d" $UPDMAP ; 
+done
 }
 
 post_remove() {
-	echo    ">>> texlive: updating the filename database..."
-	texconfig-sys rehash
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	updmap-sys --quiet --nohash
-	echo    " done." 
+  post_install
 }
-




More information about the arch-commits mailing list