summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 77110e80589a6ba3ac639e3e278f81ede087ea5d (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: taotieren <admin@taotieren.com>

pkgname=duh
pkgver=1.21.0
pkgrel=1
epoch=
pkgdesc="DUH is a suite of tools for packaging reusable hardware components and designs."
arch=($CARCH)
url="https://github.com/sifive/duh"
license=('Apache-2.0')
groups=()
depends=(
    gcc-libs
    glibc
    sh
    python
    python-cffi
    python-setuptools
    python-platformdirs
    nodejs
    zlib
)
makedepends=(
    npm
    python-pip
)
checkdepends=()
optdepends=()
provides=(${pkgname})
conflicts=(${pkgname})
replaces=()
backup=()
options=('!strip')
install=
changelog=
source=("${pkgname}-${pkgver}.tgz::https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz")
noextract=()
sha256sums=('54428b896f4ba667a01c4b53ced3051793c97fe1151310cd66b6c79a86b8c21d')
#validpgpkeys=()

package() {
    npm install -g --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tgz"

    # Non-deterministic race in npm gives 777 permissions to random directories.
    # See https://github.com/npm/cli/issues/1103 for details.
    find "${pkgdir}/usr" -type d -exec chmod 755 {} +

    # npm gives ownership of ALL FILES to build user
    # https://bugs.archlinux.org/task/63396
    chown -R root:root "${pkgdir}"
}