updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / planeshift / PKGBUILD
blobcf0cc0272df05d4c57e7199b9274e4d24d07f78e
1 # Maintainer: Alexander Rødseth <rodseth@gmail.com>
2 # Contributor: Jakob Gruber <jakob.gruber@gmail.com>
3 # Contributor: Marcelo Cavalcante / Kalib <kalib@archlinux-br.org>
4 # Contributor: Matthias Maennich <arch@maennich.net>
5 # Contributor: Andrea Scarpino <bash.lnx@gmail.com>
6 # Contributor: Darwin Bautista <djclue917@gmail.com>
7 # Contributor: Gimmeapill <gimmeapill@gmail.com>
8 # Contributor: M Rawash <mrawash@gmail.com>
9 pkgname=planeshift
10 pkgver=0.5.8
11 pkgrel=1
12 pkgdesc="Open source and cross-platform 3D Fantasy MMORPG"
13 url="http://www.planeshift.it/"
14 arch=('x86_64' 'i686')
15 license=('GPL' 'custom:PlaneShift Content License')
16 depends=('libgl' 'libsm' 'libxmu' 'libxpm' 'openal')
17 makedepends=('aria2')
18 options=('emptydirs')
19 install=planeshift.install
20 source=("planeshift_x86_64.meta4"
21         "planeshift_i686.meta4"
22         "planeshift.desktop"
23         "planeshiftsetup.desktop"
24         "license.txt"
25         "scriptfix.patch")
26 md5sums=('e5975637f20741def94a6653bdff78c9'
27          '7af5b5354f679fbdd31852d415d257f8'
28          '5be27f6e51c8edff591aa1fdc668b7e9'
29          'e75381f677b5d2ae331d0e4e742ee21a'
30          'dbac9cf5bfb63463bcb2b5ea09b00586'
31          '9f9b8d4033fd1b2c7ef33c5e04207abb')
33 build() {
34   cd "$srcdir"
36   df -h "$srcdir"
37   msg2 "Downloading PlaneShift $pkgver (may seed for up to a minute)..."
38   msg2 "Be patient and don't panic!"
39   aria2c -M planeshift_$CARCH.meta4 -V -c --allow-overwrite=true --seed-ratio=5.0 --seed-time=1
42 package() {
43   cd "$srcdir"
45   msg2 "Extracting the (large) file..."
46   chmod +x PlaneShift-*.run
47   ./PlaneShift-*.run \
48     --mode unattended \
49     --syswide yes \
50     --prefix "$pkgdir/opt"
52   msg2 "Setting permissions..."
53   find "$pkgdir/opt/PlaneShift" -type f -exec chmod 660 {} +
54   find "$pkgdir/opt/PlaneShift" -type d -exec chmod 770 {} +
55   cd "$pkgdir/opt/PlaneShift"
56   chmod 770 psclient.bin pslaunch.bin psclient pslaunch
58   msg2 "Packaging scripts..."
59   install -Dm755 psclient "$pkgdir/usr/bin/$pkgname"
60   install -Dm755 pslaunch "$pkgdir/usr/bin/$pkgname-setup"
62   msg2 "Cleaning up..."
63   rm -f uninstall unscript.sh planeshift
65   msg2 "Patching..."
66   cd "$pkgdir/usr/bin/"
67   patch -Np0 < "$srcdir/scriptfix.patch"
69   msg2 "Packaging shortcuts..."
70   mkdir -p "$pkgdir/usr/share/applications"
71   install -Dm644 "$srcdir"/*.desktop "$pkgdir/usr/share/applications/"
73   msg2 "Packaging license..."
74   install -Dm644 "$srcdir/license.txt" \
75     "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
78 # vim:set ts=2 sw=2 et: