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>
|
# Contributor: Akshay S Dinesh <asdofindia at gmail dot com>
|
||||||
|
|
||||||
pkgname=caddy-git
|
pkgname=caddy-git
|
||||||
|
_pkgname=caddy
|
||||||
pkgver=2.7.0.beta.1
|
pkgver=2.7.0.beta.1
|
||||||
pkgrel=3
|
pkgrel=3
|
||||||
pkgdesc='Fast web server with automatic HTTPS'
|
pkgdesc='Fast web server with automatic HTTPS'
|
||||||
|
@ -39,17 +40,17 @@ sha512sums=(
|
||||||
)
|
)
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd "${pkgname}-git"
|
cd "${_pkgname}-git"
|
||||||
git describe --tags --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-\([^-]*\)-\([^-]*\)$/.\1.\2/;s/-//'
|
git describe --tags --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-\([^-]*\)-\([^-]*\)$/.\1.\2/;s/-//'
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
pushd "${pkgname}-git"
|
pushd "${_pkgname}-git"
|
||||||
_gitcommit=$(git rev-parse HEAD)
|
_gitcommit=$(git rev-parse HEAD)
|
||||||
popd
|
popd
|
||||||
|
|
||||||
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
|
||||||
|
@ -62,7 +63,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}"
|
||||||
|
@ -79,14 +80,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