| 1 | # Description: Rick Dangerous clone |
| 2 | # URL: http://www.bigorno.net/xrick/ |
| 3 | # Arch Maintainer: CRUX-ARM System Team, crux-arm at mikeux dot dyndns dot org |
| 4 | # Depends on: zlib libsdl |
| 5 | |
| 6 | name=xrick |
| 7 | version=021212 |
| 8 | release=2 |
| 9 | source=(http://www.bigorno.net/xrick/xrick-021212.tgz) |
| 10 | |
| 11 | build() { |
| 12 | cd $name-$version |
| 13 | |
| 14 | sed -i Makefile \ |
| 15 | -e "s|\$(shell sdl-config --cflags)|-I$CLFS/usr/include -I$CLFS/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT|" \ |
| 16 | -e "s|\$(shell sdl-config --libs)|-L$CLFS/usr/lib -lSDL -lpthread|" \ |
| 17 | -e "s|CC=gcc|CC=$CC|" \ |
| 18 | -e "s|CPP=gcc|CPP=$CC|" |
| 19 | |
| 20 | make SDLVERSION=$(pkginfo -r $CLFS -i | grep libsdl | awk '{print $2}') |
| 21 | |
| 22 | install -d $PKG/usr/{bin,share/$name,man/man6} |
| 23 | install -m 0755 $name $PKG/usr/share/$name |
| 24 | install -m 0644 data.zip $PKG/usr/share/$name |
| 25 | install -m 0644 $name.6.gz $PKG/usr/man/man6 |
| 26 | |
| 27 | cat > $PKG/usr/bin/$name << __EOF__ |
| 28 | #!/bin/sh |
| 29 | |
| 30 | cd /usr/share/$name |
| 31 | ./$name \$@ |
| 32 | cd - >/dev/null |
| 33 | __EOF__ |
| 34 | chmod +x $PKG/usr/bin/$name |
| 35 | } |