diff options
author | Igor Dyatlov | 2022-08-01 15:16:36 +0300 |
---|---|---|
committer | Igor Dyatlov | 2022-08-01 15:16:36 +0300 |
commit | 874f8bc2aefcbdf96eff4246b618779fde549ba4 (patch) | |
tree | dfeb0cf66f1b4f578ee72b3dfaa08a6b01d7655d /PKGBUILD | |
download | aur-gpbkdf2.tar.gz |
Initial import
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-x | PKGBUILD | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..33c0769b0a64 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Igor Dyatlov <dyatlov.igor@protonmail.com> + +pkgname=gpbkdf2 +pkgver=1.0 +pkgrel=1 +pkgdesc="PBKDF2 key encoder for use in shell. Single, tiny binary. Written in Go" +arch=('x86_64' 'armv7h') +url="https://github.com/riotkit-org/gpbkdf2" +license=('LGPL3') +makedepends=('go') +provides=("${pkgname-bin}") +conflicts=("${pkgname-bin}") +source=($url/archive/v$pkgver.tar.gz) +b2sums=('0dad2387dcecb654939bafd93605e28dc3eecf91338ac6f5467b14accc2387fa14bf614e747165257d83b3251cab993bed97b15bdfe5b4589e9df300ebf7dfe4') + +build() { + cd "$pkgname-$pkgver" + + GOPATH="$srcdir" go mod init go.mod + GOPATH="$srcdir" go mod tidy + GOPATH="$srcdir" go mod download + GOPATH="$srcdir" go build \ + -trimpath \ + -buildmode=pie \ + -mod=readonly \ + -modcacherw \ + -ldflags "-s -w" \ + -o $pkgname . + +} + +package() { + cd "$pkgname-$pkgver" + + install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname" + install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md + + install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} |