updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / iowolfet-hg / PKGBUILD
blob398485f8e13ac7e8e97823cfa07070a7f8240c6e
1 # Maintainer: Swift Geek <swiftgeek+aur at gmail dot com>
3 pkgname=iowolfet-hg
4 pkgver=53
5 pkgrel=1
6 pkgdesc="iowolfet is a completely free, standalone, team-based, multiplayer FPS; based on Wolfenstein: Enemy Territory GPL sources"
7 arch=('i686' 'x86_64')
8 url="http://www.iowolfet.org/"
9 license=('GPL')
10 depends=('mesa' 'libxext' 'enemy-territory')
11 makedepends=('mercurial')
12 #backup=(opt/iowolfet/etmain/server.cfg)
13 #       opt/enemy-territory/etmain/punkbuster.cfg)
14 install=iowolfet.install
15 source=(iowolfet.desktop iowolfet-ded.rc iowolfet.sh iowolfet-ded.sh scripts-x86_64.patch)
16 md5sums=('6b650821e98f7427df7b8ece4932325e'
17          '0c4d902b2a2fc6bd67df74347ce7be3b'
18          '01339bf30a78cfeb5f1c7c74e8db08b2'
19          '9db765b868f15a013ab2ba16c25dfca1'
20          '47e4755cdb246c050b41eed174ec8a08')
21 _hgroot="https://bitbucket.org/tcmreastwood"
22 _hgrepo="raedwulf-et"
23 optdir="/opt/iowolfet"
24 # Computer Architecture Variable used by iowolfet
25 [ "$CARCH" = "i686" ] && _dirarch=i386
26 [ "$CARCH" = "x86_64" ] && _dirarch=x86_64
28 build() {
29                 cd ${srcdir}/${_hgrepo}
32                 #Compile sources
33                 make
34 }               
37 package() {
38                 # Clean after compilation process
39                 #cd $srcdir/${_hgrepo}/build
40                 #rm -r 
41                 # Create Destination Directories
42                 install -d $pkgdir/$optdir/{client,clientsmp,ded,etmain}
43                 install -d $pkgdir/$optdir/etmain/{cgame,game,qcommon,ui,video}
45                 # Place binaries somewhere
46                 cd $srcdir/${_hgrepo}/build/release-linux-$_dirarch
47                 install -m 755 {ioetded.$_dirarch,ioet.$_dirarch,ioet-smp.$_dirarch} $pkgdir/$optdir/
48                 cd ./etmain
49                 install -m 755 {cgame.mp.$_dirarch.so,qagame.mp.$_dirarch.so,ui.mp.$_dirarch.so} $pkgdir/$optdir/etmain
51                 # Place other data files somewhere
52                 cd $srcdir/${_hgrepo}/build/release-linux-$_dirarch
53                 cp -R {client,clientsmp,ded} $pkgdir/$optdir/
54                 cd ./etmain
55                 cp -R {cgame,game,qcommon,ui} $pkgdir/$optdir/etmain
57                 # Place scripts in main/bin directory
58                 #install -Dm 755 $srcdir/iowolfet.sh $pkgdir/$optdir/iowolfet
59                 #install -Dm 755 $srcdir/iowolfet-ded.sh $pkgdir/$optdir/iowolfet-ded
60                 mkdir -p $pkgdir/usr/bin
61                 install -Dm 755 $srcdir/iowolfet.sh $pkgdir/usr/bin/iowolfet
62                 install -Dm 755 $srcdir/iowolfet-ded.sh $pkgdir/usr/bin/iowolfd
65                 # Install rc.d script
66                 install -Dm 755 $srcdir/iowolfet-ded.rc $pkgdir/etc/rc.d/iowolfet-ded
68                 # Install desktop file and icon
69                 install -Dm 644 $srcdir/iowolfet.desktop $pkgdir/usr/share/applications/iowolfet.desktop
70                 #    install -Dm 644 $pkgdir/opt/$pkgname/ET.xpm $pkgdir/usr/share/pixmaps/$pkgname.xpm
72                 # Fix for x86_64
73                 if [[ "$CARCH" == "x86_64" ]]; then
74                         cd $pkgdir
75                         patch -p1 < ../scripts-x86_64.patch
76                 fi
79                 # Make symlinks to main scripts
80                 #mkdir -p $pkgdir/usr/bin
81                 #ln -sf $pkgdir/$optdir/iowolfet $pkgdir/usr/bin/iowolfet
82                 #ln -sf $pkgdir/$optdir/iowolfet-ded $pkgdir/usr/bin/iowolfetd
84                 # Make symlinks to pak and video files from enemy-territory package
85                 ln -sf /opt/enemy-territory/etmain/pak{0,1,2}.pk3 $pkgdir/$optdir/etmain/
86                 ln -sf /opt/enemy-territory/etmain/mp_bin.pk3 $pkgdir/$optdir/etmain/
87                 ln -sf /opt/enemy-territory/etmain/video/etintro.roq $pkgdir/$optdir/etmain/video