summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRubin Simons2025-02-25 13:25:15 +0100
committerRubin Simons2025-02-25 13:25:15 +0100
commitef35bcf6564853d87a0d0892f2cc7488c3949edc (patch)
treea61978163b25f81fca59d8980a53a2ee4641f99f /PKGBUILD
downloadaur-ef35bcf6564853d87a0d0892f2cc7488c3949edc.tar.gz
Initial commit, v9.1.7, replaces nodejs-husky
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD30
1 files changed, 30 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..812eddb06bd4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Rubin Simons <me@rubin55.org>
+
+pkgname=husky
+pkgver=9.1.7
+pkgrel=1
+pkgdesc='Git hooks made easy 🐶 woof!'
+arch=('any')
+url="https://github.com/typicode/${pkgname}"
+license=('MIT')
+depends=('nodejs')
+makedepends=('npm')
+conflicts=('nodejs-husky')
+replaces=('nodejs-husky')
+source=("${pkgname}-${pkgver}.tgz::https://github.com/typicode/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz")
+noextract=("${pkgname}-${pkgver}.tgz")
+sha256sums=('8116c0e8f3cbdb38c0be801c259f2088a8ee9cb081f15d9cd0dab590c45de12f')
+
+package() {
+ # Copied from nodejs-nativefier
+ npm install -g --cache "${srcdir}/npm-cache" --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tgz"
+
+ # Fixing permissions
+ find "$pkgdir"/usr -type d -exec chmod 755 {} +
+
+ # Don't give ownership of ALL FILES to build user
+ # https://bugs.archlinux.org/task/63396
+ chown -R root:root "${pkgdir}"
+
+ install -Dm644 "$pkgdir/usr/lib/node_modules/${pkgname#nodejs-}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}