[arch-commits] Commit in texlive-pictures/trunk (PKGBUILD texlive.install)
François Charette
francois at archlinux.org
Tue Aug 18 09:52:19 UTC 2009
Date: Tuesday, August 18, 2009 @ 05:52:19
Author: francois
Revision: 49996
upgpkg: texlive-pictures 2009.14620-1
update + better handling of mapfiles during install
Modified:
texlive-pictures/trunk/PKGBUILD
texlive-pictures/trunk/texlive.install
-----------------+
PKGBUILD | 8 +++++---
texlive.install | 47 ++++++++++++++++++++++++++++++++++++++---------
2 files changed, 43 insertions(+), 12 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2009-08-18 09:41:07 UTC (rev 49995)
+++ PKGBUILD 2009-08-18 09:52:19 UTC (rev 49996)
@@ -1,7 +1,7 @@
# Maintainer: Firmicus <firmicus āt gmx dōt net>
pkgname=texlive-pictures
-pkgver=2009.14349
+pkgver=2009.14620
pkgrel=1
pkgdesc="TeX Live - Packages for drawings graphics"
license=('GPL')
@@ -9,10 +9,11 @@
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=('c3c0ce728dc2ee185ce2dec45c862d04')
+md5sums=('6ac80b1b4f4a70a843e160d800c1e5cd'
+ '7678579f4d465c2acfe9ccb6fe03da35')
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
Modified: texlive.install
===================================================================
--- texlive.install 2009-08-18 09:41:07 UTC (rev 49995)
+++ texlive.install 2009-08-18 09:52:19 UTC (rev 49996)
@@ -1,7 +1,13 @@
-pre_install() {
- cat >> /usr/share/texmf-config/web2c/updmap.cfg <<EOF
+PKGNAME="texlive-pictures"
+UPDMAP="/usr/share/texmf-config/web2c/updmap.cfg"
+SYNCWITHTREES=''
+NEWMAPS=`mktemp`
+cat <<EOF > $NEWMAPS
MixedMap xypic.map
EOF
+
+pre_install() {
+ cat $NEWMAPS >> $UPDMAP
}
post_install() {
@@ -12,22 +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.\+xypic\.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