archrelease: copy trunk to community-any
[ArchLinux/community.git] / lazygit / trunk / PKGBUILD
bloba656da5d0f9fdee481477eddb8deb86aac998dbc
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 # Contributor: Fredy GarcĂ­a <frealgagu at gmail dot com>
4 # Contributor: fuero <fuerob@gmail.com>
6 pkgname=lazygit
7 pkgver=0.38.2
8 pkgrel=1
9 pkgdesc='Simple terminal UI for git commands'
10 url='https://github.com/jesseduffield/lazygit'
11 arch=('x86_64')
12 license=('MIT')
13 depends=('git' 'glibc')
14 makedepends=('go')
15 source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
16 sha256sums=('2e727db952022c0518443d18c9b8a97a882970b93c5ab198ff33bb8ed2166c2f')
17 b2sums=('c3dcc40f0accecceda1b663503e522076ba98fb09268f65f95af0c79e51ac6f9706a0cd18ca8b13f3b3b855ca0ebd665a9fd083d1f5257c652b1e68b3677d00e')
19 build() {
20   cd ${pkgname}-${pkgver}
22   export CGO_CPPFLAGS="${CPPFLAGS}"
23   export CGO_CFLAGS="${CFLAGS}"
24   export CGO_CXXFLAGS="${CXXFLAGS}"
25   export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -x -v"
27   go build \
28     -ldflags "\
29       -linkmode external \
30       -extldflags '${LDFLAGS}' \
31       -X main.date=$(date --date=@${SOURCE_DATE_EPOCH} -u +%Y-%m-%dT%H:%M:%SZ) \
32       -X main.buildSource=binaryRelease \
33       -X main.version=${pkgver} \
34       -X main.commit=v${pkgver} \
35     "
38 package() {
39   cd ${pkgname}-${pkgver}
40   install -Dm 755 lazygit -t "${pkgdir}/usr/bin"
41   install -Dm 644 README*.md -t "${pkgdir}/usr/share/doc/${pkgname}"
42   cp -r docs/* -t "${pkgdir}/usr/share/doc/${pkgname}"
43   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
46 # vim: ts=2 sw=2 et: