makedeb
Simple terminal UI for git commands
Viewing /PKGBUILD
.
Click here to go back to the Git tree for lazygit-git.
# Maintainer: hiddeninthesand <hiddeninthesand at pm dot me>
# AUR Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# AUR Maintainer: Caleb Maclennan <caleb@alerque.com>
# AUR Contributor: Fredy GarcĂa <frealgagu at gmail dot com>
# AUR Contributor: fuero <fuerob@gmail.com>
pkgname="lazygit-git"
_gitname="lazygit"
pkgver=1.2960.f4011643
pkgrel=1
pkgdesc='Simple terminal UI for git commands'
url='https://github.com/jesseduffield/lazygit'
arch=('x86_64')
license=('MIT')
depends=('git' 'libc6-dev')
makedepends=('golang-go')
source=("git+${url}.git")
sha256sums=('SKIP')
conflicts=("${_gitname}" "${_gitname}-bin")
pkgver() {
cd "${_gitname}"
printf "1.%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | sed 's|^v||'
}
build() {
cd ${_gitname}
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -x -v"
go build \
-ldflags "\
-linkmode external \
-extldflags '${LDFLAGS}' \
-X main.date=$(date --date=@${SOURCE_DATE_EPOCH} -u +%Y-%m-%dT%H:%M:%SZ) \
-X main.buildSource=binaryRelease \
-X main.version=${pkgver} \
-X main.commit=v${pkgver} \
"
}
package() {
cd ${_gitname}
install -Dm 755 lazygit -t "${pkgdir}/usr/bin"
install -Dm 644 README*.md -t "${pkgdir}/usr/share/doc/${_gitname}"
cp -r docs/* -t "${pkgdir}/usr/share/doc/${_gitname}"
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${_gitname}"
}
# vim: ts=2 sw=2 et: