[arch-commits] Commit in slib/trunk (PKGBUILD slib.install)

Jan de Groot jgc at archlinux.org
Mon Jan 10 09:01:02 EST 2011


    Date: Monday, January 10, 2011 @ 09:01:02
  Author: jgc
Revision: 105578

upgpkg: slib 3b3-1
Update to 3b3
Do not use makefiles, they need SCM, we can do without
Process info files
Convert to "any" package
Move files to /usr/share, not /usr/lib"

Modified:
  slib/trunk/PKGBUILD
  slib/trunk/slib.install

--------------+
 PKGBUILD     |   53 +++++++++++++++++++++++++++++++++--------------------
 slib.install |   11 +++++------
 2 files changed, 38 insertions(+), 26 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-01-10 13:01:25 UTC (rev 105577)
+++ PKGBUILD	2011-01-10 14:01:02 UTC (rev 105578)
@@ -3,32 +3,45 @@
 # Contributor: David Moore <davidm at sjsoft.com>
 
 pkgname=slib
-pkgver=3b1
+pkgver=3b3
 pkgrel=1
 pkgdesc="A library providing functions for Scheme implementations"
-arch=(i686 x86_64)
-url="http://swissnet.ai.mit.edu/~jaffer/SLIB.html"
-options=('!libtool' 'emptydirs')
-license=("custom")
-#Only guile support for now. In the future we need to determine how to generate
-#the catalog files via makedepends - see slib.install
-depends=('guile')
-source=(http://swiss.csail.mit.edu/ftpdir/scm/$pkgname-$pkgver.zip)
+arch=(any)
+url="http://people.csail.mit.edu/jaffer/SLIB.html"
+license=('custom')
+depends=('guile' 'sh' 'texinfo')
+options=('emptydirs')
 install=slib.install
-md5sums=('9622df4aba2fde24eeb4456d97c5add1')
+source=(http://groups.csail.mit.edu/mac/ftpdir/scm/${pkgname}-${pkgver}.tar.gz)
+md5sums=('11626eef380de4f56d3082514559beb6')
 
 build() {
-  cd $startdir/src/
-  [ -d $pkgname ] || bsdtar -x $pkgname-$pkgver.zip
-  cd $pkgname
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  sed -r -i "s,/usr/(local/)?lib/slib,/usr/share/slib,g" *.init
+  install -m755 -d "${pkgdir}/usr/share/slib"
+  install -m644 *.scm *.init *.xyz *.txt *.dat *.ps "${pkgdir}/usr/share/slib/"
+  install -m755 -d "${pkgdir}/usr/share/info"
+  install -m644 slib.info "${pkgdir}/usr/share/info/"
 
-  sed -i 's|SCHEME_LIBRARY_PATH=\$(DESTDIR)|SCHEME_LIBRARY_PATH=|' Makefile
-  make prefix=/usr/ man1dir=/usr/share/man/man1 \
-    DESTDIR=$startdir/pkg install || return 1
+  install -m755 -d "${pkgdir}/usr/bin"
+  cat << _EOF > "${pkgdir}/usr/bin/slib"
+#!/bin/sh
+SCHEME_LIBRARY_PATH=/usr/share/slib/
+export SCHEME_LIBRARY_PATH
+VERSION=${pkgver}
+S48_VICINITY="/usr/share/scheme48/"
+export S48_VICINITY
+_EOF
 
-  install -D -m644 $startdir/src/slib/COPYING \
-     $startdir/pkg/usr/share/licenses/$pkgname/COPYING
+  cat slib.sh >> "${pkgdir}/usr/bin/slib"
+  chmod 755 "${pkgdir}/usr/bin/slib"
 
-  mkdir -p $startdir/pkg/usr/share/guile/site/
-  ln -s /usr/lib/slib $startdir/pkg/usr/share/guile/site/
+  install -m755 -d "${pkgdir}/usr/share/man/man1"
+  install -m644 slib.1 "${pkgdir}/usr/share/man/man1/"
+
+  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/$pkgname/"
+
+  install -m755 -d "${pkgdir}/usr/share/guile/site/"
+  ln -s /usr/share/slib "${pkgdir}/usr/share/guile/site/"
 }

Modified: slib.install
===================================================================
--- slib.install	2011-01-10 13:01:25 UTC (rev 105577)
+++ slib.install	2011-01-10 14:01:02 UTC (rev 105578)
@@ -1,16 +1,15 @@
-
 #TODO the addition of other implementation support should be added here. We
 # can/should generate catalogs for mzscheme, drscheme, whatever else we can
 
 post_upgrade () {
-    echo ":: Building guile catalog"
-    /usr/bin/guile -c "((use-modules (ice-9 slib))(require 'new-catalog)(quit))"
+  usr/bin/guile -c "((use-modules (ice-9 slib))(require 'new-catalog)(quit))"
+  usr/bin/install-info usr/share/info/slib.info.gz usr/share/info/dir 2>/dev/null
 }
 post_install() {
-    post_upgrade $1
+  post_upgrade
 }
 
 pre_remove() {
-    echo ":: Removing guile catalog"
-    rm /usr/share/guile/site/slibcat
+  rm usr/share/guile/site/slibcat
+  usr/bin/install-info --delete usr/share/info/slib.info.gz usr/share/info/dir 2>/dev/null
 }



More information about the arch-commits mailing list