summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/gconf
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing/gconf')
-rw-r--r--abs/core-testing/gconf/PKGBUILD39
-rwxr-xr-xabs/core-testing/gconf/gconf-merge-schema22
-rw-r--r--abs/core-testing/gconf/gconf-reload.patch20
-rw-r--r--abs/core-testing/gconf/gconf.install37
-rwxr-xr-xabs/core-testing/gconf/gconfpkg50
5 files changed, 168 insertions, 0 deletions
diff --git a/abs/core-testing/gconf/PKGBUILD b/abs/core-testing/gconf/PKGBUILD
new file mode 100644
index 0000000..001c9e2
--- /dev/null
+++ b/abs/core-testing/gconf/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 13038 2008-09-25 19:45:37Z jgc $
+# Maintainer: Jan de Groot <jan@archlinux.org>
+
+pkgname=gconf
+pkgver=2.24.0
+pkgrel=1
+pkgdesc="A configuration database system"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('orbit2>=2.14.16' 'gtk2>=2.14.3' 'libxml2>=2.6.32' 'policykit>=0.9' 'libldap>=2.3.43')
+makedepends=('pkgconfig' 'intltool>=0.40.4' 'gtk-doc>=1.10')
+options=('!libtool')
+install=gconf.install
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/GConf/2.24/GConf-${pkgver}.tar.bz2
+ gconf-merge-schema
+ gconfpkg
+ gconf-reload.patch)
+md5sums=('4971d96f5ba94fe4a69396267bd5afe8'
+ '1412bafb06f7d8a9601c8f1c4d72cc06'
+ '0a43077786fe85ee10002b753752379a'
+ 'cfcc8e15be7b8a48de4aa34336ff6090')
+
+build() {
+ cd ${startdir}/src/GConf-${pkgver}
+ patch -Np1 -i ${startdir}/src/gconf-reload.patch || return 1
+ libtoolize --force --copy || return 1
+ aclocal || return 1
+ autoconf || return 1
+ automake --add-missing || return 1
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --libexecdir=/usr/lib/GConf \
+ --disable-static || return 1
+ make pkglibdir=/usr/lib/GConf || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+ install -m755 ${startdir}/src/gconf-merge-schema ${startdir}/pkg/usr/bin/ || return 1
+ install -d -m755 ${startdir}/pkg/usr/sbin
+ install -m755 ${startdir}/src/gconfpkg ${startdir}/pkg/usr/sbin/ || return 1
+}
diff --git a/abs/core-testing/gconf/gconf-merge-schema b/abs/core-testing/gconf/gconf-merge-schema
new file mode 100755
index 0000000..323e0ec
--- /dev/null
+++ b/abs/core-testing/gconf/gconf-merge-schema
@@ -0,0 +1,22 @@
+#!/bin/sh
+if [ ! "$1" -a ! "$2" ]; then
+ echo "Usage: $0 output.schemas file1.schemas [file2.schemas [...]]"
+ exit 1
+fi
+
+OUTFILE="$1"
+shift
+
+echo '<?xml version="1.0"?>' > "$OUTFILE"
+echo '<gconfschemafile><schemalist>' >> "$OUTFILE"
+
+while [ "$1" ]; do
+ if [ -f "$1" ]; then
+ sed -e '/<?xml/d' -e 's|<gconfschemafile>||g' -e 's|</gconfschemafile>||g' \
+ -e 's|<schemalist>||g' -e 's|</schemalist>||g' \
+ "$1" >> "$OUTFILE"
+ fi
+ shift
+done
+
+echo '</schemalist></gconfschemafile>' >> "$OUTFILE"
diff --git a/abs/core-testing/gconf/gconf-reload.patch b/abs/core-testing/gconf/gconf-reload.patch
new file mode 100644
index 0000000..910f0da
--- /dev/null
+++ b/abs/core-testing/gconf/gconf-reload.patch
@@ -0,0 +1,20 @@
+--- GConf-2.16.0/gconf/gconftool.c.orig 2006-10-14 17:37:14.000000000 +0000
++++ GConf-2.16.0/gconf/gconftool.c 2006-10-14 17:39:27.000000000 +0000
+@@ -963,6 +963,8 @@ main (int argc, char** argv)
+
+ gconf_engine_unref (conf);
+
++ g_spawn_command_line_sync ("/usr/bin/killall -q -TERM " GCONF_SERVERDIR "/" GCONFD, NULL, NULL, NULL, NULL);
++
+ return retval;
+ }
+
+@@ -975,6 +977,8 @@ main (int argc, char** argv)
+
+ gconf_engine_unref (conf);
+
++ g_spawn_command_line_sync ("/usr/bin/killall -q -TERM " GCONF_SERVERDIR "/" GCONFD, NULL, NULL, NULL, NULL);
++
+ return retval;
+ }
+
diff --git a/abs/core-testing/gconf/gconf.install b/abs/core-testing/gconf/gconf.install
new file mode 100644
index 0000000..7743def
--- /dev/null
+++ b/abs/core-testing/gconf/gconf.install
@@ -0,0 +1,37 @@
+# arg 1: the new package version
+post_install() {
+ ldconfig -r .
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ ldconfig -r .
+ if [ `vercmp $2 2.18.0.1-2` -lt 0 ]; then
+ echo "Regenerating GConf database... "
+ # Move from /opt/gnome to /usr
+ ldconfig -r .
+ export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
+ find /opt/gnome/{etc,share}/gconf/schemas -name "*.schemas" | xargs \
+ usr/bin/gconftool-2 --makefile-install-rule > /dev/null
+ if [ -f opt/gnome/etc/gconf/panel-default-setup.entries ]; then
+ usr/bin/gconftool-2 --direct --load opt/gnome/etc/gconf/panel-default-setup.entries > /dev/null
+ fi
+ echo "done."
+ fi
+
+ PID=`pidof gconfd-2`
+ if [ ! -z "${PID}" ]; then
+ kill ${PID}
+ fi
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/abs/core-testing/gconf/gconfpkg b/abs/core-testing/gconf/gconfpkg
new file mode 100755
index 0000000..a1ee6df
--- /dev/null
+++ b/abs/core-testing/gconf/gconfpkg
@@ -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