Fix collision with eslint community package

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-04-14 00:32:41 +02:00
parent 8a85a1724e
commit ae23a325f1
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -1,4 +1,5 @@
# Maintainer: Andrew Steinke <rkcf@rkcf.me> # Maintainer: Knut Ahlers <knut at ahlers dot me>
# Contributor: Andrew Steinke <rkcf@rkcf.me>
pkgname=eslint-plugin-vue pkgname=eslint-plugin-vue
pkgver=7.4.0 pkgver=7.4.0
@ -14,11 +15,16 @@ md5sums=('05c97697784db7c06b9beec2e0b7c573')
noextract=($pkgname-$pkgver.tgz) noextract=($pkgname-$pkgver.tgz)
package() { package() {
npm install --verbose -g --user root --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz install -dm 755 "$pkgdir/usr/lib"
npm install -g --user root --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
# Fix permissions # Fix permissions
find "$pkgdir/usr" -type d -exec chmod 755 '{}' + 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}" install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
ln -s ../../../lib/node_modules/$pkgname/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" ln -s ../../../lib/node_modules/$pkgname/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
} }