summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD30
1 files changed, 30 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..c514b01
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Olivier Gayot <olivier.gayot@sigexec.com>
+
+pkgname=phpdoc-git
+pkgver=1
+pkgrel=1
+pkgdesc="Read the documentation of PHP functions in your terminal"
+arch=('any')
+url="https://git.sigexec.com/cgit.cgi/phpdoc.git/"
+license=('BSD')
+makedepends=('git')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("${pkgname}::git+https://git.sigexec.com/cgit.cgi/${pkgname%-git}.git")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${pkgname}"
+
+ ## Git, tags available
+ # printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+
+ # Git, no tags available
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+
+ install -D phpdoc.sh "${pkgdir}/usr/bin/phpdoc"
+}