[arch-commits] CVS update of extra/games/teg (PKGBUILD teg.install)

Jan de Groot jgc at archlinux.org
Sun Apr 22 16:48:46 EDT 2007


    Date: Sunday, April 22, 2007 @ 16:48:46
  Author: jgc
    Path: /home/cvs-extra/extra/games/teg

Modified: PKGBUILD (1.4 -> 1.5) teg.install (1.1 -> 1.2)

upgpkg: teg 0.11.1-3
Move to /usr


-------------+
 PKGBUILD    |   48 +++++++++++++++++++++++-------------------------
 teg.install |   28 +++++++++++++++++-----------
 2 files changed, 40 insertions(+), 36 deletions(-)


Index: extra/games/teg/PKGBUILD
diff -u extra/games/teg/PKGBUILD:1.4 extra/games/teg/PKGBUILD:1.5
--- extra/games/teg/PKGBUILD:1.4	Thu Jul 20 16:22:02 2006
+++ extra/games/teg/PKGBUILD	Sun Apr 22 16:48:45 2007
@@ -1,38 +1,36 @@
-# $Id: PKGBUILD,v 1.4 2006/07/20 20:22:02 andyrtr Exp $
+# $Id: PKGBUILD,v 1.5 2007/04/22 20:48:45 jgc Exp $
 # Maintainer: damir <damir at archlinux.org>
 # Contributor: Adam Griffiths
 
 pkgname=teg
 pkgver=0.11.1
-pkgrel=2
+pkgrel=3
 pkgdesc="Tenes Empanadas Graciela - A risk clone for Gnome 2"
 arch=(i686 x86_64)
+license=('GPL')
 url="http://teg.sourceforge.net/"
-depends=('gtk2' 'readline' 'libgnomeui')
-install=$pkgname.install
+depends=('libgnomeui>=2.18.1-2')
+makedepends=('intltool' 'pkgconfig')
+install=teg.install
 source=('http://easynews.dl.sourceforge.net/sourceforge/teg/teg-0.11.1.tar.gz')
+md5sums=('85db29710452c3c4829e506481deaca0')
 
-build()
-{
-  cd $startdir/src/$pkgname-$pkgver
-  ./configure --prefix=/opt/gnome \
-              --with-readline \
-
+build() {
+  cd ${startdir}/src/${pkgname}-${pkgver}
+  ./configure --prefix=/usr --sysconfdir=/etc \
+              --localstatedir=/var --with-readline
   make || return 1
-  make GCONFTOOL=/bin/true \
-       DESTDIR=$startdir/pkg \
-       install
-
-  mkdir -p $startdir/pkg/opt/gnome/share/applications/
-  mv    $startdir/pkg/opt/gnome/share/gnome/apps/Games/teg.desktop \
-        $startdir/pkg/opt/gnome/share/applications/teg.desktop
-  rm -r $startdir/pkg/opt/gnome/share/gnome/apps/
-
-  sed -i '10iCategories=GNOME;Application;Game;' \
-        $startdir/pkg/opt/gnome/share/applications/teg.desktop
+  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=${startdir}/pkg install
 
+  mkdir -p ${startdir}/pkg/usr/share/applications
+  mv    ${startdir}/pkg/usr/share/gnome/apps/Games/teg.desktop \
+        ${startdir}/pkg/usr/share/applications/teg.desktop
+  rm -rf ${startdir}/pkg/opt/gnome/share/gnome/apps
+
+  sed -i '10iCategories=GNOME;Game;' \
+        ${startdir}/pkg/usr/share/applications/teg.desktop
+
+  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
 }
-
-md5sums=('85db29710452c3c4829e506481deaca0')
-
-
Index: extra/games/teg/teg.install
diff -u extra/games/teg/teg.install:1.1 extra/games/teg/teg.install:1.2
--- extra/games/teg/teg.install:1.1	Sat Mar 12 07:09:18 2005
+++ extra/games/teg/teg.install	Sun Apr 22 16:48:45 2007
@@ -1,11 +1,12 @@
-schemas=(
-  'opt/gnome/etc/gconf/schemas/teg.schemas'
-)
+pkgname=teg
 
 post_install() {
-  for schema in "${schemas[@]}" ; do
-    GCONF_CONFIG_SOURCE=`opt/gnome/bin/gconftool-2 --get-default-source` opt/gnome/bin/gconftool-2 --makefile-install-rule "$schema" > /dev/null 2>&1
-  done
+  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() {
@@ -13,11 +14,16 @@
 }
 
 pre_remove() {
-  /bin/true
-}
-
-post_remove() {
-  /bin/true
+  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




More information about the arch-commits mailing list