summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD32
2 files changed, 47 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..44936136d727
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = duration-git
+ pkgdesc = Shows how long a process is already running
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://github.com/mstruebing/duration
+ arch = any
+ license = MIT
+ makedepends = git
+ makedepends = go
+ provides = duration
+ source = git+https://github.com/mstruebing/duration
+ md5sums = SKIP
+
+pkgname = duration-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c44875bb5a72
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Max Struebing <mxstrbng@gmail.com>
+
+pkgname=duration-git
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Shows how long a process is already running"
+arch=(any)
+url="https://github.com/mstruebing/duration"
+license=('MIT')
+depends=()
+makedepends=('git' 'go')
+source=("git+$url")
+md5sums=('SKIP')
+provides=('duration')
+
+pkgver() {
+ cd "$srcdir/duration" || exit
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/^v//g'
+}
+
+build() {
+ cd "$srcdir/duration"
+ go get -u github.com/mstruebing/duration
+ make build
+}
+
+package() {
+ cd "$srcdir/duration/bin" || exit
+ install -Dm755 duration "$pkgdir/usr/bin/duration"
+ cd "$srcdir/duration" || exit
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/duration/LICENSE"
+}