Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 13th, 2012  |  syntax: Bash  |  size: 1.11 KB  |  views: 13  |  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: noonov <noonov@gmail.com>
  2.  
  3. pkgname=ldoc-git
  4. pkgver=20121212
  5. pkgrel=1
  6. pkgdesc="A LuaDoc-compatible documentation generation system"
  7. arch=('i686' 'x86_64')
  8. url="https://github.com/stevedonovan/ldoc"
  9. license=('custom')
  10. depends=('lua-penlight')
  11. makedepends=('git')
  12. provides=('ldoc')
  13. conflicts=('ldoc')
  14. options=()
  15. source=()
  16. md5sums=()
  17.  
  18. _gitroot="https://github.com/stevedonovan/LDoc.git"
  19. _gitname="ldoc"
  20.  
  21. build() {
  22.   cd ${srcdir}
  23.  
  24.   msg "Connecting to GIT server..."
  25.   if [[ -d ${_gitname} ]]; then
  26.     (cd ${_gitname} && git pull origin)
  27.   else
  28.     git clone ${_gitroot} ${_gitname}
  29.   fi
  30.   msg "GIT checkout done or server timeout"
  31.   msg "Starting make..."
  32.  
  33.   rm -rf ${_gitname}-build
  34.   git clone ${_gitname} ${_gitname}-build
  35. }
  36.  
  37. package() {
  38.   cd ${srcdir}/${_gitname}-build
  39.   install -d ${pkgdir}/usr/share/lua/5.2
  40.   cp ldoc.lua ${pkgdir}/usr/share/lua/5.2
  41.   cp -r ldoc ${pkgdir}/usr/share/lua/5.2
  42.  
  43.   install -d ${pkgdir}/usr/bin
  44.   echo "lua /usr/share/lua/5.2/ldoc.lua \$*" > ${pkgdir}/usr/bin/ldoc
  45.   chmod +x ${pkgdir}/usr/bin/ldoc
  46.   ln -s ldoc ${pkgdir}/usr/bin/ldoc.lua
  47. }
clone this paste RAW Paste Data