[arch-commits] Commit in abuse/trunk (5 files)

Alexander Rødseth arodseth at nymeria.archlinux.org
Mon Nov 4 12:07:39 UTC 2013


    Date: Monday, November 4, 2013 @ 13:07:39
  Author: arodseth
Revision: 100439

Added desktop shortcut and made it X-friendly

Added:
  abuse/trunk/abuse.sh
  abuse/trunk/default.abuserc
  abuse/trunk/default.gamma.lsp
Modified:
  abuse/trunk/PKGBUILD
Deleted:
  abuse/trunk/abuse.install

-------------------+
 PKGBUILD          |   58 +++++++++++++++++++++++++++++++++++++++-------------
 abuse.install     |   13 -----------
 abuse.sh          |   15 +++++++++++++
 default.abuserc   |   37 +++++++++++++++++++++++++++++++++
 default.gamma.lsp |    1 
 5 files changed, 97 insertions(+), 27 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-11-04 12:04:12 UTC (rev 100438)
+++ PKGBUILD	2013-11-04 12:07:39 UTC (rev 100439)
@@ -1,32 +1,62 @@
 # $Id$
-# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Maintainer: Alexander Rødseth <rodseth at gmail.com>
+# Contributor: Lukas Fleischer <archlinux at cryptocrack dot de>
 # Contributor: jlvsimoes <jlvsimoes at oninet.pt>
 # Contributor: kevin <kevin at archlinux.org>
 
 pkgname=abuse
 pkgver=0.8
-pkgrel=2
-pkgdesc='A side-scroller action game that pits you against ruthless alien killers.'
-arch=('i686' 'x86_64')
+pkgrel=3
+pkgdesc='Side-scroller action game that pits you against ruthless alien killers'
+arch=('x86_64' 'i686')
 url='http://abuse.zoy.org/'
 license=('GPL' 'custom')
-depends=('gcc-libs' 'libgl' 'sdl' 'sdl_mixer')
-install='abuse.install'
-source=("http://abuse.zoy.org/raw-attachment/wiki/download/${pkgname}-${pkgver}.tar.gz")
-md5sums=('ec678b8dc8d00e0382d8c805c6438489')
+depends=('gcc-libs' 'libgl' 'sdl_mixer' 'glu' 'desktop-file-utils')
+makedepends=('gendesk' 'mesa-libgl' 'glu')
+install="$pkgname.install"
+source=("http://abuse.zoy.org/raw-attachment/wiki/download/$pkgname-$pkgver.tar.gz"
+        'abuse.sh'
+        'default.abuserc'
+        'default.gamma.lsp')
+sha256sums=('0104db5fd2695c9518583783f7aaa7e5c0355e27c5a803840a05aef97f9d3488'
+            'a5ddac71ca9b8c4bb42bdf91393a5fbe3d839ab9a9e9a6362a75dafc2aab122e'
+            '960a19cf1354ac073f459953369dbcf718f0c2d93343fe90ceda4058a01f6074'
+            '13df83fea60918d29d5141cdfbd8d56147c053e88d3701209ae676f46447c2f6')
 
+prepare() {
+  cd "abuse-$pkgver"
+
+  gendesk -n -f --pkgname "$pkgname" --pkgdesc "$pkgdesc"
+}
+
 build() {
-  cd "${srcdir}/abuse-${pkgver}"
+  cd "abuse-$pkgver"
 
-  ./configure --prefix=/usr --with-assetdir=/usr/share/abuse/orig --with-x
+  ./configure --prefix=/usr --with-assetdir="/usr/share/$pkgname/orig" --with-x
   make
 }
 
 package() {
-  cd "${srcdir}/abuse-${pkgver}"
+  cd "abuse-$pkgver"
 
-  make DESTDIR="${pkgdir}" install
+  make DESTDIR="$pkgdir" install
 
-  install -d "${pkgdir}/usr/share/licenses/abuse"
-  sed -n '1,/^$/p' src/view.cpp > "${pkgdir}/usr/share/licenses/abuse/orig.code.license"
+  # Desktop shortcut and icon
+  install -Dm644 "$pkgname.desktop" \
+    "$pkgdir/usr/share/applications/$pkgname.desktop"
+  install -Dm644 "doc/$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
+
+  # Sane defaults
+  mv "$pkgdir/usr/bin/$pkgname" "$pkgdir/usr/bin/$pkgname.elf"
+  install -Dm755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
+  install -Dm644 "$srcdir/default.${pkgname}rc" \
+    "$pkgdir/usr/share/$pkgname/default.${pkgname}rc"
+  install -Dm644 "$srcdir/default.gamma.lsp" \
+    "$pkgdir/usr/share/$pkgname/default.gamma.lsp"
+
+  # License (for the original source code)
+  install -d "$pkgdir/usr/share/licenses/abuse"
+  sed -n '1,/^$/p' src/view.cpp > "$pkgdir/usr/share/licenses/abuse/original"
 }
+
+# vim:set ts=2 sw=2 et:

Deleted: abuse.install
===================================================================
--- abuse.install	2013-11-04 12:04:12 UTC (rev 100438)
+++ abuse.install	2013-11-04 12:07:39 UTC (rev 100439)
@@ -1,13 +0,0 @@
-# arg 1:  the new package version
-post_install() {
-#  echo "If you get a BOSS_ANT error trying to run abuse, copy /usr/share/games/abuse/gamma.lsp to ~/.abuse"
-   echo "Abuse uses the original game levels by default.  To use the frabs levels"
-   echo "use '-datadir' or set 'datadir' in the abuserc to /usr/share/abuse/frabs"
-}
-
-# arg 1:  the new package version
-# arg 2:  the old package version
-post_upgrade() {
-	post_install
-}
-

Added: abuse.sh
===================================================================
--- abuse.sh	                        (rev 0)
+++ abuse.sh	2013-11-04 12:07:39 UTC (rev 100439)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Use sane configuration files, unless they already exists
+
+if [ ! -d $HOME/.abuse ]; then
+  mkdir -p $HOME/.abuse
+fi
+if [ ! -f $HOME/.abuse/abuserc ]; then
+  cp /usr/share/abuse/default.abuserc $HOME/.abuse/abuserc
+fi
+if [ ! -f $HOME/.abuse/gamma.lsp ]; then
+  cp /usr/share/abuse/default.gamma.lsp $HOME/.abuse/gamma.lsp
+fi
+
+exec /usr/bin/abuse.elf

Added: default.abuserc
===================================================================
--- default.abuserc	                        (rev 0)
+++ default.abuserc	2013-11-04 12:07:39 UTC (rev 100439)
@@ -0,0 +1,37 @@
+; Abuse-SDL Configuration file
+
+; Startup fullscreen
+fullscreen=1
+
+; Use DoubleBuffering
+doublebuf=1
+
+; Use OpenGL
+gl=1
+
+; Location of the datafiles
+datadir=/usr/share/abuse/orig
+
+; Use mono audio only
+mono=0
+
+; Grab the mouse to the window
+grabmouse=1
+
+; Set the scale factor
+scale=2
+
+; Use anti-aliasing (with gl=1 only)
+antialias=0
+
+; Disable the SDL parachute in the case of a crash
+nosdlparachute=0
+
+; Key mappings
+left=a
+right=d
+up=Space
+down=s
+fire=w
+weapprev=q
+weapnext=e

Added: default.gamma.lsp
===================================================================
--- default.gamma.lsp	                        (rev 0)
+++ default.gamma.lsp	2013-11-04 12:07:39 UTC (rev 100439)
@@ -0,0 +1 @@
+(setq darkest_gray 20)




More information about the arch-commits mailing list