CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
npush: Initial import (verified compilation).
[attic/ports/games-cross.git] / opentyrian / Pkgfile
1 # Description: open-source port of the DOS shoot-em-up Tyrian
2 # URL: http://code.google.com/p/opentyrian
3 # Packager: Jose V Beneyto, sepen at crux dot nu
4 # Maintainer: Jose V Beneyto, sepen at crux dot nu
5 # Arch Maintainer: CRUX-ARM System Team, crux-arm at mikeux dot dyndns dot org
6 # Depends on: sdl_net
7
8 name=opentyrian
9 version=2.1
10 release=2
11 source=(http://mikeux.dyndns.org/crux/files/$name-$version.tar.bz2 \
12 http://camanis.net/tyrian/tyrian21.zip)
13
14 build() {
15 cd $name-$version
16
17 # fix default screen scaler and resolution
18 sed -i src/video_scale.c -e 's|int scale, scaler = 2|int scale, scaler = 0|'
19 # fix var's assingement in Makefile
20 sed -i Makefile -e 's|:=|=|'
21
22 make \
23 CC="$CC" CFLAGS="$CFLAGS -fgnu89-inline" STRIP="$STRIP" \
24 SDL_CFLAGS="-I$CLFS/usr/include -I$CLFS/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT" \
25 SDL_LDLIBS="-L$CLFS/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lSDL_net"
26
27 install -d $PKG/usr/{bin,share/$name/data}
28 install -D -m 0755 $name $PKG/usr/share/$name/$name
29
30 rm -f $SRC/tyrian21/*.exe
31 install -m 0644 $SRC/tyrian21/* $PKG/usr/share/$name/data/
32
33 cat > $PKG/usr/bin/$name << __EOF__
34 #!/bin/sh
35
36 cd /usr/share/$name
37 ./$name \$@
38 cd - >/dev/null
39
40 # End of file
41 __EOF__
42 chmod +x $PKG/usr/bin/$name
43 }