2021-07-24 10:00:43 +00:00
|
|
|
# Maintainer: Simon Legner <Simon.Legner@gmail.com>
|
|
|
|
# Contributor: George Rawlinson <george@rawlinson.net.nz>
|
|
|
|
|
|
|
|
pkgname=rollup
|
2022-01-25 08:14:28 +00:00
|
|
|
pkgver=2.66.1
|
2021-07-24 10:00:43 +00:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="Next-generation ES6 module bundler"
|
|
|
|
arch=(any)
|
|
|
|
url="https://rollupjs.org/"
|
2022-01-22 09:02:40 +00:00
|
|
|
license=('MIT')
|
2021-07-24 10:00:43 +00:00
|
|
|
depends=('nodejs')
|
|
|
|
makedepends=('npm' 'jq')
|
2021-08-14 11:12:13 +00:00
|
|
|
source=("$pkgname-$pkgver.tar.gz::https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz")
|
|
|
|
noextract=("$pkgname-$pkgver.tar.gz")
|
2022-01-25 08:14:28 +00:00
|
|
|
sha512sums=('72b4a02e14a42cc9caaf8b3d899ff5a890a9960020ad163e8a05aff0a846fc08ca389d185ff5a99803729fca31af0fb37a71770575832daed797f4192121feef')
|
|
|
|
b2sums=('6aa39c0827f6fe362413984f6d0dcac04dfabce6586142ff03de7e891def1a993dba5e7774c77d7a71c89e54fda670912ced73410567cd5d161bdb811d8b8dde')
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
package() {
|
2021-08-14 11:12:13 +00:00
|
|
|
local NPM_FLAGS=(--no-audit --no-fund --no-update-notifier)
|
|
|
|
|
|
|
|
npm install \
|
|
|
|
--global \
|
2021-07-24 10:00:43 +00:00
|
|
|
--prefix "$pkgdir/usr" \
|
|
|
|
--cache "$srcdir/npm-cache" \
|
2021-08-14 11:12:13 +00:00
|
|
|
"${NPM_FLAGS[@]}" \
|
|
|
|
"$pkgname-$pkgver.tar.gz"
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
# install licenses
|
2021-08-23 07:12:05 +00:00
|
|
|
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" \
|
2021-07-24 10:00:43 +00:00
|
|
|
"$pkgdir/usr/lib/node_modules/rollup/LICENSE.md"
|
|
|
|
|
2021-08-14 11:12:13 +00:00
|
|
|
# install documentation
|
|
|
|
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" \
|
|
|
|
"$pkgdir/usr/lib/node_modules/rollup/"{CHANGELOG,README}.md
|
|
|
|
|
2021-07-24 10:00:43 +00:00
|
|
|
# remove references to ${src,pkg}dir
|
|
|
|
local tmppackage="$(mktemp)"
|
|
|
|
local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json"
|
|
|
|
jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
|
|
|
|
mv "$tmppackage" "$pkgjson"
|
|
|
|
chmod 644 "$pkgjson"
|
|
|
|
|
|
|
|
# npm gives ownership of ALL FILES to build user
|
|
|
|
# https://bugs.archlinux.org/task/63396
|
|
|
|
chown -R root:root "$pkgdir"
|
|
|
|
}
|