1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
10 DESCRIPTION="A little language that compiles into javascript"
11 HOMEPAGE="https://coffeescript.org/"
13 # The tests are missing from the npm registry package, so use Github
15 SRC_URI="https://github.com/jashkenas/${MY_PN}/archive/${PV}.tar.gz
17 S="${WORKDIR}/${MY_PN}-${PV}"
23 # This package has a test suite (that works), but it requires a number
24 # of packages not in the tree. See thread "NPM / NodeJS project" on the
25 # gentoo-dev archives for more info.
28 RDEPEND="net-libs/nodejs"
31 local npm_module_dir="/usr/$(get_libdir)/node/${PN}"
32 insinto "${npm_module_dir}"
33 doins *.js package.json
35 dodoc CONTRIBUTING.md README.md
37 use doc && dodoc -r documentation
38 use examples && dodoc -r examples
40 # The coffee and cake "binaries" use a relative path to find the lib
41 # directory, so we have to symlink them rather than use dobin().
42 exeinto "${npm_module_dir}/bin"
45 dosym "${npm_module_dir}/bin/cake" "/usr/bin/cake"
46 dosym "${npm_module_dir}/bin/coffee" "/usr/bin/coffee"