blob: 1c738bb73f31022008c8762d74747166aa9fc0bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# Maintainer: Nicola Squartini <tensor5@gmail.com>
pkgname=nodejs-jscs
pkgver=3.0.7
pkgrel=1
pkgdesc='JavaScript Code Style'
arch=('any')
url='http://jscs.info/'
license=('MIT')
depends=('nodejs')
makedepends=('npm')
options=(!emptydirs)
package() {
npm install --user root -g --prefix="${pkgdir}"/usr jscs@${pkgver}
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
ln -s ../../../lib/node_modules/jscs/LICENSE \
"${pkgdir}/usr/share/licenses/${pkgname}"
# Clean up
find "${pkgdir}" -name "package.json" -exec sed -e "s|${pkgdir}||" -i {} \; \
-or -name ".*" -type f -exec rm '{}' \; \
-or -name "benchmark" -type d -prune -exec rm -r '{}' \; \
-or -name "man" -type d -prune -exec rm -r '{}' \; \
-or -name "test" -type d -prune -exec rm -r '{}' \; \
-or -name "tests" -type d -prune -exec rm -r '{}' \;
rm -r "${pkgdir}"/usr/lib/node_modules/jscs/node_modules/JSV/jsdoc-toolkit
}
|