diff options
author | GoliathLabs | 2020-06-15 14:25:08 +0200 |
---|---|---|
committer | GoliathLabs | 2020-06-15 14:25:08 +0200 |
commit | 0f37f68031f6ebc430681f71b5596c269fcd805c (patch) | |
tree | ef12c36e9ed30abde6d63c589bf6349ad568accb | |
parent | caa392283bc903f9befc80eab7d613e8e3b3df42 (diff) | |
download | aur-0f37f68031f6ebc430681f71b5596c269fcd805c.tar.gz |
Updated: 6.31.1
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 34 |
2 files changed, 23 insertions, 19 deletions
@@ -1,15 +1,15 @@ pkgbase = elasticdump pkgdesc = Import and export tools for Elasticsearch - pkgver = 6.2.2 + pkgver = 6.31.1 pkgrel = 1 url = https://github.com/taskrabbit/elasticsearch-dump arch = any license = Apache makedepends = npm depends = nodejs>=8.0 - noextract = elasticdump-6.2.2.tgz - source = http://registry.npmjs.org/elasticdump/-/elasticdump-6.2.2.tgz - sha256sums = 04ab7525b4b5e104ff37b1771483705e13b46c97a98c064d6cfada5a4829cedd + noextract = elasticdump-6.31.1.tgz + source = http://registry.npmjs.org/elasticdump/-/elasticdump-6.31.1.tgz + sha256sums = 4c4e7f45ef251acc005d3de0a99acfb2b09152c0a62f10fe51e6e043ba97f6f6 pkgname = elasticdump @@ -1,9 +1,10 @@ +# Maintainer: Felix Golatofski <contact@xdfr.de> # Contributor: Johannes Dewender arch at JonnyJD dot net # Contributor: Vlad M. <vlad@archlinux.net> # Contributor: Timofey Titovets <nefelim4ag@gmail.com> pkgname=elasticdump -pkgver=6.2.2 +pkgver=6.31.1 pkgrel=1 pkgdesc="Import and export tools for Elasticsearch" arch=(any) @@ -12,24 +13,27 @@ license=("Apache") depends=('nodejs>=8.0') makedepends=('npm') source=("http://registry.npmjs.org/${pkgname}/-/${pkgname}-${pkgver}.tgz") -sha256sums=('04ab7525b4b5e104ff37b1771483705e13b46c97a98c064d6cfada5a4829cedd') +sha256sums=('4c4e7f45ef251acc005d3de0a99acfb2b09152c0a62f10fe51e6e043ba97f6f6') noextract=("$pkgname-$pkgver.tgz") package() { - npm install -g --user root --prefix "${pkgdir}/usr" "$srcdir/$pkgname-$pkgver.tgz" + # Thanks jeremejevs and je-vv for the pointers on these! + npm install -g --user root --cache "${srcdir}/npm-cache" --prefix "$pkgdir/usr" "$srcdir/$pkgname-$pkgver.tgz" - BASE_PATH="${pkgdir}/usr/lib/node_modules/elasticdump" - TRASH=( - "$BASE_PATH"/.{idea,github} - "$BASE_PATH"/node_modules/lossless-json/.idea - "$BASE_PATH"/node_modules/aws-sdk/.changes - ) + # Fix permissions + find "$pkgdir"/usr -type d -exec chmod 755 {} + - # Cleanup - for path in "${TRASH[@]}"; do - [ -d "$path" ] && rm -r "$path" - done + # npm gives ownership of ALL FILES to build user + # https://bugs.archlinux.org/task/63396 + chown -R root:root "${pkgdir}" - find "$BASE_PATH" -type f -name ".*" -delete - find "$BASE_PATH" -empty -delete + # Remove references to pkgdir + find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d" + + # Remove references to srcdir + 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" } |