summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 37992e0b2a62388444dc13440a9d82b373a1a9fe (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
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: Andres Gongora <mail at andresgongora dot com>

pkgname="synth-shell-prompt-git"
pkgver=v1.0.r0.g139e2e3
pkgrel=1
_branch=master
pkgdesc="Fancy terminal prompt with colors and git support"
arch=('any')
url="https://github.com/andresgongora/synth-shell-prompt"
license=('GPL3')
depends=('sed')
makedepends=('git' 'sed' 'grep')
optdepends=("")
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git://github.com/andresgongora/${pkgname%-git}.git#branch=$_branch")
md5sums=('SKIP')


pkgver() {
	cd "$srcdir/${pkgname%-git}"
	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}


prepare() {
	cd "$srcdir/${pkgname%-git}"
	git submodule update --init --recursive
}


build() {
	cd "$srcdir/${pkgname%-git}"
	chmod +x ./setup.sh
	rm -rf build
	./setup.sh "build/${pkgname%-git}.sh" "build/config"	
}


package() {
	cd "$srcdir/${pkgname%-git}"
	install -D -m755 "./build/${pkgname%-git}.sh" "$pkgdir/usr/bin/${pkgname%-git}"
	install -d "$pkgdir/etc/synth-shell/"
	(cd "build/config" && find -type f -exec install -Dm 644 "{}" "$pkgdir/etc/synth-shell/{}" \;)
}