diff --git a/app-shells/tgpt-bin/Manifest b/app-shells/tgpt-bin/Manifest new file mode 100644 index 00000000..a0086aa7 --- /dev/null +++ b/app-shells/tgpt-bin/Manifest @@ -0,0 +1,4 @@ +DIST tgpt-bin-2.8.1.amd64 9691396 BLAKE2B 241082fc37d9a7f6c3b5b1b682828813bfa72ba457ac70c0c9b1763355153e982c49b0b716c6406c6fe1ffd1d3f8ceae3c61048b83aa49acd5246cb1bdbf910e SHA512 ee1719e26dbc4ea10e7b222ac7569a7f6e86710defa83221f9f5ea1f6f61a0c8b9729eb864c9ce6ab29b75092e45032ac12348dbe05bfa1122f1423cce04d870 +DIST tgpt-bin-2.8.1.arm 8913048 BLAKE2B 2773817a2f87226ec55b967b912099e030b4b5c75c5c064cb18a6b617ac58be1778157469c67916a6fd4b416d145946234d494075e4e25131d47d6aeff0d98b1 SHA512 2cc7bf370cbe8adb99a392c1cd0ca4751150b904954992dcac457bd6be7988233540e7ccd10a64934197adc0abdf075b76c1ae4406c689c1ffe85432ed2b96f5 +DIST tgpt-bin-2.8.1.arm64 9044120 BLAKE2B 9da1ab49f2c945b6c95ab109873d044c6f7f34e08f5cd3255af17048b6fd7d59abdf349df9ba13421917e97ce4dafb56d0af5045ae8caa87377bc6acce21a680 SHA512 44145327daf78d63923fd11c70404f9a10b6a19e10dc0275632ddaefccdffa9fb6ad9506c80d9c08ef9b21a772bf2c52dc613ef0f3d71670d615b326b0e110e5 +DIST tgpt-bin-2.8.1.x86 8835224 BLAKE2B 7a3e59a94344f1f7a0ddf2334de8fba108ac3fff5e5c0579aa081f81462d9a44f2658f3b76d7578f996762c4c0484ba7e7951ba74b1fe7bde992ea5625ac1416 SHA512 db7d478da7bdaed1980b92529f449d67603f8c598f8daa447acedabdd7768ddf540614e8838805654beccee08abe0a65ea8f1ed69ab19542a9274670455b174f diff --git a/app-shells/tgpt-bin/metadata.xml b/app-shells/tgpt-bin/metadata.xml new file mode 100644 index 00000000..9aa44d5d --- /dev/null +++ b/app-shells/tgpt-bin/metadata.xml @@ -0,0 +1,12 @@ + + + + + mva@gentoo.org + Also, you can find me on IRC (Libera.Chat) as mva, or in Telegram as @mva_name + Vadim A. Misbakh-Soloviov + + + aandrew-me/tgpt + + diff --git a/app-shells/tgpt-bin/tgpt-bin-2.8.1.ebuild b/app-shells/tgpt-bin/tgpt-bin-2.8.1.ebuild new file mode 100644 index 00000000..0c86c126 --- /dev/null +++ b/app-shells/tgpt-bin/tgpt-bin-2.8.1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="AI Chatbots in terminal without needing API keys" +HOMEPAGE="https://github.com/aandrew-me/tgpt" + +MY_PN="${PN%%-bin}" + +SRC_BASE="https://github.com/aandrew-me/${MY_PN}/releases/download/v${PV}" +SRC_URI=" + amd64? ( ${SRC_BASE}/${MY_PN}-linux-amd64 -> ${P}.amd64 ) + arm64? ( ${SRC_BASE}/${MY_PN}-linux-arm64 -> ${P}.arm64 ) + arm? ( ${SRC_BASE}/${MY_PN}-linux-arm -> ${P}.arm ) + x86? ( ${SRC_BASE}/${MY_PN}-linux-i386 -> ${P}.x86 ) +" +S="${WORKDIR}" + +RDEPEND="!app-shells/tgpt" + +LICENSE="GPL-3" +SLOT="0" + +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +QA_PREBUILT="/usr/bin/${MY_PN}" + +src_install() { + newbin "${DISTDIR}/${A}" "${MY_PN}" +} diff --git a/app-shells/tgpt/Manifest b/app-shells/tgpt/Manifest new file mode 100644 index 00000000..cc7a8852 --- /dev/null +++ b/app-shells/tgpt/Manifest @@ -0,0 +1 @@ +DIST tgpt-2.8.1.tar.gz 44102 BLAKE2B 1ea8667bfe45b8acc78e4a05bb984221ea16c7e6a7f8b9a97381a1128a5025a4f3b7173b29b23ee1785633d04404032830e5f7644f005a3fccae48561622c3a8 SHA512 54762dc5cc31ca5c1bd0680c499b43450f2251a9821df7441dea62fe341157bd2e4119760bf243dc2291b454fbdda69261c8a0c69d718c01b7103016a62f28c3 diff --git a/app-shells/tgpt/metadata.xml b/app-shells/tgpt/metadata.xml new file mode 100644 index 00000000..6e47a7a1 --- /dev/null +++ b/app-shells/tgpt/metadata.xml @@ -0,0 +1,16 @@ + + + + + martin@mvath.de + Martin Väth + + + + martin@mvath.de + Martin Väth + + mailto:martin@mvath.de + vaeth/push + + diff --git a/app-shells/tgpt/tgpt-2.8.1.ebuild b/app-shells/tgpt/tgpt-2.8.1.ebuild new file mode 100644 index 00000000..5c0b2f5b --- /dev/null +++ b/app-shells/tgpt/tgpt-2.8.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module + +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 +[[ "${PV}" == *9999* ]] || KEYWORDS="~amd64 ~arm ~arm64 ~x86" +# XXX: kludge for eix +# TODO: other go-supported arches + +RDEPEND="!app-shells/tgpt-bin" + +LICENSE="GPL-3" +SLOT="0" + +src_unpack() { + [[ "${PV}" == *9999* ]] && git-r3_src_unpack + default + go-module_live_vendor +} + +src_prepare() { + default + # get rid of auto-updating functionality + sed -r \ + -e '/case\ \*isUpdate:/,/update\(\)/d' \ + -e '/fmt.Printf.*Update\ program\ /{s@.*@fmt.Printf\(""\)@}' \ + -i main.go || die + sed -r \ + -e '/^func\ update\(\)\ \{/,/^\}/d' \ + -e '/golang.org.*semver/d' \ + -i helper.go || die +} + +src_compile() { + ego build -trimpath -ldflags="-s -w" +} + +src_install() { + dobin "${PN}" +} diff --git a/app-shells/tgpt/tgpt-9999.ebuild b/app-shells/tgpt/tgpt-9999.ebuild new file mode 100644 index 00000000..5c0b2f5b --- /dev/null +++ b/app-shells/tgpt/tgpt-9999.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module + +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 +[[ "${PV}" == *9999* ]] || KEYWORDS="~amd64 ~arm ~arm64 ~x86" +# XXX: kludge for eix +# TODO: other go-supported arches + +RDEPEND="!app-shells/tgpt-bin" + +LICENSE="GPL-3" +SLOT="0" + +src_unpack() { + [[ "${PV}" == *9999* ]] && git-r3_src_unpack + default + go-module_live_vendor +} + +src_prepare() { + default + # get rid of auto-updating functionality + sed -r \ + -e '/case\ \*isUpdate:/,/update\(\)/d' \ + -e '/fmt.Printf.*Update\ program\ /{s@.*@fmt.Printf\(""\)@}' \ + -i main.go || die + sed -r \ + -e '/^func\ update\(\)\ \{/,/^\}/d' \ + -e '/golang.org.*semver/d' \ + -i helper.go || die +} + +src_compile() { + ego build -trimpath -ldflags="-s -w" +} + +src_install() { + dobin "${PN}" +}