summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: abb573e31edcd9a2901bb5fe99fe5b241078f488 (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
# Maintainer: Tomasz Jakub Rup <tomasz.rup@gmail.com>
pkgname=speccy
pkgver=0.11.0
pkgrel=1
pkgdesc="A handy toolkit for OpenAPI, with a linter to enforce quality rules, documentation rendering, and resolution"
arch=('any')
url="http://speccy.io/"
license=('MIT')
depends=('nodejs>=8.4.0')
makedepends=('npm')
source=("https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz")
noextract=("$pkgname-$pkgver.tgz")
md5sums=('3abfd7a732829788b9fabdca62c75015')

package() {
	cd $srcdir
	local _npmdir="$pkgdir/usr/lib/node_modules/"
	mkdir -p $_npmdir
	cd $_npmdir
	npm install -g --prefix "$pkgdir/usr" --only=prod $pkgname@$pkgver
	find "$pkgdir"/usr -type d -exec chmod 755 {} +
	install -Dm644 "$_npmdir/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	install -Dm644 "$_npmdir/$pkgname/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
	rm -rf "$pkgdir/usr/etc" "$_npmdir/$pkgname/LICENSE" "$_npmdir/$pkgname/"*.md "$_npmdir/$pkgname/docs" "$_npmdir/$pkgname/examples" "$_npmdir/$pkgname/test" "$_npmdir/$pkgname/Dockerfile" "$_npmdir/$pkgname/.eslintrc.json" "$_npmdir/$pkgname/.dockerignore" "$_npmdir/$pkgname/.editorconfig" "$_npmdir/$pkgname/.circleci" "$_npmdir/$pkgname/.github"
}