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

Eric Bélanger eric at archlinux.org
Fri Nov 6 09:16:28 EST 2009


    Date: Friday, November 6, 2009 @ 09:16:27
  Author: eric
Revision: 58240

upgpkg: bc 1.06-7
    Added install script to update info db (close FS#13924)

Added:
  bc/trunk/bc.install
Modified:
  bc/trunk/PKGBUILD

------------+
 PKGBUILD   |   19 ++++++++++---------
 bc.install |   20 ++++++++++++++++++++
 2 files changed, 30 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-11-06 14:15:50 UTC (rev 58239)
+++ PKGBUILD	2009-11-06 14:16:27 UTC (rev 58240)
@@ -3,25 +3,26 @@
 
 pkgname=bc
 pkgver=1.06
-pkgrel=6
+pkgrel=7
 pkgdesc="An arbitrary precision calculator language"
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
 url="http://www.gnu.org/software/bc/"
 license=('GPL')
 depends=('readline')
-replaces=(bc-readline)
-conflicts=(bc-readline)
+replaces=('bc-readline')
+conflicts=('bc-readline')
+install=bc.install
 source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz
 	build-fix.patch)
 md5sums=('d44b5dddebd8a7a7309aea6c36fda117' 'fc7ecbd9e55ef04c6d3a495692626116')
+sha1sums=('c8f258a7355b40a485007c40865480349c157292' '3af67c59e2232b9329ff0c1cf49d1a8a1cf87cd7')
 
 build() {
   CFLAGS="$CFLAGS -O3"
-  cd ${startdir}/src/${pkgname}-${pkgver}
-  patch -Np1 -i ${startdir}/src/build-fix.patch || return 1
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -Np1 -i ../build-fix.patch || return 1
   ./configure --prefix=/usr --mandir=/usr/share/man \
-    --infodir=/usr/share/info --with-readline
+    --infodir=/usr/share/info --with-readline || return 1
   make LEX="flex -I" || return 1
-  make DESTDIR=${startdir}/pkg install
-  rm ${pkgdir}/usr/share/info/dir
+  make DESTDIR="${pkgdir}" install || return 1
 }

Added: bc.install
===================================================================
--- bc.install	                        (rev 0)
+++ bc.install	2009-11-06 14:16:27 UTC (rev 58240)
@@ -0,0 +1,20 @@
+infodir=/usr/share/info
+filelist=(bc.info.gz dc.info.gz)
+
+post_install() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    install-info $infodir/$file $infodir/dir 2> /dev/null
+  done
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+pre_remove() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+  done
+}



More information about the arch-commits mailing list