summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a80bc7583b8d9a6c875ddfb391f5057db9d14802 (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
33
# Maintainer: Mikhail Swift <mikhail.swift@gmail.com>
pkgname=lazydocker-git
_pkgname=lazydocker
pkgver=0.8.r6.g10617da
pkgrel=1
pkgdesc='A simple terminal UI for docker and docker-compose, written in Go with the gocui library.'
arch=('1686' 'x86_64' 'armv7h' 'armv6h' 'aarch64')
url='https://github.com/jesseduffield/lazydocker'
license=('MIT')
options=('!strip' '!emptydirs')
makedepends=('go' 'git')
conflicts=('lazydocker')
provides=('lazydocker')
source=("${_pkgname}::git+https://github.com/jesseduffield/lazydocker.git#branch=master")
sha1sums=('SKIP')

pkgver() {
    cd "${srcdir}/${_pkgname}"
    git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "${_pkgname}"
    export CGO_CPPFLAGS="${CPPFLAGS}"
    export CGO_CFLAGS="${CFLAGS}"
    export CGO_CXXFLAGS="${CXXFLAGS}"
    export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
    go build -o ${_pkgname} -ldflags "-extldflags ${LDFLAGS} -s -w -X main.version=${pkgver}" main.go
}

package() {
    install -Dm755 "${_pkgname}/${_pkgname}" ${pkgdir}/usr/bin/${_pkgname}
}