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

mudlet-git PKGBUILD

By: a guest on May 22nd, 2014  |  syntax: Bash  |  size: 2.08 KB  |  views: 182  |  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: A. Fluteaux <sigma_g@melix.net>
  2. # Contributor: Elmo Todurov <todurov+arch@gmail.com>
  3. # Contributor: strata <strata@dropswitch.net>
  4. pkgname=mudlet-git
  5. pkgver=20140522
  6. pkgrel=1
  7. pkgdesc="GIT version of mudlet"
  8. arch=('i686' 'x86_64')
  9. url="https://github.com/Mudlet/Mudlet"
  10. license=('GPL')
  11. depends=('lua51' 'qt5-base' 'mesa' 'hunspell' 'zziplib' 'luazip5.1' 'lrexlib-pcre' 'lua51-filesystem' 'lua51-sql-sqlite' 'yajl' 'glu' 'libzip' 'qt5-multimedia')
  12. makedepends=('cmake' 'boost' 'git' 'qt5-tools')
  13. provides=('mudlet')
  14. _gitroot="git://github.com/Mudlet/Mudlet"
  15. _gitname="mudlet"
  16.  
  17. build() {
  18.     cd "$srcdir"
  19.     msg "Connecting to GIT server...."
  20.  
  21.     # Clone or update the Git source
  22.     if [ -d $_gitname ] ; then
  23.         cd $_gitname && git pull origin
  24.         msg "The local files are updated."
  25.     else
  26.         git clone $_gitroot $_gitname
  27.     fi
  28.  
  29.     # Delete and recreate (this is very fast) the compiling directory
  30.     rm -rf "$srcdir/$_gitname-build"
  31.     git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  32.     cd "$srcdir/$_gitname-build/src"
  33.  
  34.     # Set a system-wide Lua scripts directory
  35.     sed -i 's,QString path = "mudlet-lua/lua/LuaGlobal.lua";,QString path = "/usr/share/mudlet/lua/LuaGlobal.lua";,' TLuaInterpreter.cpp
  36.         sed -i 's;"mudlet.app/Contents/Resources/mudlet-lua/lua/";"mudlet.app/Contents/Resources/mudlet-lua/lua/", "/usr/share/mudlet/lua/";' mudlet-lua/lua/LuaGlobal.lua
  37.  
  38.     qmake-qt5
  39.  
  40.     make
  41.  
  42.     cd ../..
  43. }
  44.  
  45. package() {
  46.     cd $srcdir/$_gitname-build/src
  47.     mkdir -p ${pkgdir}/usr/bin
  48.     mkdir -p ${pkgdir}/usr/share/mudlet/lua/geyser
  49.     mkdir -p ${pkgdir}/usr/share/applications
  50.     mkdir -p ${pkgdir}/usr/share/pixmaps
  51.  
  52.     install -m 755 mudlet ${pkgdir}/usr/bin/mudlet || return 1
  53.     install -m 644 mudlet-lua/lua/*.lua ${pkgdir}/usr/share/mudlet/lua || return 1
  54.     install -m 644 mudlet-lua/lua/geyser/* ${pkgdir}/usr/share/mudlet/lua/geyser || return 1
  55.     install -m 644 ../mudlet.desktop ${pkgdir}/usr/share/applications || return 1
  56.     install -m 644 ../mudlet.png ${pkgdir}/usr/share/pixmaps || return 1
  57. }
clone this paste RAW Paste Data