summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..37992e0b2a62
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,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/{}" \;)
+}