update PKGBUILD

This commit is contained in:
Lucien Cartier-Tilet 2020-08-11 19:24:44 +02:00
parent e1e70d9d7f
commit 45b153e5ce
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -1,6 +1,6 @@
# Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com> # Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
pkgname=pumopm-git pkgname=pumopm
pkgver=.r0.4e2acb9 pkgver=0.1.0
pkgrel=1 pkgrel=1
pkgdesc="A tiny power manager written in Rust" pkgdesc="A tiny power manager written in Rust"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
@ -9,15 +9,8 @@ license=('GPL3')
depends=() depends=()
makedepends=('rustup' 'git') makedepends=('rustup' 'git')
options=() options=()
source=("$pkgname::git+https://github.com/phundrak/pumopm") source=("$pkgname::https://labs.phundrak.com/phundrak/pumopm/archive/$pkgver.tar.gz")
md5sums=('SKIP') md5sums=('347a95efacdbf9f8ab3b2da6a7eff6cc')
pkgver() {
cd "$pkgname"
local tag=$(git tag --sort=-v:refname | grep '^[0-9]' | head -1)
local commits_since=$(git rev-list $tag..HEAD --count)
echo "$tag.r$commits_since.$(git log --pretty=format:'%h' -n 1)"
}
build() { build() {
cd "$pkgname" cd "$pkgname"