fix caddy-bgme
This commit is contained in:
parent
a056dd5e47
commit
9fdbee8524
|
@ -8,6 +8,7 @@
|
||||||
# Contributor: Akshay S Dinesh <asdofindia at gmail dot com>
|
# Contributor: Akshay S Dinesh <asdofindia at gmail dot com>
|
||||||
|
|
||||||
pkgname=caddy-bgme
|
pkgname=caddy-bgme
|
||||||
|
_pkgname=caddy
|
||||||
pkgver=2.7.0.beta.1
|
pkgver=2.7.0.beta.1
|
||||||
_gitcommit=v2.7.0-beta.1
|
_gitcommit=v2.7.0-beta.1
|
||||||
_distcommit=5ded5351fc9f6f35286e38c4552fc2d8b37f4df3
|
_distcommit=5ded5351fc9f6f35286e38c4552fc2d8b37f4df3
|
||||||
|
@ -41,13 +42,13 @@ sha512sums=(
|
||||||
)
|
)
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd "${pkgname}-git"
|
cd "${_pkgname}-git"
|
||||||
git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
|
git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
mkdir ${pkgname}
|
mkdir ${_pkgname}
|
||||||
cd ${pkgname}
|
cd ${_pkgname}
|
||||||
cp ../main.go .
|
cp ../main.go .
|
||||||
go mod init caddy
|
go mod init caddy
|
||||||
sed -i -e '$a replace github.com/caddyserver/forwardproxy => ../forwardproxy' go.mod
|
sed -i -e '$a replace github.com/caddyserver/forwardproxy => ../forwardproxy' go.mod
|
||||||
|
@ -60,7 +61,7 @@ prepare() {
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd ${pkgname}
|
cd ${_pkgname}
|
||||||
export CGO_LDFLAGS="${LDFLAGS}"
|
export CGO_LDFLAGS="${LDFLAGS}"
|
||||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||||
export CGO_CFLAGS="${CFLAGS}"
|
export CGO_CFLAGS="${CFLAGS}"
|
||||||
|
@ -77,14 +78,14 @@ build() {
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
cd "${pkgname}"
|
cd "${_pkgname}"
|
||||||
./caddy version
|
./caddy version
|
||||||
./caddy build-info
|
./caddy build-info
|
||||||
./caddy list-modules
|
./caddy list-modules
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "${pkgname}"
|
cd "${_pkgname}"
|
||||||
install -Dm 755 caddy -t "${pkgdir}/usr/bin"
|
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"
|
install -Dm 644 "${srcdir}/caddy-dist/init/caddy.service" "${srcdir}/caddy-dist/init/caddy-api.service" -t "${pkgdir}/usr/lib/systemd/system"
|
||||||
|
|
Loading…
Reference in a new issue