summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 60ca5eee01a1ebf5ca0ad5f2cd3e50098ad39d28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Maintainer: Alexander Rundberg <alexanderrundberg [at] fastmail [dot] jp>
# Maintainer: Ryan O'Beirne <ryanobeirne [at] ryanobeirne [dot] com>
__pkgname=pretty-git-prompt
pkgname="$__pkgname-git"
conflicts=("$__pkgname")
pkgver=0.2.1_63967bc
pkgrel=1
pkgdesc="Pretty git status for your shell prompt"
arch=('any')
url="https://github.com/TomasTomecek/pretty-git-prompt"
license=('MIT')
depends=('git')
makedepends=('rust' 'cmake')
source=("git+https://github.com/TomasTomecek/pretty-git-prompt.git")
sha256sums=(SKIP)

pkgver() {
	cd "$srcdir/$__pkgname"
	local cargo_version="$(sed -En '/version/s/^.*=.*"(.*)".*$/\1/p' Cargo.toml | head -n1)"
	local git_hash="$(git rev-parse --short HEAD)"
	printf '%s_%s' "$cargo_version" "$git_hash"
}

build() {
  cd "$srcdir/$__pkgname"
  make exec-stable-build
}

package() {
  cd "$srcdir/$__pkgname"
  install -Dm755 "target/release/pretty-git-prompt" "$pkgdir/usr/bin/pretty-git-prompt"
}