diff options
author | Chen, Chih-Chia <pigfoot@gmail.com> | 2022-01-07 18:49:23 +0800 |
---|---|---|
committer | Chen, Chih-Chia <pigfoot@gmail.com> | 2022-01-07 18:58:52 +0800 |
commit | 85cd24672adb157e205f9f6942416af0682785e9 (patch) | |
tree | 98fc9f975e2b8df21f0cc5a0e7bbb25c0627ecaa | |
parent | [net-misc/ipinfo] upgrade from upstream (diff) | |
download | pigfoot-85cd24672adb157e205f9f6942416af0682785e9.tar.gz pigfoot-85cd24672adb157e205f9f6942416af0682785e9.tar.bz2 pigfoot-85cd24672adb157e205f9f6942416af0682785e9.zip |
[net-misc/gcsfuse] new ebuild
Signed-off-by: Chen, Chih-Chia <pigfoot@gmail.com>
-rw-r--r-- | net-misc/gcsfuse/Manifest | 1 | ||||
l--------- | net-misc/gcsfuse/gcsfuse-0.39.2.ebuild | 1 | ||||
-rw-r--r-- | net-misc/gcsfuse/gcsfuse-9999.ebuild | 54 |
3 files changed, 56 insertions, 0 deletions
diff --git a/net-misc/gcsfuse/Manifest b/net-misc/gcsfuse/Manifest new file mode 100644 index 0000000..0f232e1 --- /dev/null +++ b/net-misc/gcsfuse/Manifest @@ -0,0 +1 @@ +DIST gcsfuse-0.39.2.tar.gz 6043850 BLAKE2B 170051fe9efc2c2c1247e4ea9a6931f4588f563184e280768c4c3dc84f4fca422cfc0311e3d50d49b4bfa87d996b989c3babb3a34ea6daec340f443dc31631a9 SHA512 94af2b4f091dd9aae2c514b37ef3f3b177ec6422babb64b9bb6a62acd46b9da1794092c883830634c98c02b35173dd9c6aa346585c302d4b498e1b457924fa50 diff --git a/net-misc/gcsfuse/gcsfuse-0.39.2.ebuild b/net-misc/gcsfuse/gcsfuse-0.39.2.ebuild new file mode 120000 index 0000000..ff96987 --- /dev/null +++ b/net-misc/gcsfuse/gcsfuse-0.39.2.ebuild @@ -0,0 +1 @@ +gcsfuse-9999.ebuild
\ No newline at end of file diff --git a/net-misc/gcsfuse/gcsfuse-9999.ebuild b/net-misc/gcsfuse/gcsfuse-9999.ebuild new file mode 100644 index 0000000..2ff92df --- /dev/null +++ b/net-misc/gcsfuse/gcsfuse-9999.ebuild @@ -0,0 +1,54 @@ +# Copyright 2019-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +EGO_PN="github.com/GoogleCloudPlatform/${PN}" + +inherit go-module + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://${EGO_PN}.git" + + src_unpack() { + git-r3_src_unpack + #go-module_live_vendor + } +else + EGO_VER="${P}" + SRC_URI="https://${EGO_PN}/archive/${EGO_VER}.tar.gz -> ${P}.tar.gz" + + EGO_SUM=( + ) + go-module_set_globals + + SRC_URI+="${EGO_SUM_SRC_URI}" + S="${WORKDIR}/${EGO_VER}" +fi + +DESCRIPTION="A user-space file system for interacting with Google Cloud Storage" +LICENSE="Apache-2.0" +SLOT="0/${PVR}" +KEYWORDS="~amd64 ~x86 ~arm" +RESTRICT="mirror" +IUSE="+pie" + +src_compile() { + # -buildmode=pie forces external linking mode, even CGO_ENABLED=0 + # https://github.com/golang/go/issues/18968 + use pie && local build_pie="-buildmode=pie" + + local build_flags="$( echo ${EGO_BUILD_FLAGS} ) $( echo ${build_pie} )" + + set -- env \ + GOCACHE="${T}/go-cache" \ + CGO_ENABLED=0 \ + go build -o "bin/${PN}" -mod=vendor -v -work -x ${build_flags} + echo "$@" + "$@" || die +} + +src_install() { + dobin bin/${PN} +} |