[arch-commits] Commit in (3 files)
Daniel M. Capella
polyzen at archlinux.org
Tue Feb 16 21:50:38 UTC 2021
Date: Tuesday, February 16, 2021 @ 21:50:38
Author: polyzen
Revision: 862340
Respect lockfiles (take 2)
Modified:
htmlhint/trunk/PKGBUILD
stylelint-config-standard/trunk/PKGBUILD
stylelint/trunk/PKGBUILD
------------------------------------------+
htmlhint/trunk/PKGBUILD | 37 +++++++----------------------
stylelint-config-standard/trunk/PKGBUILD | 24 +++---------------
stylelint/trunk/PKGBUILD | 30 ++++++++---------------
3 files changed, 26 insertions(+), 65 deletions(-)
Modified: htmlhint/trunk/PKGBUILD
===================================================================
--- htmlhint/trunk/PKGBUILD 2021-02-16 21:14:18 UTC (rev 862339)
+++ htmlhint/trunk/PKGBUILD 2021-02-16 21:50:38 UTC (rev 862340)
@@ -3,13 +3,13 @@
_name=HTMLHint
pkgname=htmlhint
pkgver=0.14.2
-pkgrel=2
+pkgrel=3
pkgdesc='Static Code Analysis Tool for your HTML'
arch=('any')
url=https://htmlhint.com/
license=('MIT')
depends=('nodejs')
-makedepends=('git' 'jq' 'npm')
+makedepends=('git' 'npm')
source=("git+https://github.com/htmlhint/HTMLHint.git#tag=v$pkgver")
b2sums=('SKIP')
@@ -17,7 +17,6 @@
cd $_name
npm ci
npm run build
- npm pack
}
check() {
@@ -27,32 +26,16 @@
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'
+ npm prune --production
- 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
+ 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:
Modified: stylelint/trunk/PKGBUILD
===================================================================
--- stylelint/trunk/PKGBUILD 2021-02-16 21:14:18 UTC (rev 862339)
+++ stylelint/trunk/PKGBUILD 2021-02-16 21:50:38 UTC (rev 862340)
@@ -2,13 +2,13 @@
pkgname=stylelint
pkgver=13.10.0
-pkgrel=2
+pkgrel=3
pkgdesc='Mighty, modern CSS linter'
arch=('any')
url=https://stylelint.io
license=('MIT')
depends=('nodejs')
-makedepends=('git' 'jq' 'npm')
+makedepends=('git' 'npm' 'rsync')
optdepends=('stylelint-config-standard: for the standard shareable config')
source=("git+https://github.com/stylelint/stylelint.git#tag=$pkgver")
b2sums=('SKIP')
@@ -16,7 +16,6 @@
build() {
cd $pkgname
npm ci
- npm pack
}
check() {
@@ -26,24 +25,17 @@
package() {
cd $pkgname
- npm install --global \
- --user root \
- --prefix "$pkgdir"/usr \
- --production \
- $pkgname-$pkgver.tgz
- chown -R root:root "$pkgdir"
- install -d "$pkgdir"/usr/share/licenses/$pkgname
- ln -s /usr/lib/node_modules/$pkgname/LICENSE \
- "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
- # Remove references to $srcdir and $pkgdir
- find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d'
+ npm prune --production
- 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"
+ install -d "$pkgdir"/usr/{bin,share/doc/$pkgname}
+ ln -s ../lib/node_modules/$pkgname/bin/$pkgname.js "$pkgdir"/usr/bin/$pkgname
+ install -Dt "$pkgdir"/usr/lib/node_modules/$pkgname/bin bin/$pkgname.js
+ rsync -r --exclude __tests__ --exclude lib/testUtils lib \
+ "$pkgdir"/usr/lib/node_modules/$pkgname
+ cp -r node_modules package.json "$pkgdir"/usr/lib/node_modules/$pkgname
+ cp -r {CHANGELOG,CONTRIBUTING,README}.md docs "$pkgdir"/usr/share/doc/$pkgname
+ install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
}
# vim:set ts=2 sw=2 et:
Modified: stylelint-config-standard/trunk/PKGBUILD
===================================================================
--- stylelint-config-standard/trunk/PKGBUILD 2021-02-16 21:14:18 UTC (rev 862339)
+++ stylelint-config-standard/trunk/PKGBUILD 2021-02-16 21:50:38 UTC (rev 862340)
@@ -2,13 +2,13 @@
pkgname=stylelint-config-standard
pkgver=20.0.0
-pkgrel=4
+pkgrel=5
pkgdesc='Standard shareable config for stylelint'
arch=('any')
url=https://github.com/stylelint/stylelint-config-standard
license=('MIT')
-depends=('stylelint')
-makedepends=('git' 'jq' 'npm')
+depends=('stylelint' 'stylelint-config-recommended')
+makedepends=('git' 'npm')
source=("git+$url.git")
b2sums=('SKIP')
@@ -15,7 +15,6 @@
build() {
cd $pkgname
npm ci
- npm pack
}
check() {
@@ -25,21 +24,8 @@
package() {
cd $pkgname
- npm install --global \
- --user root \
- --prefix "$pkgdir"/usr \
- --production \
- $pkgname-$pkgver.tgz
- chown -R root:root "$pkgdir"
-
- # 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"
+ install -Dm644 -t "$pkgdir"/usr/lib/node_modules/$pkgname index.js
+ install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname {CHANGELOG,README}.md
}
# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list