coffee-script-1.9.3-r1.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit multilib
  5. MY_PN="coffeescript"
  6. DESCRIPTION="A little language that compiles into javascript"
  7. HOMEPAGE="http://coffeescript.org/"
  8. # The tests are missing from the npm registry package, so use Github
  9. # instead.
  10. SRC_URI="https://github.com/jashkenas/${MY_PN}/archive/${PV}.tar.gz
  11. -> ${P}.tar.gz"
  12. S="${WORKDIR}/${MY_PN}-${PV}"
  13. LICENSE="MIT"
  14. SLOT="0"
  15. KEYWORDS="amd64 x86"
  16. # This package has a test suite (that works), but it requires a number
  17. # of packages not in the tree. See thread "NPM / NodeJS project" on the
  18. # gentoo-dev archives for more info.
  19. IUSE="doc examples"
  20. RDEPEND="net-libs/nodejs"
  21. src_install(){
  22. local npm_module_dir="/usr/$(get_libdir)/node/${PN}"
  23. insinto "${npm_module_dir}"
  24. doins *.js package.json
  25. doins -r lib
  26. dodoc CONTRIBUTING.md README.md
  27. use doc && dodoc -r documentation
  28. use examples && dodoc -r examples
  29. # The coffee and cake "binaries" use a relative path to find the lib
  30. # directory, so we have to symlink them rather than use dobin().
  31. exeinto "${npm_module_dir}/bin"
  32. doexe bin/cake
  33. doexe bin/coffee
  34. dosym "${npm_module_dir}/bin/cake" "/usr/bin/cake"
  35. dosym "${npm_module_dir}/bin/coffee" "/usr/bin/coffee"
  36. }