summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Kleinschmidt2018-02-12 12:35:39 -0500
committerDave Kleinschmidt2018-02-12 12:53:19 -0500
commit5528f490f971b20f648c14b921d7141fbdee0beb (patch)
treef07f1f8abe08f747d298b410bdfa109a8a35b61d
downloadaur-5528f490f971b20f648c14b921d7141fbdee0beb.tar.gz
PKGBUILD and .SRCINFO for spaceship-prompt-git
fix pkgnames use LATEST as version
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD43
-rw-r--r--spaceship-prompt-git.install5
3 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..333ce5255e51
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = spaceship-prompt-git
+ pkgdesc = A Zsh prompt for Astronauts
+ pkgver = LATEST
+ pkgrel = 1
+ url = https://denysdovhan.com/spaceship-prompt/
+ install = spaceship-prompt-git.install
+ arch = any
+ license = MIT
+ depends = zsh
+ conflicts = spaceship-zsh-theme-git
+ conflicts = spaceship-prompt
+ source = git+https://github.com/denysdovhan/spaceship-prompt.git
+ source = spaceship-prompt-git.install
+ md5sums = SKIP
+ md5sums = bd24fc2d741cb12ba49b36742d879f64
+
+pkgname = spaceship-prompt-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..81e0e3a6637f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Dave Kleinschmidt <dave.f.kleinschmidt at gmail dot com>
+_pkgname=spaceship-prompt
+pkgname=$_pkgname-git
+pkgver=LATEST
+pkgrel=1
+epoch=
+pkgdesc="A Zsh prompt for Astronauts"
+arch=('any')
+url="https://denysdovhan.com/spaceship-prompt/"
+license=('MIT')
+depends=('zsh')
+conflicts=('spaceship-zsh-theme-git'
+ 'spaceship-prompt')
+install="${pkgname}.install"
+source=("git+https://github.com/denysdovhan/${_pkgname}.git"
+ "$pkgname.install")
+md5sums=('SKIP'
+ 'bd24fc2d741cb12ba49b36742d879f64')
+
+pkgver() {
+ cd "$_pkgname"
+ (
+ set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+package() {
+ cd "${_pkgname}"
+
+ install -D -m644 LICENSE.md "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
+ install -D -m644 README.md "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
+ find docs -type f -exec install -D -m644 {} "${pkgdir}/usr/share/doc/${_pkgname}/{}" \;
+
+ find lib -type f -exec install -D -m644 {} "${pkgdir}/usr/lib/${_pkgname}/{}" \;
+ find scripts -type f -exec install -D -m644 {} "${pkgdir}/usr/lib/${_pkgname}/{}" \;
+ find sections -type f -exec install -D -m644 {} "${pkgdir}/usr/lib/${_pkgname}/{}" \;
+ install -D -m644 spaceship.zsh "${pkgdir}/usr/lib/${_pkgname}/spaceship.zsh"
+
+ install -d "${pkgdir}/usr/local/share/zsh/site-functions/"
+ ln -s "/usr/lib/${_pkgname}/spaceship.zsh" "${pkgdir}/usr/local/share/zsh/site-functions/prompt_spaceship_setup"
+}
diff --git a/spaceship-prompt-git.install b/spaceship-prompt-git.install
new file mode 100644
index 000000000000..7ac2ddd36cd7
--- /dev/null
+++ b/spaceship-prompt-git.install
@@ -0,0 +1,5 @@
+post_install() {
+ echo "Add these lines to your .zshrc to enable spaceship:
+ autoload -U promptinit; promptinit
+ prompt spaceship"
+}