Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=mate.git;a=commitdiff;h=b3de6e7ea833a11db9635b55ba1df30b8ea4ef65

commit b3de6e7ea833a11db9635b55ba1df30b8ea4ef65
Author: Pingax <pin...@frugalware.fr>
Date:   Tue Sep 6 11:43:17 2011 +0200

mate-conf-2011.08.31-1-i686
* New package

diff --git a/source/mate-extra/mate-conf/FrugalBuild 
b/source/mate-extra/mate-conf/FrugalBuild
new file mode 100644
index 0000000..cbe5daa
--- /dev/null
+++ b/source/mate-extra/mate-conf/FrugalBuild
@@ -0,0 +1,39 @@
+# Compiling Time: 0.06 SBU
+# Maintainer: Pingax <pin...@frugalware.fr>
+
+pkgname=mate-conf
+pkgver=2011.08.31
+pkgrel=1
+pkgdesc="A configuration database system"
+url="http://matsusoft.com.ar/projects";
+archs=('i686' 'x86_64')
+groups=('mate-extra' 'mate-desktop')
+depends=('mate-corba' 'libxml2' 'polkit' 'libldap' 'gtk+2')
+makedepends=('pkgconfig' 'intltool' 'gtk-doc' 'gobject-introspection')
+backup=('/etc/mateconf/mateconf-merge-schema')
+up2date=$pkgver
+_F_cd_path=$pkgname
+source=(http://downloads.sourceforge.net/matede/$pkgname.tar.gz \
+       mateconfpkg mateconf-merge-schema)
+sha1sums=('57c1d58c20fb958b67957483be826e7b92df6280' \
+          'e6e094eecd00100a6d46bae4a5feee80b48c6cf3' \
+          '29e00cdbada5c4901f93e4e2b68c70543dfc990a')
+
+build() {
+       Fcd
+       Fbuild --prefix=/usr \
+               --sysconfdir=/etc \
+               --libexecdir=/usr/lib/Mateconf \
+               --localstatedir=/var \
+               --enable-defaults-services \
+               --enable-gsettings-backend=no || Fdie
+
+       Ffile mateconf-merge-schema /etc/mateconf/
+       Fmkdir /usr/sbin
+       Fcp mateconfpkg /usr/sbin/
+}
+
+
+
+
+# optimization OK
diff --git a/source/mate-extra/mate-conf/mateconf-merge-schema 
b/source/mate-extra/mate-conf/mateconf-merge-schema
new file mode 100644
index 0000000..3282755
--- /dev/null
+++ b/source/mate-extra/mate-conf/mateconf-merge-schema
@@ -0,0 +1,34 @@
+#!/bin/bash
+if [ ! "$1" -a ! "$2" ]; then
+       echo "Usage: $0 output.schemas [--domain gettextdomain] file1.schemas 
[file2.schemas [...]]"
+       exit 1
+fi
+
+OUTFILE="$1"
+DOMAIN=""
+shift
+
+if [ "$1" = "--domain" ]; then
+       shift
+       DOMAIN=$1
+       shift
+fi
+
+echo '<?xml version="1.0"?>' > "$OUTFILE"
+echo '<mateconfschemafile><schemalist>' >> "$OUTFILE"
+
+while [ "$1" ]; do
+       if [ -f "$1" ]; then
+               sed -e '/<?xml/d' \
+                       -e 's|<mateconfschemafile>||g' \
+                       -e 's|</mateconfschemafile>||g' \
+                       -e 's|<schemalist>||g' \
+                       -e 's|</schemalist>||g' "$1" >> "$OUTFILE"
+       fi
+       shift
+done
+
+echo '</schemalist></mateconfschemafile>' >> "$OUTFILE"
+if [ "$DOMAIN" != "" ]; then
+       sed -ri "s/^([[:space:]]*)(<locale 
name=\"C\">)/\1<gettext_domain>$DOMAIN<\/gettext_domain>\n\1\2/; 
/^[[:space:]]*<locale name=\"[^C]/,/^[[:space:]]*<\/locale>[[:space:]]*\$/ d; 
/^$/d; s/<\/schema>$/&\n/" "$OUTFILE"
+fi
diff --git a/source/mate-extra/mate-conf/mateconfpkg 
b/source/mate-extra/mate-conf/mateconfpkg
new file mode 100644
index 0000000..ecf50d7
--- /dev/null
+++ b/source/mate-extra/mate-conf/mateconfpkg
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+usage() {
+cat << _EOF
+Usage:
+  mateconfpkg [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() {
+       MATECONF_CONFIG_SOURCE=`/usr/bin/mateconftool-2 --get-default-source` \
+               /usr/bin/mateconftool-2 --makefile-install-rule 
/usr/share/mateconf/schemas/${pkgname}.schemas >/dev/null
+}
+
+uninstall() {
+       if [ -f /usr/share/mateconf/schemas/${pkgname}.schemas ]; then
+               schemas=/usr/share/mateconf/schemas/${pkgname}.schemas
+       #elif [ -f /opt/gnome/share/mateconf/schemas/${pkgname}.schemas ]; then
+       #       schemas=/opt/gnome/share/mateconf/schemas/${pkgname}.schemas
+       else
+               schemas=`pacman -Ql ${pkgname} | grep 
'mateconf/schemas/.*schemas$' | awk '{ print $2 }'`
+       fi
+       MATECONF_CONFIG_SOURCE=`/usr/bin/mateconftool-2 --get-default-source` \
+               /usr/bin/mateconftool-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
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to