blob: e47bc802874d649a2e9ce5a8270f6dd52585e1ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd
DESCRIPTION="Pinset orchestration for IPFS"
HOMEPAGE="https://ipfscluster.io/"
SRC_URI="https://github.com/ipfs/ipfs-cluster/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://ipfs.infura.io/ipfs/QmUGftdXbN815P1GvurGRBa5fYFiGfTDAdBXToadzYAqw3/${P}-vendor.tar.xz"
LICENSE="Apache-2.0 MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
net-p2p/kubo
"
DOCS=( CHANGELOG.md CONTRIBUTING.md README.md )
src_compile() {
pushd cmd/ipfs-cluster-ctl
ego build
mv ipfs-cluster-ctl $OLDPWD
popd
pushd cmd/ipfs-cluster-follow
ego build
mv ipfs-cluster-follow $OLDPWD
popd
pushd cmd/ipfs-cluster-service
ego build
mv ipfs-cluster-service $OLDPWD
popd
}
src_test() {
go test ./cmd/ipfs-cluster-ctl/... ./cmd/ipfs-cluster-follow/... ./cmd/ipfs-cluster-service/... || die
}
src_install() {
dobin ipfs-cluster-ctl
dobin ipfs-cluster-follow
dobin ipfs-cluster-service
einstalldocs
systemd_dounit "${FILESDIR}/ipfs-cluster.service"
systemd_newunit "${FILESDIR}/ipfs-cluster.service" "ipfs-cluster@.service"
newinitd "${FILESDIR}/ipfs-cluster.init" ipfs-cluster
newconfd /dev/null ipfs-cluster
keepdir /var/log/ipfs-cluster
fowners -R ipfs:ipfs /var/log/ipfs-cluster
}
pkg_postinst() {
elog 'To be able to use the ipfs-cluster service you will need to setup the configuration'
elog '(eg: su -s /bin/sh -c "ipfs-cluster init" ipfs)'
}
|