apg-go/buildfiles/arch-linux/PKGBUILD

37 lines
999 B
Text
Raw Normal View History

2021-03-26 21:50:25 +01:00
# Maintainer: "Winni Neessen (https://pebcak.de)
pkgname=apg.go
2021-03-28 11:54:45 +02:00
pkgver=0.2.9
2021-03-26 21:50:25 +01:00
pkgrel=1
pkgdesc='Advanced Password Generator Clone'
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url='https://github.com/wneessen/apg.go'
license=('MIT')
makedepends=('go' 'git')
source=("https://github.com/wneessen/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz")
2021-03-28 11:54:45 +02:00
sha256sums=('7bfd13e9b1b3258be23a9b64742d07809b95d64e267885f5c77b349f50d10899')
2021-03-26 21:50:25 +01:00
prepare() {
cd "${pkgname}-${pkgver}"
mkdir -p build/
}
build() {
cd "${pkgname}-${pkgver}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
_LDFLAGS="-extldflags ${LDFLAGS}"
go build -o build -ldflags="${_LDFLAGS}" "."
}
package() {
# binary
install -D -m755 "${srcdir}/${pkgname}-${pkgver}/build/apg.go" \
"${pkgdir}/usr/bin/apg"
# license
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}