summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen, Chih-Chia <pigfoot@gmail.com>2022-03-16 19:07:42 +0800
committerChen, Chih-Chia <pigfoot@gmail.com>2022-03-16 19:07:42 +0800
commit5f08c1ba3802ebdbb6958184273105a6096db49b (patch)
treebe7e1a51071ea10bb45c2ee064285865a03fa431 /net-vpn
parent[net-misc/BaiduPCS-Go] upgrade from upstream (diff)
downloadpigfoot-5f08c1ba3802ebdbb6958184273105a6096db49b.tar.gz
pigfoot-5f08c1ba3802ebdbb6958184273105a6096db49b.tar.bz2
pigfoot-5f08c1ba3802ebdbb6958184273105a6096db49b.zip
apply new go-module guideline
Signed-off-by: Chen, Chih-Chia <pigfoot@gmail.com>
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/cloudflared/Manifest2
l---------net-vpn/cloudflared/cloudflared-2022.3.1.ebuild (renamed from net-vpn/cloudflared/cloudflared-2022.1.0.ebuild)0
-rw-r--r--net-vpn/cloudflared/cloudflared-9999.ebuild26
3 files changed, 15 insertions, 13 deletions
diff --git a/net-vpn/cloudflared/Manifest b/net-vpn/cloudflared/Manifest
index c3d7e26..05d0228 100644
--- a/net-vpn/cloudflared/Manifest
+++ b/net-vpn/cloudflared/Manifest
@@ -1 +1 @@
-DIST cloudflared-2022.1.0.tar.gz 8446189 BLAKE2B 9b138a39af9db8608d755b4c1ebeffb9054ae3e892ac83bd80c54c250a6fa04e08147ad67258e3403888fd9909320686e0bda928a7ee91e2f8e90bbc8705ca85 SHA512 c0d450cefaa10ed34fee7462fbd1790db5437d0fe33604fcd2e62550e478eb30123f6ce0cc1ae91c2260449fb527ef91263da85fcd1cc87382372fd09352df63
+DIST cloudflared-2022.3.1.tar.gz 8698091 BLAKE2B 96f22be962e88851a8070290052e3ab01f47ed4a885c4d52ff74c3003cf0e9fe23664851f0e806219f75969fccc9ff427c44c380ff764666e17fe9264d09ed82 SHA512 14c75b060cc5fbac7e56416bfb38bb90df4041903e220853e8aa3fffcbccbad65d9bdba4cdd8c16f185159298651a1932cca978bc514c7c390f3c40ebcce334e
diff --git a/net-vpn/cloudflared/cloudflared-2022.1.0.ebuild b/net-vpn/cloudflared/cloudflared-2022.3.1.ebuild
index 91902b4..91902b4 120000
--- a/net-vpn/cloudflared/cloudflared-2022.1.0.ebuild
+++ b/net-vpn/cloudflared/cloudflared-2022.3.1.ebuild
diff --git a/net-vpn/cloudflared/cloudflared-9999.ebuild b/net-vpn/cloudflared/cloudflared-9999.ebuild
index 06bc94f..ec917c5 100644
--- a/net-vpn/cloudflared/cloudflared-9999.ebuild
+++ b/net-vpn/cloudflared/cloudflared-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 2019-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
EGO_PN="github.com/cloudflare/${PN}"
@@ -10,21 +10,24 @@ inherit go-module systemd
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://${EGO_PN}.git"
+ EGO_VER="devel"
src_unpack() {
git-r3_src_unpack
#go-module_live_vendor
}
else
- EGO_VER="${P}"
+ EGO_VER="${PV}"
SRC_URI="https://${EGO_PN}/archive/${EGO_VER}.tar.gz -> ${P}.tar.gz"
+ #inherit git-r3
+ #EGIT_REPO_URI="https://${EGO_PN}.git"
+ #EGIT_COMMIT="${EGO_VER}"
- EGO_SUM=(
- )
- go-module_set_globals
+ #src_unpack() {
+ # git-r3_src_unpack
+ # go-module_live_vendor
+ #}
- SRC_URI+="${EGO_SUM_SRC_URI}"
- S="${WORKDIR}/${EGO_VER}"
KEYWORDS="~amd64 ~x86 ~arm64 ~arm"
fi
@@ -40,19 +43,18 @@ src_compile() {
use pie && local build_pie="-buildmode=pie"
local build_flags="$( echo ${EGO_BUILD_FLAGS} ) $( echo ${build_pie} )"
+ local ld_flags="$( echo "-s -w -X 'main.Version=${EGO_VER}' -X 'main.BuildTime=$(date -R)'" )"
set -- env \
- GOCACHE="${T}/go-cache" \
CGO_ENABLED=0 \
- go build -o "bin/${PN}" -mod=vendor -v -work -x ${build_flags} \
- -ldflags "-X \"main.Version=${PV}\" -X \"main.BuildTime=$(date -u '+%Y-%m-%d-%H%M UTC')\"" \
- ${EGO_PN}/cmd/${PN}
+ go build -o "bin/${PN}" -mod=vendor -v -work -x "${build_flags}" -ldflags "${ld_flags}" \
+ ./cmd/${PN}
echo "$@"
"$@" || die
}
src_install() {
- dobin bin/${PN}
+ dobin bin/*
insinto /etc/cloudflared
doins "${FILESDIR}"/config.yml