[arch-commits] CVS update of extra/gnome/gconf (PKGBUILD gconfpkg)

Jan de Groot jgc at archlinux.org
Wed Jun 6 19:53:49 UTC 2007


    Date: Wednesday, June 6, 2007 @ 15:53:49
  Author: jgc
    Path: /home/cvs-extra/extra/gnome/gconf

   Added: gconfpkg (1.1)
Modified: PKGBUILD (1.28 -> 1.29)

upgpkg: gconf 2.18.0.1-4
Add script to allow easy install/uninstall of gconf schemas


----------+
 PKGBUILD |   15 ++++++++++-----
 gconfpkg |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 5 deletions(-)


Index: extra/gnome/gconf/PKGBUILD
diff -u extra/gnome/gconf/PKGBUILD:1.28 extra/gnome/gconf/PKGBUILD:1.29
--- extra/gnome/gconf/PKGBUILD:1.28	Wed May 16 16:16:24 2007
+++ extra/gnome/gconf/PKGBUILD	Wed Jun  6 15:53:49 2007
@@ -1,23 +1,27 @@
-# $Id: PKGBUILD,v 1.28 2007/05/16 20:16:24 jgc Exp $
+# $Id: PKGBUILD,v 1.29 2007/06/06 19:53:49 jgc Exp $
 # Maintainer:  Jan de Groot <jan at archlinux.org>
 
 pkgname=gconf
 pkgver=2.18.0.1
-pkgrel=3
+pkgrel=4
 pkgdesc="A configuration database system"
 arch=(i686 x86_64)
 depends=('orbit2>=2.14.7-2' 'gtk2>=2.10.11')
 makedepends=('pkgconfig' 'intltool>=0.35.5' 'gtk-doc>=1.8')
-options=('nolibtool')
+options=('!libtool')
 install=gconf.install
 url="http://www.gnome.org"
 license=(GPL)
 source=(http://ftp.gnome.org/pub/gnome/sources/GConf/2.18/GConf-${pkgver}.tar.bz2
 	gconf-merge-schema
+	gconfpkg
 	gconf-reload.patch
 	bgo432923.patch)
-md5sums=('aa0e0a0729fb021bab72b4166fd392f9' '1412bafb06f7d8a9601c8f1c4d72cc06'
-	 'cfcc8e15be7b8a48de4aa34336ff6090' 'd41249c1cdb190bded33addbc701ad94')
+md5sums=('aa0e0a0729fb021bab72b4166fd392f9'
+         '1412bafb06f7d8a9601c8f1c4d72cc06'
+         '0a43077786fe85ee10002b753752379a'
+         'cfcc8e15be7b8a48de4aa34336ff6090'
+         'd41249c1cdb190bded33addbc701ad94')
 
 build() {
   cd ${startdir}/src/GConf-${pkgver}
@@ -33,6 +37,7 @@
   make pkglibdir=/usr/lib/GConf || return 1
   make DESTDIR=${startdir}/pkg install
   install -m755 ${startdir}/src/gconf-merge-schema ${startdir}/pkg/usr/bin/
+  install -D -m755 ${startdir}/src/gconfpkg ${startdir}/pkg/usr/sbin/gconfpkg
 
   # Many post_install/pre_remove scripts call it from there
   mkdir -p ${startdir}/pkg/opt/gnome/bin
Index: extra/gnome/gconf/gconfpkg
diff -u /dev/null extra/gnome/gconf/gconfpkg:1.1
--- /dev/null	Wed Jun  6 15:53:48 2007
+++ extra/gnome/gconf/gconfpkg	Wed Jun  6 15:53:49 2007
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+usage() {
+cat << _EOF
+Usage:
+  gconfpkg [OPTION] [PACKAGE] 
+
+  Help Options:
+    -?, --help            Show help options
+
+  Application Options:
+    --install             Install schemas for a given package
+    --uninstall           Uninstall schemas for a given package
+
+_EOF
+}
+
+install() {
+  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
+}
+
+uninstall() {
+  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
+  GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+      /usr/bin/gconftool-2 --makefile-uninstall-rule ${schemas[@]} >/dev/null
+}
+
+if [ -z "$2" ]; then
+  usage
+else
+  pkgname="$2"
+  case "$1" in
+    --install)
+      install
+    ;;
+    --uninstall)
+      uninstall
+    ;;
+    *)
+    usage
+    ;;
+  esac
+fi




More information about the arch-commits mailing list