forked from BlackArch/blackarch-pkgbuilds
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPKGBUILD-nodejs-npm
38 lines (26 loc) · 969 Bytes
/
PKGBUILD-nodejs-npm
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
30
31
32
33
34
35
36
37
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.
pkgname=NAME
pkgver=VERSION
pkgrel=1
pkgdesc='Short description without using the package name itself.'
arch=('any' OR 'x86_64' 'aarch64')
groups=('blackarch' MORE_BLACKARCH_GROUPS_HERE)
url='URL pointing to download section of package'
license=('WHATEVER' OR 'custom:unknown')
depends=('nodejs')
makedepends=('npm')
source=("https://foo.bar/downloads/$pkgname-$pkgver.tar.gz")
sha512sums=()
package() {
cd "$pkgname-$pkgver"
_npmdir="$pkgdir/usr/lib/node_modules/"
install -dm 755 "$_npmdir"
cd "$_npmdir"
npm install --user root -g --prefix "$pkgdir/usr" "$pkgname@"
cd "$srcdir/$pkgname"
# Only install license if required according to
# https://wiki.archlinux.org/index.php/PKGBUILD#license
install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" doc/* *.md
install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}