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

Allan McRae allan at archlinux.org
Fri Feb 26 04:41:06 UTC 2010


    Date: Thursday, February 25, 2010 @ 23:41:06
  Author: allan
Revision: 70356

upgpkg: fakeroot 1.14.4-2
ld.so.conf changes (FS#18238)

Modified:
  fakeroot/trunk/PKGBUILD
  fakeroot/trunk/fakeroot.install

------------------+
 PKGBUILD         |   10 +++++++++-
 fakeroot.install |   21 ++++++---------------
 2 files changed, 15 insertions(+), 16 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-02-26 04:40:18 UTC (rev 70355)
+++ PKGBUILD	2010-02-26 04:41:06 UTC (rev 70356)
@@ -4,7 +4,7 @@
 
 pkgname=fakeroot
 pkgver=1.14.4
-pkgrel=1
+pkgrel=2
 pkgdesc="Gives a fake root environment, useful for building packages as a non-privileged user"
 arch=('i686' 'x86_64')
 license=('GPL')
@@ -22,7 +22,15 @@
 	 --disable-static --with-ipc=sysv
 	# --with-ipc=tcp is currently broken and no option on smp systems
   make || return 1
+}
+
+package() {
+  cd ${srcdir}/$pkgname-$pkgver
   make DESTDIR=${pkgdir} install || return 1
+  
+  install -dm755 ${pkgdir}/etc/ld.so.conf.d/
+  echo '/usr/lib/libfakeroot' > ${pkgdir}/etc/ld.so.conf.d/fakeroot.conf
+  
   # install README for sysv/tcp usage
   install -Dm644 $srcdir/$pkgname-$pkgver/README $pkgdir/usr/share/doc/$pkgname/README
 }

Modified: fakeroot.install
===================================================================
--- fakeroot.install	2010-02-26 04:40:18 UTC (rev 70355)
+++ fakeroot.install	2010-02-26 04:41:06 UTC (rev 70356)
@@ -1,23 +1,14 @@
-# arg 1: the new package version
 post_install() {
-	if [ ! "`grep /usr/lib/libfakeroot etc/ld.so.conf`" ]; then
-		echo -n "updating /etc/ld.so.conf... "
-		echo "/usr/lib/libfakeroot" >>etc/ld.so.conf
-		sbin/ldconfig -r .
-		echo "done."
-	fi
+  sbin/ldconfig -r .
 }
 
-# arg 1: the new package version
-# arg 2: the old package version
 post_upgrade() {
-	post_install $1
+  if [ "$(vercmp $2 1.14.4-2)" -lt 0 ]; then
+    sed -i -e '/\/usr\/lib\/libfakeroot/d' etc/ld.so.conf
+  fi
+  sbin/ldconfig -r .
 }
 
-# arg 1: the old package version
 pre_remove() {
-	echo -ne "\nupdating /etc/ld.so.conf... "
-	sed -i -e '/\/usr\/lib\/libfakeroot/d' etc/ld.so.conf
-	sbin/ldconfig -r .
-	echo "done."
+  sbin/ldconfig -r .
 }




More information about the arch-commits mailing list