1 # Maintainer : chris_L <chrislcenter dash mamoru at yahoo.com dot mx>
2 # Contributor: wido <widomaker2k7@gmail.com>
3 # Contributor: David Houston <cranky@archlinux.us>
8 pkgdesc='An enhanced SDL port of the FPS "Wolfenstein 3D" by id Software (You need the retail game files to play)'
10 url="http://www.chaos-software.de.vu/"
12 depends=('sdl_mixer' 'gcc-libs')
13 conflicts=('wolf4sdl-shareware')
14 install=$pkgname.install
15 source=(http://www.alice-dsl.net/mkroll/bins/Wolf4SDL-1.7-src.zip)
16 md5sums=('303f340598bfbe3440523c1ddb9f52e8')
19 cd Wolf4SDL-$pkgver-src
20 # By default, it expects the GT/ID/Activision 1.4 full version files,
21 # uncomment one of the following lines if you got errors about numchecks and you are not using a mod
22 # sed -i -e 's/#define GOODTIMES/\/\/&/' -e 's/\/\/\(#define APOGEE_1_1\)/\1/' version.h # uncoment this line if you have the v1.1 apogee full version
23 # sed -i -e 's/#define GOODTIMES/\/\/&/' version.h # uncoment this line if you have the v1.4 apogee full version
26 # sed lines to make it use /usr/share/wolf3d for data files
27 find -type f |xargs -I file sed -i 's/"\([a-z0-9][a-z0-9]*\.wl[1-9]\)/"\/usr\/share\/wolf3d\/\1/g' file
28 sed -i 's/\(\[\].*\)"\([a-z0-9][a-z0-9]*\.\)"/\1"\/usr\/share\/wolf3d\/\2"/g' id_ca.cpp
29 sed -i 's/\(strcpy(fname, "\)\(gamemaps."\)/\1\/usr\/share\/wolf3d\/\2/' id_ca.cpp
30 sed -i 's/^.*fname\[13\] = "vswap\..*/static const char gvswap\[\] = "\/usr\/share\/wolf3d\/vswap."; char fname\[\]=""; strcpy(fname,gvswap);/' id_pm.cpp
31 sed -i 's/if(!stat("vswap.wl\([0-9]\)", &statbuf))/if(!stat("\/usr\/share\/wolf3d\/vswap.wl\1", \&statbuf))/' wl_menu.cpp
35 make PREFIX="$pkgdir"/usr BINARY=$pkgname install
37 mkdir -p "$pkgdir"/usr/share/{wolf3d,licenses/$pkgname}
38 install -m644 license*.txt "$pkgdir"/usr/share/licenses/$pkgname/