# Maintainer: Simon Legner pkgname=wikidata-cli pkgver=9.0.2 pkgrel=1 pkgdesc="The command-line interface to Wikidata" arch=(any) url="https://github.com/maxlath/wikidata-cli#readme" license=('MIT') depends=('nodejs') makedepends=('npm') source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz) noextract=($pkgname-$pkgver.tgz) replaces=('nodejs-wikidata-cli') options=(!strip) package() { cd $srcdir local _npmdir="$pkgdir/usr/lib/node_modules/" mkdir -p $_npmdir cd $_npmdir npm install -g --prefix "$pkgdir/usr" $pkgname@$pkgver install -Dm755 "$_npmdir/$pkgname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" find "${pkgdir}"/usr -name package.json -exec sed -i '/"_where"/d' '{}' '+' find "${pkgdir}"/usr -type d -exec chmod 755 {} + } # vim:set ts=2 sw=2 et: sha256sums=('834d33374e52c318ac808b9274499e8c5186bbfb2b68348fe2c9745027ba95e3')