summaryrefslogtreecommitdiff
path: root/community/dopewars
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/dopewars
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/dopewars')
-rw-r--r--community/dopewars/PKGBUILD41
-rw-r--r--community/dopewars/dopewars.install20
2 files changed, 61 insertions, 0 deletions
diff --git a/community/dopewars/PKGBUILD b/community/dopewars/PKGBUILD
new file mode 100644
index 000000000..2fe81262b
--- /dev/null
+++ b/community/dopewars/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 19596 2008-11-28 02:08:18Z thayer $
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Contributor: Jeff Mickey <jeff@archlinux.org>
+# Maintainer: Thayer Williams <thayer@archlinux.org>
+
+pkgname=dopewars
+pkgver=1.5.12
+pkgrel=4
+pkgdesc="dopewars is a Drug dealing game set in New York"
+url="http://dopewars.sourceforge.net/"
+license=('GPL')
+arch=('i686' 'x86_64')
+depends=('gtk2>=2.12.11' 'alsa-lib' 'audiofile' 'esd' 'sdl_mixer' 'ncurses>=5.6-7')
+install='dopewars.install'
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
+md5sums=('debf749de9053dc2fb2e74c37ae06206')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ ./configure --prefix=/usr --localstatedir=/var/games \
+ --mandir=/usr/share/man || return 1
+ make || return 1
+ make DESTDIR=$pkgdir install || return 1
+
+ # setup shortcut menu entries
+ mkdir -p $pkgdir/usr/share/applications
+ mv $pkgdir/usr/share/gnome/apps/Games/dopewars.desktop \
+ $pkgdir/usr/share/applications
+ rm -r $pkgdir/usr/share/gnome
+
+ # set appropriate permissions and destinations
+ chown root:games $pkgdir/usr/bin/dopewars
+ chmod 2755 $pkgdir/usr/bin/dopewars
+ chown root:games $pkgdir/var/games
+ chmod 775 $pkgdir/var/games
+
+ # Handle the scores file creation in the install script
+ rm $pkgdir/var/games/dopewars.sco
+}
+
diff --git a/community/dopewars/dopewars.install b/community/dopewars/dopewars.install
new file mode 100644
index 000000000..2801fc338
--- /dev/null
+++ b/community/dopewars/dopewars.install
@@ -0,0 +1,20 @@
+post_install() {
+ if [ ! -e /var/games/dopewars.sco ]; then
+ mkdir -p /var/games
+ touch /var/games/dopewars.sco
+ chown root:games /var/games/dopewars.sco
+ chmod 664 /var/games/dopewars.sco
+ fi
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ if [ -e /var/games/dopewars.sco ]; then
+ rm /var/games/dopewars.sco
+ fi
+}
+
+# vim:set ts=2 sw=2 et: