[arch-commits] CVS update of extra/devel/memprof (PKGBUILD memprof.install)

Jan de Groot jgc at archlinux.org
Sun Apr 22 13:55:11 EDT 2007


    Date: Sunday, April 22, 2007 @ 13:55:11
  Author: jgc
    Path: /home/cvs-extra/extra/devel/memprof

   Added: memprof.install (1.1)
Modified: PKGBUILD (1.12 -> 1.13)

upgpkg: memprof 0.6-2
Move to /usr


-----------------+
 PKGBUILD        |   29 ++++++++++++++++++-----------
 memprof.install |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 11 deletions(-)


Index: extra/devel/memprof/PKGBUILD
diff -u extra/devel/memprof/PKGBUILD:1.12 extra/devel/memprof/PKGBUILD:1.13
--- extra/devel/memprof/PKGBUILD:1.12	Sun Mar  4 03:10:48 2007
+++ extra/devel/memprof/PKGBUILD	Sun Apr 22 13:55:11 2007
@@ -1,27 +1,34 @@
-# $Id: PKGBUILD,v 1.12 2007/03/04 08:10:48 aaron Exp $
+# $Id: PKGBUILD,v 1.13 2007/04/22 17:55:11 jgc Exp $
 # Maintainer: aurelien <aurelien at archlinux.org>
 # Contributor: Aurelien Foret <orelien at chez.com>
+
 pkgname=memprof
 pkgver=0.6
-pkgrel=1
+pkgrel=2
 pkgdesc="A tool for profiling memory usage and finding memory leaks"
 arch=(i686 x86_64)
 url="http://www.gnome.org/projects/memprof/"
-depends=('libgnomeui')
+depends=('libgnomeui>=2.18.1-2')
+makedepends=('pkgconfig')
 license=('GPL')
-source=(http://ftp.gnome.org/pub/GNOME/sources/memprof/0.6/$pkgname-$pkgver.tar.gz)
+source=(http://ftp.gnome.org/pub/GNOME/sources/memprof/0.6/${pkgname}-${pkgver}.tar.gz
+        binutils.patch)
+install=memprof.install
 options=('nolibtool')
-md5sums=('3fa53d937e1e703c1b2d4cec0c6c9645')
+md5sums=('3fa53d937e1e703c1b2d4cec0c6c9645' 'bb554fb98897f47f8390cd24a752c0e5')
 
 build() {
-  cd $startdir/src/$pkgname-$pkgver
-  [ "$GNOMEDIR" = "" ] && /etc/profile.d/gnome.sh
-  [ "$CARCH" = "x86_64" ] && (patch -Np0 -i ../binutils.patch || return 1)
-  
-  ./configure --prefix=/opt/gnome
+  cd ${startdir}/src/${pkgname}-${pkgver}
+  [ "$CARCH" = "x86_64" ] && (patch -Np0 -i ${startdir}/src/binutils.patch || return 1)
+
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-static
   # fix this just in the Makefile for now... memprof bugzilla knows about it
   sed -i "s|cd \$(bindir)|cd \$(DESTDIR)\$(bindir)|" Makefile
 
   make || return 1
-  make DESTDIR=$startdir/pkg install
+  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=${startdir}/pkg install
+   
+  mkdir -p ${startdir}/pkg/usr/share/gconf/schemas
+  gconf-merge-schema ${startdir}/pkg/usr/share/gconf/schemas/${pkgname}.schemas ${startdir}/pkg/etc/gconf/schemas/*.schemas
+  rm -f ${startdir}/pkg/etc/gconf/schemas/*.schemas
 }
Index: extra/devel/memprof/memprof.install
diff -u /dev/null extra/devel/memprof/memprof.install:1.1
--- /dev/null	Sun Apr 22 13:55:11 2007
+++ extra/devel/memprof/memprof.install	Sun Apr 22 13:55:11 2007
@@ -0,0 +1,32 @@
+pkgname=memprof
+
+post_install() {
+  export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
+  usr/bin/gconftool-2 --makefile-install-rule usr/share/gconf/schemas/${pkgname}.schemas >/dev/null
+}
+
+pre_upgrade() {
+  pre_remove $1
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+pre_remove() {
+  if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then
+    schemas=(usr/share/gconf/schemas/${pkgname}.schemas)
+  elif [ -f opt/gnome/share/gconf/schemas/${pkgname}.schemas ]; then
+    schemas=(opt/gnome/share/gconf/schemas/${pkgname}.schemas)
+  else
+    schemas=(`pacman -Ql $pkgname | grep 'gconf/schemas/.*schemas$' | awk '{ print $2 }'`)
+  fi
+  export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
+  
+  usr/bin/gconftool-2 --makefile-uninstall-rule ${schemas[@]} >/dev/null
+}
+
+op=$1
+shift
+
+$op $*




More information about the arch-commits mailing list