[arch-commits] Commit in texlive-science/repos (3 files)
François Charette
francois at archlinux.org
Tue Aug 18 11:26:16 UTC 2009
Date: Tuesday, August 18, 2009 @ 07:26:16
Author: francois
Revision: 50009
Merged revisions 50008 via svnmerge from
svn+ssh://archlinux.org/srv/svn-packages/texlive-science/trunk
........
r50008 | francois | 2009-08-18 13:25:38 +0200 (Tue, 18 Aug 2009) | 2 lines
upgpkg: texlive-science 2009.14678-1
update + better handling of mapfiles during install
........
Modified:
texlive-science/repos/testing-any/ (properties)
texlive-science/repos/testing-any/PKGBUILD
texlive-science/repos/testing-any/texlive.install
-----------------+
PKGBUILD | 8 +++++---
texlive.install | 51 ++++++++++++++++++++++++++++++++++++++++-----------
2 files changed, 45 insertions(+), 14 deletions(-)
Property changes on: texlive-science/repos/testing-any
___________________________________________________________________
Modified: svnmerge-integrated
- /texlive-science/trunk:1-46787
+ /texlive-science/trunk:1-50008
Modified: testing-any/PKGBUILD
===================================================================
--- testing-any/PKGBUILD 2009-08-18 11:25:38 UTC (rev 50008)
+++ testing-any/PKGBUILD 2009-08-18 11:26:16 UTC (rev 50009)
@@ -1,7 +1,7 @@
# Maintainer: Firmicus <firmicus āt gmx dōt net>
pkgname=texlive-science
-pkgver=2009.13945
+pkgver=2009.14678
pkgrel=1
pkgdesc="TeX Live - Typesetting for natural and computer sciences"
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=('7f95f4005d188086ce5fa220b59baed6')
+md5sums=('d1f7e981782239e9128e5cc1970e8d36'
+ '72206bb981d3d491df018e0e13334be5')
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: testing-any/texlive.install
===================================================================
--- testing-any/texlive.install 2009-08-18 11:25:38 UTC (rev 50008)
+++ testing-any/texlive.install 2009-08-18 11:26:16 UTC (rev 50009)
@@ -1,7 +1,13 @@
+PKGNAME="texlive-science"
+UPDMAP="/usr/share/texmf-config/web2c/updmap.cfg"
+SYNCWITHTREES=''
+NEWMAPS=`mktemp`
+cat <<EOF > $NEWMAPS
+Map chemarrow.map
+EOF
+
pre_install() {
- cat >> /usr/share/texmf-config/web2c/updmap.cfg <<EOF
-MixedMap chemarrow.map
-EOF
+ 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.\+chemarrow\.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