updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / wolf4sdl-shareware-svn / PKGBUILD
blobf95aed068acf5f86294e93453a8abb62d780cc51
1 # Maintainer: chris_L <chrislcenter dash mamoru at yahoo.com dot mx>
3 pkgname=wolf4sdl-shareware-svn
4 pkgver=255
5 pkgrel=2
6 pkgdesc='An SDL port of the FPS "Wolfenstein 3D" compiled for the shareware version, svn version'
7 arch=('i686' 'x86_64')
8 url="http://www.chaos-software.de.vu/"
9 license=('custom')
10 depends=('sdl_mixer' 'gcc-libs' 'wolf3d-shareware')
11 makedepends=('subversion' 'pkgconfig' 'intltool' 'sed')
12 conflicts=('wolf4sdl-shareware')
13 provides=('wolf4sdl-shareware')
14 source=(http://www.fileden.com/files/2010/12/31/3049394//pc-speaker-by-ljbade-build255.patch)
15 md5sums=('6dc6ec5817e2c6a483a2d3585ed7d002')
17 _svntrunk=svn://tron.homeunix.org:3690/wolf3d/trunk
18 _svnmod=wolf4sdl
20 build() {
21         cd $startdir/src
22         svn co $_svntrunk -r $pkgver $_svnmod
23         cd $_svnmod
24         msg "Starting build..."
25         patch -p1 < ../pc-speaker-by-ljbade-build255.patch # patch for pc-speaker emulation, by ljbade
27         sed -i -e 's/#define GOODTIMES/\/\/&/' -e 's/\/\/\(#define UPLOAD\)/\1/' version.h # set it as the shareware version
29         # sed lines to make it use /usr/share/wolf3d for data files
30         find -type f |xargs -I file sed -i 's/"\([a-z0-9][a-z0-9]*\.wl[1-9]\)/"\/usr\/share\/wolf3d\/\1/g' file
31         sed -i 's/\(\[\].*\)"\([a-z0-9][a-z0-9]*\.\)"/\1"\/usr\/share\/wolf3d\/\2"/g' id_ca.cpp
32         sed -i 's/\(strcpy(fname, "\)\(gamemaps."\)/\1\/usr\/share\/wolf3d\/\2/' id_ca.cpp
33         sed -i 's/^.*fname\[13\] = "vswap\..*/static const char gvswap\[\] = "\/usr\/share\/wolf3d\/vswap."; char fname\[\]=""; strcpy(fname,gvswap);/' id_pm.cpp
34         sed -i 's/if(!stat("vswap.wl\([0-9]\)", &statbuf))/if(!stat("\/usr\/share\/wolf3d\/vswap.wl\1", \&statbuf))/' wl_menu.cpp
36         make BINARY=wolf4sdl || return 1
37         make PREFIX="$pkgdir"/usr BINARY=wolf4sdl install
39         mkdir -p "$pkgdir"/usr/share/{wolf3d,licenses/wolf4sdl}
40         install -m644 license*.txt "$pkgdir"/usr/share/licenses/wolf4sdl/