summaryrefslogtreecommitdiffstats
path: root/warsow/PKGBUILD
blob: cddbd6294f367a3ec833e97232fb445a4e0e59ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Contributor: Slash <demodevil5[at]yahoo[dot]com>

pkgname=warsow
pkgver=0.42
pkgrel=2
pkgdesc="Free online multiplayer competitive FPS based on the Qfusion engine."
url="http://www.warsow.net/"
license=('GPL' 'custom:Warsow Content License')
arch=('i686' 'x86_64') 
depends=('sdl' 'curl' 'libxxf86dga' 'libjpeg' 'libvorbis' 'libxxf86vm' 'libxinerama')
makedepends=('mesa' 'openal' 'unzip' 'hd2u')
source=('warsow.desktop' 'warsow.launcher' 'wsw-server.launcher' 'wswtv-server.launcher' \
"http://www.iqclan.com/mirror/0.42/warsow_${pkgver}_unified.zip" \
"https://launchpad.net/warsow/0.4/0.42/+download/warsow_${pkgver}_sdk.zip")
md5sums=('f9bf60c80820237f7097c4e50a9582cd'
         'ec00081d81ad9802a8ca42fc2eac5498'
         'f73e10c26197178df71b941b10bf83d7'
         'd7e4a69835bbcf801e58307e9d6b951e'
         'cba5fe9b8af01b378e685959098fa84f'
         '94c9bb2a48ac6f2687b38809e003f3b9')

build() {
    cd $srcdir/warsow_${pkgver}_unified

    # Create Destination Directories
    install -d $pkgdir/opt/warsow/

    # Delete Pre-Built Binaries/Libraries
    rm {warsow,warsow.i386,warsow.x86_64,warsow_x86.exe,warsow_x64.exe,wsw_portable_x86.exe} wsw_server* wswtv_server* libs/*

    # Move Data to Destination Directory
    cp -r $srcdir/warsow_${pkgver}_unified/basewsw $pkgdir/opt/warsow
    
    # Compile Warsow
    cd $srcdir/warsow_${pkgver}_src/source/
    make || return 1

    # Move Compiled Data to Destination Directory
    cp -r $srcdir/warsow_${pkgver}_src/source/release/* \
        $pkgdir/opt/warsow

    # Fix File Format on Created Scripts
    /usr/bin/dos2unix --d2u $pkgdir/opt/warsow/{warsow,wsw_server,wswtv_server}

    # Install Custom License: Warsow Content License
    install -D -m 0644 $srcdir/docs/license.txt \
        $pkgdir/usr/share/licenses/${pkgname}/license.txt

    # Install Client Game Launcher
    install -D -m 0755 $srcdir/warsow.launcher \
        $pkgdir/usr/bin/warsow

    # Install Server Game Launcher
    install -D -m 0755 $srcdir/wsw-server.launcher \
        $pkgdir/usr/bin/wsw-server

    # Install WSWTV Server Launcher
    install -D -m 0755 $srcdir/wswtv-server.launcher \
        $pkgdir/usr/bin/wswtv-server

    # Install Client Desktop Shortcut
    install -D -m 0644 $srcdir/warsow.desktop \
        $pkgdir/usr/share/applications/warsow.desktop

    # Install Icon
    install -D -m 0644 $srcdir/warsow_${pkgver}_src/source/win32/warsow.ico \
        $pkgdir/usr/share/pixmaps/warsow.ico
}