updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / etxreal / PKGBUILD
blob6bf94026fcb3f9444edbe64cfe1d46c377c9f5fd
1 # Maintainer: Babets
3 PKGEXT=".pkg.tar"
5 pkgname=etxreal
6 _pkgname=ETXreaL
7 pkgver=0.3.0_20111110
8 _pkgver=0.3.0-20111110
9 pkgrel=2
10 pkgdesc="ET:XreaL is an XreaL subproject bringing all XreaL enhancements to Return to Castle Wolfenstein: Enemy Territory."
11 arch=('i686' 'x86_64')
12 url="http://www.moddb.com/mods/etxreal"
13 license=('GPL')
14 depends=('curl' 'sdl' 'libxxf86dga' 'libxxf86vm' 'mesa' 'boost-libs' 'etxreal-etfiles')
15 makedepends=('p7zip' 'boost' 'premake')
16 provides=('enemy-territory')
17 replaces=('enemy-territory')
18 install=${pkgname}.install
19 source=(http://downloads.sourceforge.net/xreal/$_pkgname-$_pkgver.7z
20         ETXreaL.desktop
21         ${pkgname}.launcher
22         $pkgname-dedicated.launcher
23         etxmap.launcher)
24 md5sums=('a105a0b79e8e24bdbb87aa3f48c8c661'
25          '1e07814d4fd037874fbcbfc8bc72f5d0'
26          'c122fa0a578b761e84d051979482e9ec'
27          '0045a2e9fdfb59082826690661e7cf9e'
28          '2dd4e79b9eccbc15cbc39e836a6c91c7')
29 build() {
30   cd $srcdir
31   7z x $_pkgname-$_pkgver.7z -y
33   cd "$_pkgname-$_pkgver"
35   # remove precompiled files
36   rm -r  {bin,etmain/*.so,etmain/*.dll}
38   #./premake4 gmake
39   # using system premake
40   premake4 gmake
42   [ "${CARCH}" = "i686"   ] && make
43   [ "${CARCH}" = "x86_64" ] && make config=release64
46 package() {
47   cd "$srcdir/$_pkgname-$_pkgver"
49   # create destination directories
50   install -d $pkgdir/usr/share/$pkgname/{bin,docs,etmain,omni-bot}
51   install -d $pkgdir/usr/share/applications
52   install -d $pkgdir/usr/bin
54   # install etxreal-specific files
55   [ "${CARCH}" = "i686"   ] && install -Dm 755 bin/linux-x86/* $pkgdir/usr/share/$pkgname/bin
56   [ "${CARCH}" = "x86_64" ] && install -Dm 755 bin/linux-x86_64/* $pkgdir/usr/share/$pkgname/bin
57   install -Dm 644 docs/* $pkgdir/usr/share/$pkgname/docs
58   install -Dm 644 etmain/*.so $pkgdir/usr/share/$pkgname/etmain
59   install -Dm 644 etmain/*.pk3 $pkgdir/usr/share/$pkgname/etmain
61  # test and fix omni-bot!!!!
62   cp -R omni-bot/* $pkgdir/usr/share/$pkgname/omni-bot
63   rm -rf $pkgdir/usr/share/$pkgname/omni-bot/src
64   chmod -R go+r $pkgdir/usr/share/$pkgname/omni-bot
65   find $pkgdir/usr/share/$pkgname/omni-bot -type d | xargs chmod go+rx
67   cd ..
69   # install desktop file (icon provided by etxreal-etfiles)
70   install -Dm 644 $_pkgname.desktop $pkgdir/usr/share/applications
72   # install launch scripts
73   install -Dm 755 etxreal.launcher $pkgdir/usr/bin/$pkgname
74   install -Dm 755 $pkgname-dedicated.launcher $pkgdir/usr/bin/$pkgname-dedicated
75   install -Dm 755 etxmap.launcher $pkgdir/usr/bin/etxmap
79 # vim:set ts=2 sw=2 et: