From 9fdbee8524e6b0b1f7967a71e75a2df0a8fef402 Mon Sep 17 00:00:00 2001 From: bgme Date: Sat, 20 May 2023 02:19:14 +0800 Subject: [PATCH] fix caddy-bgme --- repo/caddy-bgme/PKGBUILD | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/repo/caddy-bgme/PKGBUILD b/repo/caddy-bgme/PKGBUILD index 946b30a..dc2de50 100644 --- a/repo/caddy-bgme/PKGBUILD +++ b/repo/caddy-bgme/PKGBUILD @@ -8,6 +8,7 @@ # Contributor: Akshay S Dinesh pkgname=caddy-bgme +_pkgname=caddy pkgver=2.7.0.beta.1 _gitcommit=v2.7.0-beta.1 _distcommit=5ded5351fc9f6f35286e38c4552fc2d8b37f4df3 @@ -41,13 +42,13 @@ sha512sums=( ) pkgver() { - cd "${pkgname}-git" + cd "${_pkgname}-git" git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { - mkdir ${pkgname} - cd ${pkgname} + mkdir ${_pkgname} + cd ${_pkgname} cp ../main.go . go mod init caddy sed -i -e '$a replace github.com/caddyserver/forwardproxy => ../forwardproxy' go.mod @@ -60,7 +61,7 @@ prepare() { } build() { - cd ${pkgname} + cd ${_pkgname} export CGO_LDFLAGS="${LDFLAGS}" export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" @@ -77,14 +78,14 @@ build() { } check() { - cd "${pkgname}" + cd "${_pkgname}" ./caddy version ./caddy build-info ./caddy list-modules } package() { - cd "${pkgname}" + cd "${_pkgname}" install -Dm 755 caddy -t "${pkgdir}/usr/bin" install -Dm 644 "${srcdir}/caddy-dist/init/caddy.service" "${srcdir}/caddy-dist/init/caddy-api.service" -t "${pkgdir}/usr/lib/systemd/system"