Files
fritz-tls-pkg/PKGBUILD

44 lines
1.3 KiB
Bash

# Maintainer: Markus Pesch <markus.pesch plus apps at cryptic.systems>
pkgname=fritz-tls
pkgver=0.24.0 # renovate: datasource=github-releases depName=tisba/fritz-tls
pkgrel=1
pkgdesc="Automate TLS certificate installation for AVM FRITZ!Box "
arch=('armv7h' 'aarch64' 'x86_64')
url="https://github.com/tisba/$pkgname"
license=('MIT')
makedepends=('go')
source=(
"$url/archive/refs/tags/v$pkgver.zip"
)
sha512sums=('4b571aab8e7cc858bdb197779c3552a4be206e3015628df30d3b081e35581b3fe6baa63f54f3f64c9cff2b0f40c4a01e3c9a98e9756cc85df8c22bffed375a82')
b2sums=('2a6306cbf38d762a1db00bbf6c017ef810c46e45e6d2f5bfa62a8a5c1f96257b8a4f23ba564b8b3889d349ef4e95d926275ca6a5587d014d9fe7eb98b5e93544')
build() {
cd "$pkgname-$pkgver"
# https://wiki.archlinux.org/title/Go_package_guidelines
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
go build -v \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
-o $pkgname \
.
}
package() {
# binary
install -D --mode 0755 --target-directory "$pkgdir/usr/bin" "$pkgname-$pkgver/$pkgname"
# license
install -D --mode 0755 --target-directory "$pkgdir/usr/share/licenses/$pkgname" "$pkgname-$pkgver/LICENSE"
}