42 lines
1.1 KiB
Bash
42 lines
1.1 KiB
Bash
# Maintainer: Haylan
|
|
pkgname=dotfiles-git
|
|
pkgver=r0.0000000
|
|
pkgrel=1
|
|
pkgdesc="Interactive CLI to install/update/remove Haylan's Hyprland dotfiles"
|
|
arch=('any')
|
|
url="https://git.arthurerlich.de/haylan/DotFiles"
|
|
license=('LicenseRef-PolyForm-Noncommercial-1.0.0')
|
|
depends=('nodejs')
|
|
makedepends=('npm' 'git')
|
|
provides=('dotfiles')
|
|
conflicts=('dotfiles')
|
|
source=("$pkgname::git+https://git.arthurerlich.de/haylan/DotFiles.git")
|
|
sha256sums=('SKIP')
|
|
|
|
pkgver() {
|
|
cd "$pkgname"
|
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname"
|
|
npm ci
|
|
npm prune --production
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname"
|
|
|
|
install -d "$pkgdir/usr/lib/node_modules/$pkgname"
|
|
cp -a src packages node_modules package.json package-lock.json \
|
|
"$pkgdir/usr/lib/node_modules/$pkgname/"
|
|
|
|
install -Dm755 /dev/stdin "$pkgdir/usr/bin/dotfiles" <<-EOF
|
|
#!/usr/bin/env bash
|
|
exec "/usr/lib/node_modules/$pkgname/node_modules/.bin/tsx" \\
|
|
"/usr/lib/node_modules/$pkgname/src/cli.ts" "\$@"
|
|
EOF
|
|
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|