fxi caddy-git
This commit is contained in:
parent
eaaeff6a4e
commit
22d770cda4
|
@ -8,6 +8,7 @@
|
|||
# Contributor: Akshay S Dinesh <asdofindia at gmail dot com>
|
||||
|
||||
pkgname=caddy-git
|
||||
_pkgname=caddy
|
||||
pkgver=2.7.0.beta.1
|
||||
pkgrel=3
|
||||
pkgdesc='Fast web server with automatic HTTPS'
|
||||
|
@ -39,17 +40,17 @@ sha512sums=(
|
|||
)
|
||||
|
||||
pkgver() {
|
||||
cd "${pkgname}-git"
|
||||
cd "${_pkgname}-git"
|
||||
git describe --tags --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-\([^-]*\)-\([^-]*\)$/.\1.\2/;s/-//'
|
||||
}
|
||||
|
||||
prepare() {
|
||||
pushd "${pkgname}-git"
|
||||
pushd "${_pkgname}-git"
|
||||
_gitcommit=$(git rev-parse HEAD)
|
||||
popd
|
||||
|
||||
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
|
||||
|
@ -62,7 +63,7 @@ prepare() {
|
|||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgname}
|
||||
cd ${_pkgname}
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
|
@ -79,14 +80,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"
|
||||
|
|
Loading…
Reference in a new issue