mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
'rockdodger' brought from [platform].
This commit is contained in:
parent
2638f8b097
commit
00afff66f0
34
rockdodger/PKGBUILD
Normal file
34
rockdodger/PKGBUILD
Normal file
@ -0,0 +1,34 @@
|
||||
# $Id: PKGBUILD 78008 2010-04-19 08:16:13Z dgriffiths $
|
||||
# Maintainer: dale <dale@archlinux.org>
|
||||
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
|
||||
|
||||
pkgname=rockdodger
|
||||
pkgver=0.6
|
||||
pkgrel=2
|
||||
pkgdesc="Space Rocks is a game - Dodge the space rocks, use your shields, fire your thrusters, cross your fingers, and kiss your ship goodbye"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://spacerocks.sourceforge.net/"
|
||||
license=('GPL')
|
||||
depends=('sdl' 'sdl_mixer' 'sdl_image')
|
||||
install=rockdodger.install
|
||||
source=(http://downloads.sourceforge.net/spacerocks/${pkgname}-${pkgver}.tar.gz rockdodger-0.6.0a-gcc41.patch)
|
||||
md5sums=('a82a564a6530e60e7f041f7d95c4cae8' 'c8b17a6ffaa12f1a116170437b4629c0')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/${pkgname}-${pkgver}
|
||||
patch -Np0 -i ../rockdodger-0.6.0a-gcc41.patch || return 1
|
||||
sed -i 's|/usr/share/rockdodger/.highscore|/var/games/rockdodger.highscore|' main.c || return 1
|
||||
sed -i "s|\./data|/usr/share/rockdodger/data|" main.c || return 1
|
||||
sed -i -e "s:-g:${CFLAGS}:" Makefile || return 1
|
||||
make || return 1
|
||||
|
||||
install -D -m755 rockdodger ${pkgdir}/usr/bin/rockdodger
|
||||
install -d ${pkgdir}/usr/share/rockdodger/data
|
||||
install -m644 data/*.{bmp,png,wav,mod} ${pkgdir}/usr/share/rockdodger/data
|
||||
|
||||
chown root:games ${pkgdir}/usr/bin/rockdodger
|
||||
chmod 2755 ${pkgdir}/usr/bin/rockdodger
|
||||
install -d ${pkgdir}/var/games
|
||||
chown root:games ${pkgdir}/var/games
|
||||
chmod 775 ${pkgdir}/var/games
|
||||
}
|
18
rockdodger/rockdodger-0.6.0a-gcc41.patch
Normal file
18
rockdodger/rockdodger-0.6.0a-gcc41.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- main.c.old 2006-04-24 16:16:13.000000000 +0200
|
||||
+++ main.c 2006-04-24 16:16:21.000000000 +0200
|
||||
@@ -206,7 +206,6 @@
|
||||
struct bangdots bdot[MAX_BANG_DOTS], *bdotptr=bdot;
|
||||
struct spacedot sdot[MAX_SPACE_DOTS];
|
||||
|
||||
-struct greeble greeb[MAX_GREEBLES];
|
||||
struct greeble {
|
||||
int active;
|
||||
float x,y; // When landed, these represent an offset from the host rock
|
||||
@@ -214,6 +213,7 @@
|
||||
int landed;
|
||||
int boredom; // Goes up while landed
|
||||
};
|
||||
+struct greeble greeb[MAX_GREEBLES];
|
||||
// }}}
|
||||
|
||||
void init_greeblies() {
|
15
rockdodger/rockdodger.install
Normal file
15
rockdodger/rockdodger.install
Normal file
@ -0,0 +1,15 @@
|
||||
post_install() {
|
||||
touch var/games/rockdodger.highscore
|
||||
chown root:games var/games/rockdodger.highscore
|
||||
chmod 664 var/games/rockdodger.highscore
|
||||
}
|
||||
|
||||
pre_upgrade() {
|
||||
if [ -e usr/share/rockdodger/.highscore ]; then
|
||||
mv usr/share/rockdodger/.highscore var/games/rockdodger.highscore
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
Loading…
Reference in New Issue
Block a user