summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Smedstad2024-01-02 15:51:54 +0100
committerCarl Smedstad2024-01-02 15:53:58 +0100
commit06be427c4107a299d958223cea8e3826cb4e392a (patch)
treea7761ca56fb841ae031b9c2dd5f9ac3ccffd73df
parentf56cd4e36125a937103437d820b284db76c22401 (diff)
downloadaur-06be427c4107a299d958223cea8e3826cb4e392a.tar.gz
Publish version 18.4.3-1
-rw-r--r--.SRCINFO13
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD54
3 files changed, 30 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f78ee6116e57..ff7e8a6e3e2a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
pkgbase = nodejs-commitlint
- pkgdesc = Lint your commit messages
- pkgver = 14.1.0
+ pkgdesc = Lint commit messages
+ pkgver = 18.4.3
pkgrel = 1
- url = https://commitlint.js.org
+ url = https://github.com/conventional-changelog/commitlint
arch = any
license = MIT
- makedepends = jq
makedepends = npm
depends = nodejs
- noextract = commitlint-14.1.0.tgz
- source = https://registry.npmjs.org/commitlint/-/commitlint-14.1.0.tgz
- sha256sums = 98379dbb8ea73aa3d5c6e64a2a223c3b0cf97e2f8f2598eec80a6b093a1edafd
+ noextract = commitlint-18.4.3.tgz
+ source = https://registry.npmjs.org/commitlint/-/commitlint-18.4.3.tgz
+ sha256sums = b5561489d36cd73dd10bc817df62036e3c35d3ff2ec994efb9fe22fa4f9b31a3
pkgname = nodejs-commitlint
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f71c635dafda
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!.gitignore
+!PKGBUILD
+!.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
index 16a970311476..c551a6097473 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,31 @@
-# Maintainer:
+# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
+# Contributor: yochananmarqos
# Contributor: Thiago Almeida <thiagoalmeidasa@gmail.com>
+
pkgname=nodejs-commitlint
-_npmname=${pkgname#nodejs-}
-pkgver=14.1.0
+_name=${pkgname#nodejs-}
+pkgver=18.4.3
pkgrel=1
-pkgdesc="Lint your commit messages"
-arch=('any')
-url="https://commitlint.js.org"
-license=('MIT')
-depends=('nodejs')
-makedepends=('jq' 'npm')
-source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz")
-noextract=("$_npmname-$pkgver.tgz")
-sha256sums=('98379dbb8ea73aa3d5c6e64a2a223c3b0cf97e2f8f2598eec80a6b093a1edafd')
+pkgdesc="Lint commit messages"
+arch=(any)
+url="https://github.com/conventional-changelog/commitlint"
+license=(MIT)
+depends=(nodejs)
+makedepends=(npm)
+
+source=("https://registry.npmjs.org/$_name/-/$_name-$pkgver.tgz")
+noextract=("$_name-$pkgver.tgz")
+sha256sums=('b5561489d36cd73dd10bc817df62036e3c35d3ff2ec994efb9fe22fa4f9b31a3')
package() {
- npm install \
+ npm install -g \
--cache "$srcdir/npm-cache" \
- -g \
- --prefix "$pkgdir"/usr \
- "$srcdir"/$_npmname-$pkgver.tgz
-
- # Non-deterministic race in npm gives 777 permissions to random directories.
- # See https://github.com/npm/cli/issues/1103 for details.
- find "$pkgdir/usr" -type d -exec chmod 755 {} +
+ --prefix "$pkgdir/usr" \
+ "$srcdir/$_name-$pkgver.tgz"
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" \
+ "$pkgdir/usr/lib/node_modules/$_name/license.md"
# npm gives ownership of ALL FILES to build user
# https://bugs.archlinux.org/task/63396
chown -R root:root "$pkgdir"
-
- # Remove references to $pkgdir
- find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d'
-
- # Remove references to $srcdir
- local tmppackage="$(mktemp)"
- local pkgjson="$pkgdir/usr/lib/node_modules/$_npmname/package.json"
- jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
- mv "$tmppackage" "$pkgjson"
- chmod 644 "$pkgjson"
-
- install -d "$pkgdir/usr/share/licenses/$pkgname"
- mv "$pkgdir/usr/lib/node_modules/$_npmname/license.md" \
- "$pkgdir/usr/share/licenses/$pkgname"
}