Advertisement
Guest User

Untitled

a guest
Dec 13th, 2012
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.11 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement