summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c44875bb5a72d309d233737efc29c8706ae24ffa (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
# 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"
}