Skip to content

Commit

Permalink
chore: Prepare PKGBUILD for AUR
Browse files Browse the repository at this point in the history
  • Loading branch information
mayanez committed Mar 26, 2024
1 parent cf76995 commit 09f3962
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Maintainer: maarroyo <[email protected]>

_pkgname=dumang-ctrl
pkgname=$_pkgname-git
pkgver=aa4b15d949e3296008ab549540f34ac853a1e94c
pkgver=VERSION
pkgrel=1
pkgdesc="DuMang DK6 Keyboard Programming Tools"
arch=('any')
Expand All @@ -21,8 +20,11 @@ source=($pkgname::git+https://github.com/mayanez/dumang-keyboard-ctrl.git)
md5sums=('SKIP')

pkgver() {
cd $pkgname
git log --format="%H" -n 1
cd "$pkgname"
( set -o pipefail
git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
)
}

build() {
Expand All @@ -35,6 +37,7 @@ package() {
cd $pkgname
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 udev/51-dumang.rules "$pkgdir/usr/lib/udev/rules.d/51-dumang.rules" || return 1
install -Dm644 systemd/dumang-sync-python.service "$pkgdir/usr/lib/systemd/system/dumang-sync-python.service" || return 1
install -Dm644 systemd/dumang-sync.service "$pkgdir/usr/lib/systemd/system/dumang-sync.service" || return 1
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
install=systemd/dumang-sync.install
Expand Down

0 comments on commit 09f3962

Please sign in to comment.