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-10-13 06:50:11 +00:00
|
|
|
pkgver=3.1.0
|
2021-07-24 10:00:43 +00:00
|
|
|
pkgrel=1
|
2022-04-30 08:24:15 +00:00
|
|
|
pkgdesc='Next-generation ES6 module bundler'
|
2021-07-24 10:00:43 +00:00
|
|
|
arch=(any)
|
2022-04-30 08:24:15 +00:00
|
|
|
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-10-13 06:50:11 +00:00
|
|
|
sha512sums=('184bebf8239c5e272be27ba287a9a9b7613276ae6567bdb3d11acac751f8fd0da8b93df8387ac8209f4e523dac66a521abb40bf07a7c43c06859b8cbffa71c45')
|
|
|
|
b2sums=('d5769f5313a5d37ca2f8c85888b8f6abd4bf22a37cc2d84bac773a049405ef237973399e3a8add0644ea511d499d2041aa518eafd4c1ba2c364b8c0f100e14b6')
|
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" \
|
2022-10-13 06:50:11 +00:00
|
|
|
"$pkgdir/usr/lib/node_modules/rollup/README.md"
|
2021-08-14 11:12:13 +00:00
|
|
|
|
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"
|
|
|
|
}
|