summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Roman <davidroman96@gmail.com>2023-05-09 16:39:54 +0200
committerJoonas Niilola <juippis@gentoo.org>2023-05-20 15:50:06 +0300
commit3ed1d794fe758e1d1fe1e8486adbef392c8c1358 (patch)
treec2653d10bf334225968eb3028cccda7d650685a5 /net-p2p
parentdev-ruby/asciidoctor: Keyword 2.0.20 riscv, #906819 (diff)
downloadgentoo-3ed1d794fe758e1d1fe1e8486adbef392c8c1358.tar.gz
gentoo-3ed1d794fe758e1d1fe1e8486adbef392c8c1358.tar.bz2
gentoo-3ed1d794fe758e1d1fe1e8486adbef392c8c1358.zip
net-p2p/kubo: add 0.20.0
Closes: https://bugs.gentoo.org/892986 Signed-off-by: David Roman <davidroman96@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/30955 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/kubo/Manifest1
-rw-r--r--net-p2p/kubo/kubo-0.20.0.ebuild69
2 files changed, 70 insertions, 0 deletions
diff --git a/net-p2p/kubo/Manifest b/net-p2p/kubo/Manifest
index 02b99cde4fa6..dc85126e1fc2 100644
--- a/net-p2p/kubo/Manifest
+++ b/net-p2p/kubo/Manifest
@@ -1,2 +1,3 @@
DIST kubo-0.15.0.tar.gz 13318096 BLAKE2B 92a97eea130d24065c5d8a60ee7eb9b2bd3afba94596c0b538b04970277df11bf11f1cfc8399b303cea58cd249a86f956174d6544e6b6a94b34722ecdd20671a SHA512 26c1945c4ce641953e72a8f08802aa5acdd6c39fee3c1306bec0613a36b3d1ad79e23f7531427631848a6952ed950d27cd6a09f18352043bc145669b491843e6
DIST kubo-0.18.1.tar.gz 13582874 BLAKE2B bc5ae67a476e796d774b47d29a5338cf2d1f1029197177bc69a36be255502bf12b45a8c6f5c4009ea100c749d73addc2195ce308e52883c8a36fecd08df26850 SHA512 eb6245abfef2079980f67f6a2dffad36346d06587df754d8477eeeda96464d9fa1428bb5d9ae628cca3ffa6a52c66c20e980c5a20ade389c1089aba947df6365
+DIST kubo-0.20.0.tar.gz 15476743 BLAKE2B 8b7e58f18c1342981f575545c6e11a167df240bb0d6d0712bcb3fd6a0aa7f84a6737af06d2ae89fe998ee715be5c0e0c39f4ce83685ae238008c46f48c6cf7a1 SHA512 5231efce18dbb6491fa6665db8d1522efcb2d7278203259714b77d655060765922e9076addb1de3e10950c2c7aa3c9e24e2114879c3e4ce1fceef69755b12eaf
diff --git a/net-p2p/kubo/kubo-0.20.0.ebuild b/net-p2p/kubo/kubo-0.20.0.ebuild
new file mode 100644
index 000000000000..6cd5d94e6814
--- /dev/null
+++ b/net-p2p/kubo/kubo-0.20.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 go-module systemd
+
+DESCRIPTION="Main implementation of IPFS"
+HOMEPAGE="https://ipfs.io/ https://github.com/ipfs/kubo/"
+SRC_URI="https://github.com/ipfs/${PN}/releases/download/v${PV}/kubo-source.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ acct-group/ipfs
+ acct-user/ipfs
+ sys-fs/fuse:0
+"
+RDEPEND="${DEPEND}"
+BDEPEND="dev-lang/go"
+
+DOCS=( CHANGELOG.md CONTRIBUTING.md README.md docs/ )
+
+S="${WORKDIR}"
+
+src_compile() {
+ local mygoargs
+ mygoargs=(
+ -tags release
+ )
+
+ ego build "${mygoargs[@]}" -o ipfs ./cmd/ipfs
+ ego build "${mygoargs[@]}" -o ipfswatch ./cmd/ipfswatch
+
+ IPFS_PATH="" ./ipfs commands completion bash > ipfs-completion.bash || die
+}
+
+src_test() {
+ ego test ./cmd/ipfs/... ./cmd/ipfswatch/...
+}
+
+src_install() {
+ dobin ipfs
+ dobin ipfswatch
+ newbashcomp ipfs-completion.bash ipfs
+ einstalldocs
+
+ systemd_dounit "${FILESDIR}/ipfs.service"
+ systemd_newunit "${FILESDIR}/ipfs-at.service" "ipfs@.service"
+
+ newinitd "${FILESDIR}/ipfs.init" ipfs
+ newconfd "${FILESDIR}/ipfs.confd" ipfs
+
+ keepdir /var/log/ipfs
+ fowners -R ipfs:ipfs /var/log/ipfs
+}
+
+pkg_postinst() {
+ elog 'To be able to use the ipfs service you will need to create the ipfs repository'
+ elog '(eg: su -s /bin/sh -c "ipfs init -e" ipfs)'
+ elog 'or change IPFS_PATH of /etc/conf.d/ipfs with another with proper permissions.'
+
+ # See https://bugs.gentoo.org/838238
+ ewarn 'In case kubo CPU usage is too high run the next workaround'
+ ewarn 'su -s /bin/sh -c "ipfs config profile apply lowpower" ipfs'
+ ewarn 'Be aware that this will make your node less visible to other peers'
+}