[arch-commits] Commit in pinball/trunk (PKGBUILD pinball.install)

Eric Bélanger eric at archlinux.org
Thu Apr 16 22:15:13 EDT 2009


    Date: Thursday, April 16, 2009 @ 22:15:13
  Author: eric
Revision: 35761

upgpkg: pinball 0.3.1-4
    Added license, Added mesa depends, Added install scriptlet to handle highscore files, Disabled SMP build

Added:
  pinball/trunk/pinball.install
Modified:
  pinball/trunk/PKGBUILD

-----------------+
 PKGBUILD        |   28 ++++++++++++++++++----------
 pinball.install |   29 +++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-04-17 02:05:26 UTC (rev 35760)
+++ PKGBUILD	2009-04-17 02:15:13 UTC (rev 35761)
@@ -4,20 +4,28 @@
 
 pkgname=pinball
 pkgver=0.3.1
-pkgrel=3
+pkgrel=4
 pkgdesc="The Emilia Pinball Project strives to fulfil your needs for a great pinball game in Linux"
-depends=('sdl' 'sdl_mixer' 'sdl_image')
+arch=('i686' 'x86_64')
 url="http://pinball.sourceforge.net/"
+license=('GPL2')
+depends=('sdl' 'sdl_mixer' 'sdl_image' 'mesa')
+options=('!makeflags' 'libtool')
+install=pinball.install
 source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz)
-license=('GPL2')
-arch=('i686' 'x86_64')
 md5sums=('f28e8f49e0db8e9491e4d9f0c13c36c6')
 
 build() {
-	cd $startdir/src/$pkgname-$pkgver
-	./configure --prefix=/usr
-	make || return 1
-	make DESTDIR=$startdir/pkg install
-	chown root:users $startdir/pkg/var/games/pinball/*/highscores
-	chmod 664 $startdir/pkg/var/games/pinball/*/highscores
+  cd $srcdir/$pkgname-$pkgver
+  ./configure --prefix=/usr --disable-sdltest || return 1
+  make || return 1
+  make DESTDIR=$pkgdir install || return 1
+
+  chown root:games $pkgdir/usr/bin/pinball
+  chmod 2755 $pkgdir/usr/bin/pinball
+  chown root:games $pkgdir/var/games
+  chmod 775 $pkgdir/var/games
+  chown root:games $pkgdir/var/games/pinball/{professor,tux}
+  chmod 775 $pkgdir/var/games/pinball/{professor,tux}
+  rm $pkgdir/var/games/pinball/*/highscores
 }

Added: pinball.install
===================================================================
--- pinball.install	                        (rev 0)
+++ pinball.install	2009-04-17 02:15:13 UTC (rev 35761)
@@ -0,0 +1,29 @@
+post_install() {
+  touch var/games/pinball/{professor,tux}/highscores
+  chown root:games var/games/pinball/{professor,tux}/highscores
+  chmod 664 var/games/pinball/{professor,tux}/highscores
+}
+
+pre_upgrade() {
+    cp var/games/pinball/professor/highscores var/games/pinball/professor/highscores.bak.pre_upgrade
+    cp var/games/pinball/tux/highscores var/games/pinball/tux/highscores.bak.pre_upgrade
+}
+
+post_upgrade() {
+
+  if [ -e var/games/pinball/professor/highscores.bak.pre_upgrade ]; then
+    mv var/games/pinball/professor/highscores.bak.pre_upgrade var/games/pinball/professor/highscores
+  fi
+
+  if [ -e var/games/pinball/tux/highscores.bak.pre_upgrade ]; then
+    mv var/games/pinball/tux/highscores.bak.pre_upgrade var/games/pinball/tux/highscores
+  fi
+
+    touch var/games/pinball/professor/highscores
+    chown root:games var/games/pinball/professor/highscores
+    chmod 664 var/games/pinball/professor/highscores
+
+    touch var/games/pinball/tux/highscores
+    chown root:games var/games/pinball/tux/highscores
+    chmod 664 var/games/pinball/tux/highscores
+ }



More information about the arch-commits mailing list