summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Roman <davidroman96@gmail.com>2022-06-13 22:10:21 +0200
committerSam James <sam@gentoo.org>2022-06-30 20:23:45 +0000
commitde362e13b3af2976bce18b2031cf5b0d5c3c479d (patch)
tree8a4a75953077bdcfe4344fbce8f77f60671b4100 /net-p2p
parentmedia-video/vidcutter: Update manifest after drop old. (diff)
downloadgentoo-de362e13b3af2976bce18b2031cf5b0d5c3c479d.tar.gz
gentoo-de362e13b3af2976bce18b2031cf5b0d5c3c479d.tar.bz2
gentoo-de362e13b3af2976bce18b2031cf5b0d5c3c479d.zip
net-p2p/go-ipfs: add 0.13.0
Closes: https://bugs.gentoo.org/838238 Signed-off-by: David Roman <davidroman96@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/25884 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/go-ipfs/Manifest1
-rw-r--r--net-p2p/go-ipfs/go-ipfs-0.13.0.ebuild69
2 files changed, 70 insertions, 0 deletions
diff --git a/net-p2p/go-ipfs/Manifest b/net-p2p/go-ipfs/Manifest
index ef75daec6299..ef134fe88be1 100644
--- a/net-p2p/go-ipfs/Manifest
+++ b/net-p2p/go-ipfs/Manifest
@@ -1,2 +1,3 @@
DIST go-ipfs-0.12.2-deps.tar.xz 368885112 BLAKE2B a77bd1518f1c80369a2d7f4ed3c3a19e0294f662910b588c203bcfa630709ef82e42a622a9a6a8b4e218b1566a446eb80ae0fdbd98232bd2aba6c76ed8a828ec SHA512 1268e9727af7a7c856547bd8cce9a9fe5b58db1a6966c2aeb0923632dc96fee16c354261922d7132f791bcc3c2601728831e2e2ec29d9b7d2d8ea60903eafe50
DIST go-ipfs-0.12.2.tar.gz 2112884 BLAKE2B fe6883443eaa55764beffb5b8726678615f1246d41924ca6eddaae0e67d241f85f24d9b9264eaae9a211d8f74009bc30dda2a35734ea38645736e4fe21212bc9 SHA512 a268618d66e5e82c89362e0273c0741a56d13ee95e1f545a0b55fa5a7bd719b0e678c7c6cb7dc268892f992156a1fff2f537688de589d7c05b8b48e9c90b94f1
+DIST go-ipfs-0.13.0.tar.gz 13474994 BLAKE2B 068484941ae831f9484e5c8a95614be611dfc6e3e0cd6b3f55e17b3339cbe0f4d76d4eaef2b95a7973028e1910abc92fe54acecd72d949f9a3e4a7be66a6f89c SHA512 2513076c193ec0e2a8ecaef8b6d2de5152ef9f5d1e7140735eb405f325d8b31968d2166dbbea28660b03e3458e44d25fc9f970c753ad9d0f56a3970bca7d9365
diff --git a/net-p2p/go-ipfs/go-ipfs-0.13.0.ebuild b/net-p2p/go-ipfs/go-ipfs-0.13.0.ebuild
new file mode 100644
index 000000000000..3418b0d7a9b5
--- /dev/null
+++ b/net-p2p/go-ipfs/go-ipfs-0.13.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2022 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/"
+SRC_URI="https://github.com/ipfs/${PN}/releases/download/v${PV}/${PN}-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"
+
+RDEPEND="
+ acct-group/ipfs
+ acct-user/ipfs
+ sys-fs/fuse:0
+"
+
+DOCS=( CHANGELOG.md CONTRIBUTING.md README.md docs/ )
+
+S="${WORKDIR}"
+
+src_compile() {
+ default
+
+ local mygoargs
+ mygoargs=(
+ -tags release
+ )
+
+ go build "${mygoargs[@]}" -o ipfs ./cmd/ipfs || die
+ go build "${mygoargs[@]}" -o ipfswatch ./cmd/ipfswatch || die
+
+ IPFS_PATH="" ./ipfs commands completion bash > ipfs-completion.bash || die
+}
+
+src_test() {
+ go test ./cmd/ipfs/... ./cmd/ipfswatch/... || die
+}
+
+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 go-ipfs CPU usage is too high run the next workaround'
+ ewarn 'su -s /bin/sh -c "ipfs config profile apply lowpower"'
+ ewarn 'Be aware that this will make your node less visible to other peers'
+}