Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 19th, 2010  |  syntax: Bash  |  size: 2.20 KB  |  views: 147  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Contributor: Marcelo Cavalcante / Kalib <kalib@archlinux-br.org>
  2. # Contributor: Matthias Maennich <arch@maennich.net>
  3. # Contributor: Andrea Scarpino <bash.lnx@gmail.com>
  4. # Contributor: Darwin Bautista <djclue917@gmail.com>
  5. # Contributor: Gimmeapill <gimmeapill@gmail.com>
  6. # Maintainer: M Rawash <mrawash@gmail.com>
  7.  
  8. pkgname=planeshift
  9. pkgver=0.5.4
  10. pkgrel=1
  11. pkgdesc="Open source and cross-platform 3D Fantasy MMORPG"
  12. arch=('i686' 'x86_64')
  13. _arch="x86"
  14. [ "${CARCH}" = "x86_64" ] && _arch="x64"
  15. url="http://www.planeshift.it/"
  16. license=('GPL' 'custom:PlaneShift Content License')
  17. depends=( 'libgl' 'libsm' 'libxmu' 'libxpm' 'openal')
  18. options=('emptydirs')
  19. install=planeshift.install
  20. source=(http://kiwi.frubar.net/planeshift/${pkgver}/PlaneShift-v${pkgver}-${_arch}.bin \
  21.         planeshift.desktop \
  22.         planeshiftsetup.desktop \
  23.         license.txt
  24.   scriptfix.patch)
  25.  
  26. md5sums=('e3fa024f57d4f88786e6cfa817c5a0ea'
  27.          '5be27f6e51c8edff591aa1fdc668b7e9'
  28.          'e75381f677b5d2ae331d0e4e742ee21a'
  29.          'dbac9cf5bfb63463bcb2b5ea09b00586'
  30.          '9f9b8d4033fd1b2c7ef33c5e04207abb')
  31.  
  32. build() {
  33.   cd ${srcdir}
  34.  
  35.   # Make the install executable
  36.   chmod +x PlaneShift-v${pkgver}-${_arch}.bin
  37.  
  38.   # Extract the files
  39.   ./PlaneShift-v${pkgver}-${_arch}.bin \
  40.   --mode unattended \
  41.   --syswide yes \
  42.   --prefix $pkgdir/opt
  43.  
  44.   # Set correct permissions for files and folders
  45.   find $pkgdir/opt/PlaneShift -type f -exec chmod 660 {} +
  46.   find $pkgdir/opt/PlaneShift -type d -exec chmod 770 {} +
  47.  
  48.   cd $pkgdir/opt/PlaneShift
  49.  
  50.   # Set correct permissions for executables
  51.   chmod 770 psclient.bin pslaunch.bin psclient pslaunch
  52.  
  53.   # Install scripts to proper directory
  54.   install -D -m755 psclient ${pkgdir}/usr/bin/$pkgname
  55.   install -D -m755 pslaunch ${pkgdir}/usr/bin/$pkgname-setup
  56.  
  57.   # Remove unnecessary files
  58.   rm uninstall unscript.sh planeshift
  59.  
  60.   cd $pkgdir/usr/bin/
  61.  
  62.   #fix script
  63.   patch -Np0 < $srcdir/scriptfix.patch || return 1
  64.  
  65.   # Install shortcuts
  66.   mkdir -p $pkgdir/usr/share/applications
  67.   install -D -m644 $srcdir/*.desktop $pkgdir/usr/share/applications/
  68.  
  69.   # Install the PlaneShift Content License
  70.   install -D -m644 $srcdir/license.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
  71. }