2 Commits
Author SHA1 Message Date
volker.raschekandCopilot f73f9eff37 fix(shellyctl): align PKGBUILD with Arch Go package guidelines
- Add prepare() with GOPATH and go mod download for reproducible builds
- Remove redundant CLI flags from go build, rely on GOFLAGS export
- Add GOPATH="${srcdir}" to build() as recommended by guidelines
- Add check() function running go test
- Fix license file permissions from 0755 to 0644

Co-authored-by: Copilot <copilot@github.com>
2026-08-09 17:32:09 +02:00
CSRBotandvolker.raschek 92d84c23a6 chore(deps): update dependency jcodybaker/shellyctl to v0.4.2 2026-08-09 17:23:56 +02:00
+24 -12
View File
@@ -1,7 +1,7 @@
# Maintainer: Markus Pesch <markus.pesch plus apps at cryptic.systems> # Maintainer: Markus Pesch <markus.pesch plus apps at cryptic.systems>
pkgname=shellyctl pkgname=shellyctl
pkgver=0.4.0 # renovate: datasource=github-releases depName=jcodybaker/shellyctl pkgver=0.4.2 # renovate: datasource=github-releases depName=jcodybaker/shellyctl
pkgrel=3 pkgrel=3
pkgdesc="shellyctl is an unofficial command line client for the Shelly Gen2/3 API. " pkgdesc="shellyctl is an unofficial command line client for the Shelly Gen2/3 API. "
arch=('armv7h' 'aarch64' 'x86_64') arch=('armv7h' 'aarch64' 'x86_64')
@@ -12,8 +12,21 @@ makedepends=('go')
source=( source=(
"$url/archive/refs/tags/v$pkgver.zip" "$url/archive/refs/tags/v$pkgver.zip"
) )
sha512sums=('fd997360d5a1804c642422833c602966acd196dc6668d596b5a1d6eefbd619a54154e5a355b705383900374d284e9eef0066c16d9c997c893bddcd4a30ebd647') sha512sums=('2c19275204461c0449f4e638cbde8722a0387b147eaa77e2091d160b8c1233d061170ff3600293d116d1740166dacac3cc3ce79549f4558ed8adc5eb45efe224')
b2sums=('394f831886dd0cf11c8b66feaa0f8a4511a322bdd44eb3cb06794d18b7f215694be00795e96225fe340d945421ec584d6af2afb9fdf1ad1b131d1bd01fc22a55') b2sums=('a525fc326b8435c936798214911417cca29251062aa968753d0f2f68eee188e66bf5dca16489cb7fd51818389e931e3d9cdf67376968255ab008a602982845a0')
prepare() {
cd "$pkgname-$pkgver"
export GONOSUMDB="${GONOSUMDB}"
export GOPATH="${srcdir}"
export GOPROXY="${GOPROXY}"
# INFO: Print all Go related environment variables for debugging purposes.
env | sort | grep -E '^C?GO'
go mod download -modcacherw
}
build() { build() {
cd "$pkgname-$pkgver" cd "$pkgname-$pkgver"
@@ -23,16 +36,15 @@ build() {
export CGO_CFLAGS="${CFLAGS}" export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}" export CGO_LDFLAGS="${LDFLAGS}"
export GOPATH="${srcdir}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build -v \ go build -o $pkgname .
-trimpath \ }
-buildmode=pie \
-mod=readonly \ check() {
-modcacherw \ cd "$pkgname-$pkgver"
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \ go test ./...
-o $pkgname \
.
} }
package() { package() {
@@ -40,5 +52,5 @@ package() {
install -D --mode 0755 --target-directory "$pkgdir/usr/bin" "$pkgname-$pkgver/$pkgname" install -D --mode 0755 --target-directory "$pkgdir/usr/bin" "$pkgname-$pkgver/$pkgname"
# license # license
install -D --mode 0755 --target-directory "$pkgdir/usr/share/licenses/$pkgname" "$pkgname-$pkgver/LICENSE.md" install -D --mode 0644 --target-directory "$pkgdir/usr/share/licenses/$pkgname" "$pkgname-$pkgver/LICENSE.md"
} }