summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 57e055c82f27f2ba68daf6ead034a55bea02baf7 (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

# Maintainer: Andrea Feletto <andrea@andreafeletto.com>

pkgname=nodejs-has-flag
_pkgname=${pkgname#*-}
pkgver=4.0.0
pkgrel=1
pkgdesc='Check if argv has a specific flag.'
arch=('any')
url='https://github.com/sindresorhus/has-flag'
license=('MIT')
depends=('nodejs')
makedepends=('npm')
source=("$_pkgname-$pkgver.tar.gz::https://github.com/sindresorhus/$_pkgname/archive/v$pkgver.tar.gz")
noextract=("$_pkgname-$pkgver.tar.gz")
sha256sums=('ffdabbbfcc87e9e363c4a93df49dbec1a0cbff2a69ff22d0d435bdeaf0e78731')

package() {
    cd "$srcdir"

    npm install --user root --global --prefix "$pkgdir/usr" \
        "$_pkgname-$pkgver.tar.gz"

    install -Dm644 \
        "$pkgdir/usr/lib/node_modules/$_pkgname/license" \
        "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}