fix caddy-bgme

This commit is contained in:
bgme 2023-05-20 02:19:14 +08:00
parent a056dd5e47
commit 9fdbee8524

View file

@ -8,6 +8,7 @@
# Contributor: Akshay S Dinesh <asdofindia at gmail dot com>
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"