Commit | Line | Data |
---|---|---|
df4c7ac2 JB |
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 | |
7c849019 | 5 | # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu |
df4c7ac2 JB |
6 | # Depends on: sdl_net |
7 | ||
8 | name=opentyrian | |
9 | version=2.1 | |
a2347a2a | 10 | release=2 |
df4c7ac2 JB |
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 | ||
a2347a2a JB |
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 | ||
df4c7ac2 JB |
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 | |
a2347a2a | 31 | install -m 0644 $SRC/tyrian21/* $PKG/usr/share/$name/data/ |
df4c7ac2 JB |
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 | } |