Advertisement
Guest User

coffee-script-git PKGBUILD

a guest
Jan 4th, 2011
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.43 KB | None | 0 0
  1. # Contributor: Stephen Diehl <sdiehl at clarku dot edu>
  2. pkgname=coffee-script-git
  3. pkgver=20110104
  4. pkgrel=1
  5. pkgdesc='CoffeeScript is a little language that compiles into JavaScript.'
  6. arch=any
  7. url=http://coffeescript.org
  8. license=(custom)
  9. makedepends=(nodejs)
  10. md5sums=()
  11. source=("coffee-script-git.install")
  12.  
  13. _gitroot=(https://github.com/jashkenas/coffee-script.git)
  14. _gitname='coffee-script'
  15.  
  16. build() {
  17.   cd "${srcdir}"
  18.   msg "Connecting to the coffee-script git repository..."
  19.  
  20.   if [ -d "${srcdir}/${_gitname}" ] ; then
  21.     cd ${_gitname} && git pull origin
  22.     msg "The local files are updated."
  23.   else
  24.     git clone ${_gitroot}
  25.   fi
  26.  
  27.   msg "GIT checkout done or server timeout"
  28.   msg "Starting make..."
  29.  
  30.   cd "${srcdir}"
  31.  
  32.   rm -rf ${_gitname}-build
  33.   git clone ${_gitname} ${_gitname}-build
  34. }
  35.  
  36. package() {
  37.   install -dm755 "${pkgdir}/usr/bin"
  38.   install -dm755 "${pkgdir}/usr/lib/${_gitname}"
  39.  
  40.   cd "${srcdir}/${_gitname}-build/"
  41.  
  42.   # copy over files
  43.   for f in "bin" "lib" "package.json" "src"; do
  44.       cp -rf "${f}" "${pkgdir}/usr/lib/${_gitname}/"
  45.   done
  46.  
  47.   for f in "coffee" "cake"; do
  48.       ln -sfn "/usr/lib/${_gitname}/bin/${f}" "${pkgdir}/usr/bin/${f}"
  49.       # ln -Dm755 "bin/${f}" "${pkgdir}/usr/bin/${f}"
  50.   done
  51.  
  52.   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${_gitname}/LICENSE"
  53.   install -Dm644 README "$pkgdir/usr/share/doc/${_gitname}/LICENSE"
  54. }
  55. md5sums=('3fade03466fafa37c8950ffb72f0e4ba')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement