[arch-commits] Commit in htmlhint/repos/community-any (PKGBUILD PKGBUILD)

Daniel M. Capella polyzen at archlinux.org
Tue Feb 16 21:51:29 UTC 2021


    Date: Tuesday, February 16, 2021 @ 21:51:29
  Author: polyzen
Revision: 862341

archrelease: copy trunk to community-any

Added:
  htmlhint/repos/community-any/PKGBUILD
    (from rev 862340, htmlhint/trunk/PKGBUILD)
Deleted:
  htmlhint/repos/community-any/PKGBUILD

----------+
 PKGBUILD |   99 +++++++++++++++++++++++++------------------------------------
 1 file changed, 41 insertions(+), 58 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-02-16 21:50:38 UTC (rev 862340)
+++ PKGBUILD	2021-02-16 21:51:29 UTC (rev 862341)
@@ -1,58 +0,0 @@
-# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
-
-_name=HTMLHint
-pkgname=htmlhint
-pkgver=0.14.2
-pkgrel=2
-pkgdesc='Static Code Analysis Tool for your HTML'
-arch=('any')
-url=https://htmlhint.com/
-license=('MIT')
-depends=('nodejs')
-makedepends=('git' 'jq' 'npm')
-source=("git+https://github.com/htmlhint/HTMLHint.git#tag=v$pkgver")
-b2sums=('SKIP')
-
-build() {
-  cd $_name
-  npm ci
-  npm run build
-  npm pack
-}
-
-check() {
-  cd $_name
-  npm test
-}
-
-package() {
-  cd $_name
-  npm install --global \
-              --user root \
-              --prefix "$pkgdir"/usr \
-              --production \
-              $pkgname-$pkgver.tgz
-  chown -R root:root "$pkgdir"
-  cp -r dist "$pkgdir"/usr/lib/node_modules/$pkgname
-  install -d "$pkgdir"/usr/share/licenses/$pkgname
-  ln -s /usr/lib/node_modules/$pkgname/LICENSE.md \
-    "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.md
-
-  # Remove references to $srcdir and $pkgdir
-  find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d'
-
-  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"
-
-	find "$pkgdir" -type f -name package.json | while read pkgjson; do
-		local tmppackage="$(mktemp)"
-		jq 'del(.man)' "$pkgjson" > "$tmppackage"
-		mv "$tmppackage" "$pkgjson"
-		chmod 644 "$pkgjson"
-	done
-}
-
-# vim:set ts=2 sw=2 et:

Copied: htmlhint/repos/community-any/PKGBUILD (from rev 862340, htmlhint/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-02-16 21:51:29 UTC (rev 862341)
@@ -0,0 +1,41 @@
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+
+_name=HTMLHint
+pkgname=htmlhint
+pkgver=0.14.2
+pkgrel=3
+pkgdesc='Static Code Analysis Tool for your HTML'
+arch=('any')
+url=https://htmlhint.com/
+license=('MIT')
+depends=('nodejs')
+makedepends=('git' 'npm')
+source=("git+https://github.com/htmlhint/HTMLHint.git#tag=v$pkgver")
+b2sums=('SKIP')
+
+build() {
+  cd $_name
+  npm ci
+  npm run build
+}
+
+check() {
+  cd $_name
+  npm test
+}
+
+package() {
+  cd $_name
+
+  npm prune --production
+
+  install -d "$pkgdir"/usr/bin
+  ln -s ../lib/node_modules/$pkgname/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
+  install -Dt "$pkgdir"/usr/lib/node_modules/$pkgname/bin bin/$pkgname
+  cp -r dist node_modules package.json "$pkgdir"/usr/lib/node_modules/$pkgname
+  install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname \
+    {CHANGELOG,CONTRIBUTING,README}.md
+  install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE.md
+}
+
+# vim:set ts=2 sw=2 et:


More information about the arch-commits mailing list