[arch-commits] Commit in eslint/repos (2 files)

Felix Yan felixonmars at archlinux.org
Sun Oct 15 08:52:20 UTC 2017


    Date: Sunday, October 15, 2017 @ 08:52:20
  Author: felixonmars
Revision: 262865

archrelease: copy trunk to community-testing-any

Added:
  eslint/repos/community-testing-any/
  eslint/repos/community-testing-any/PKGBUILD
    (from rev 262864, eslint/trunk/PKGBUILD)

----------+
 PKGBUILD |   32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Copied: eslint/repos/community-testing-any/PKGBUILD (from rev 262864, eslint/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2017-10-15 08:52:20 UTC (rev 262865)
@@ -0,0 +1,32 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=eslint
+pkgver=4.9.0
+pkgrel=1
+pkgdesc='An AST-based pattern checker for JavaScript'
+arch=('any')
+url='http://eslint.org'
+license=('MIT')
+depends=('nodejs' 'acorn')
+makedepends=('npm')
+source=("https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz")
+noextract=("$pkgname-$pkgver.tgz")
+sha512sums=('44112e1818e5a8dab4632fd116833f159b12a09dae3973b897b63e146c0647004cb1aea459780b6ba79dd8abb5ac8280b0e2fd39f2b208075b7ece2cd9ae083f')
+
+package() {
+  npm install -g --user root --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
+  rm -r "$pkgdir"/usr/etc
+
+  # Fix permissions
+  find "$pkgdir/usr" -type d -exec chmod 755 '{}' +
+
+  install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
+  ln -s ../../../lib/node_modules/eslint/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+  # Experimental dedup
+  cd "$pkgdir"/usr/lib/node_modules/$pkgname/node_modules
+  for dep in acorn; do
+    rm -r $dep;
+  done
+}



More information about the arch-commits mailing list