Skip to content

Commit

Permalink
app-shells/tgpt: make non-9999 version live too (for live-vendoring t…
Browse files Browse the repository at this point in the history
…o work)

Signed-off-by: Vadim Misbakh-Soloviov <[email protected]>
  • Loading branch information
msva committed Sep 23, 2024
1 parent a4bd7d5 commit 5dec9da
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
19 changes: 10 additions & 9 deletions app-shells/tgpt/tgpt-2.8.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@

EAPI=8

inherit go-module
inherit go-module git-r3

DESCRIPTION="AI Chatbots in terminal without needing API keys"
HOMEPAGE="https://github.com/aandrew-me/tgpt"

if ! [[ "${PV}" == *9999* ]]; then
SRC_URI="https://github.com/aandrew-me/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
else
inherit git-r3
EGIT_REPO_URI="https://github.com/aandrew-me/${PN}"
fi
EGIT_REPO_URI="https://github.com/aandrew-me/${PN}"

# SRC_URI="https://github.com/aandrew-me/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
# 👆 I'm too lazy for bundling deps in tarball and putting it in my devspace
# (or search a hosting for it).
# So I'll just use go-module_live_vendor, which requires live ebuild 🤷

[[ "${PV}" == *9999* ]] || EGIT_COMMIT="v${PV}"
[[ "${PV}" == *9999* ]] || KEYWORDS="~amd64 ~arm ~arm64 ~x86"
# XXX: kludge for eix
# TODO: other go-supported arches
Expand All @@ -24,8 +26,7 @@ LICENSE="GPL-3"
SLOT="0"

src_unpack() {
[[ "${PV}" == *9999* ]] && git-r3_src_unpack
default
git-r3_src_unpack
go-module_live_vendor
}

Expand Down
19 changes: 10 additions & 9 deletions app-shells/tgpt/tgpt-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@

EAPI=8

inherit go-module
inherit go-module git-r3

DESCRIPTION="AI Chatbots in terminal without needing API keys"
HOMEPAGE="https://github.com/aandrew-me/tgpt"

if ! [[ "${PV}" == *9999* ]]; then
SRC_URI="https://github.com/aandrew-me/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
else
inherit git-r3
EGIT_REPO_URI="https://github.com/aandrew-me/${PN}"
fi
EGIT_REPO_URI="https://github.com/aandrew-me/${PN}"

# SRC_URI="https://github.com/aandrew-me/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
# 👆 I'm too lazy for bundling deps in tarball and putting it in my devspace
# (or search a hosting for it).
# So I'll just use go-module_live_vendor, which requires live ebuild 🤷

[[ "${PV}" == *9999* ]] || EGIT_COMMIT="v${PV}"
[[ "${PV}" == *9999* ]] || KEYWORDS="~amd64 ~arm ~arm64 ~x86"
# XXX: kludge for eix
# TODO: other go-supported arches
Expand All @@ -24,8 +26,7 @@ LICENSE="GPL-3"
SLOT="0"

src_unpack() {
[[ "${PV}" == *9999* ]] && git-r3_src_unpack
default
git-r3_src_unpack
go-module_live_vendor
}

Expand Down

0 comments on commit 5dec9da

Please sign in to comment.