eslint-plugin-vue/PKGBUILD
Knut Ahlers d8045d5beb
Remove ignored statement --user root
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2021-04-14 17:01:24 +02:00

30 lines
919 B
Bash

# Maintainer: Knut Ahlers <knut at ahlers dot me>
# Contributor: Andrew Steinke <rkcf@rkcf.me>
pkgname=eslint-plugin-vue
pkgver=7.9.0
pkgrel=2
pkgdesc='ESLint Plugin for Vue.js'
arch=('any')
url='https://github.com/vuejs/eslint-plugin-vue'
license=('MIT')
depends=('eslint')
makedepends=('npm')
source=("http://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz")
md5sums=('70e065f1f6428aff427f3d1320c5f7cf')
noextract=($pkgname-$pkgver.tgz)
package() {
install -dm 755 "$pkgdir/usr/lib"
npm install -g --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
# Fix permissions
find "$pkgdir/usr" -type d -exec chmod 755 '{}' +
# Remove files that conflict with `eslint`:
rm -rf "$pkgdir/usr/lib/node_modules/eslint/"
rm -rf "$pkgdir/usr/bin/eslint"
install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
ln -s ../../../lib/node_modules/$pkgname/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}