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

pkgbuild

By: a guest on Mar 20th, 2011  |  syntax: Bash  |  size: 2.40 KB  |  views: 229  |  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: Jakob Gruber <jakob.gruber@gmail.com>
  2. # Contributor: Marcelo Cavalcante / Kalib <kalib@archlinux-br.org>
  3. # Contributor: Matthias Maennich <arch@maennich.net>
  4. # Contributor: Andrea Scarpino <bash.lnx@gmail.com>
  5. # Contributor: Darwin Bautista <djclue917@gmail.com>
  6. # Contributor: Gimmeapill <gimmeapill@gmail.com>
  7. # Maintainer: M Rawash <mrawash@gmail.com>
  8.  
  9. pkgname=planeshift
  10. pkgver=0.5.6
  11. pkgrel=1
  12. pkgdesc="Open source and cross-platform 3D Fantasy MMORPG"
  13. arch=('i686' 'x86_64')
  14.  
  15. _arch="x86"
  16. md5sums=('5dfd640bc6a78b1b10493472fff7db33'
  17.          '5be27f6e51c8edff591aa1fdc668b7e9'
  18.          'e75381f677b5d2ae331d0e4e742ee21a'
  19.          'dbac9cf5bfb63463bcb2b5ea09b00586'
  20.          '9f9b8d4033fd1b2c7ef33c5e04207abb')
  21. if [ $CARCH == "x86_64" ]; then
  22.   _arch="x64"
  23.   md5sums[0]='874e0820cfbc50c7a68776c65bf0881f'
  24. fi
  25.  
  26. url="http://www.planeshift.it/"
  27. license=('GPL' 'custom:PlaneShift Content License')
  28. depends=('libgl' 'libsm' 'libxmu' 'libxpm' 'openal')
  29. options=('emptydirs')
  30. install=planeshift.install
  31. source=("http://kiwi.frubar.net/${pkgname}/${pkgver}/PlaneShift-v${pkgver}-${_arch}.bin" \
  32.         "planeshift.desktop" \
  33.         "planeshiftsetup.desktop" \
  34.         "license.txt"
  35.         "scriptfix.patch")
  36.  
  37. build() {
  38.   cd ${srcdir}
  39.  
  40.   # Make the install executable
  41.   chmod +x PlaneShift-v${pkgver}-${_arch}.bin
  42.  
  43.   # Extract the files
  44.   ./PlaneShift-v${pkgver}-${_arch}.bin \
  45.     --mode unattended \
  46.     --syswide yes \
  47.     --prefix ${pkgdir}/opt
  48.  
  49.   # Set correct permissions for files and folders
  50.   find ${pkgdir}/opt/PlaneShift -type f -exec chmod 660 {} +
  51.   find ${pkgdir}/opt/PlaneShift -type d -exec chmod 770 {} +
  52.  
  53.   cd ${pkgdir}/opt/PlaneShift
  54.  
  55.   # Set correct permissions for executables
  56.   chmod 770 psclient.bin pslaunch.bin psclient pslaunch
  57.  
  58.   # Install scripts to proper directory
  59.   install -D -m755 psclient ${pkgdir}/usr/bin/${pkgname}
  60.   install -D -m755 pslaunch ${pkgdir}/usr/bin/${pkgname}-setup
  61.  
  62.   # Remove unnecessary files
  63.   rm -f uninstall unscript.sh planeshift
  64.  
  65.   cd ${pkgdir}/usr/bin/
  66.  
  67.   #fix script
  68.   patch -Np0 < ${srcdir}/scriptfix.patch
  69.  
  70.   # Install shortcuts
  71.   mkdir -p ${pkgdir}/usr/share/applications
  72.   install -D -m644 ${srcdir}/*.desktop ${pkgdir}/usr/share/applications/
  73.  
  74.   # Install the PlaneShift Content License
  75.   install -D -m644 ${srcdir}/license.txt \
  76.     ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  77. }
  78. # vim:set ts=2 sw=2 et: