1 |
commit: 21e61a7e5a617c5ef1434d967aa6a2b79da02889 |
2 |
Author: Eric Joldasov <bratishkaerik <AT> getgoogleoff <DOT> me> |
3 |
AuthorDate: Wed Aug 17 14:18:26 2022 +0000 |
4 |
Commit: Eric Joldasov <bratishkaerik <AT> getgoogleoff <DOT> me> |
5 |
CommitDate: Wed Aug 17 14:18:26 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=21e61a7e |
7 |
|
8 |
net-p2p/popura: install docs, set file capabilities |
9 |
|
10 |
Signed-off-by: Eric Joldasov <bratishkaerik <AT> getgoogleoff.me> |
11 |
|
12 |
net-p2p/popura/popura-0.4.3.ebuild | 26 +++++++++++++++----------- |
13 |
net-p2p/popura/popura-9999.ebuild | 18 +++++++++--------- |
14 |
2 files changed, 24 insertions(+), 20 deletions(-) |
15 |
|
16 |
diff --git a/net-p2p/popura/popura-0.4.3.ebuild b/net-p2p/popura/popura-0.4.3.ebuild |
17 |
index 28d1a02a3..719ec1948 100644 |
18 |
--- a/net-p2p/popura/popura-0.4.3.ebuild |
19 |
+++ b/net-p2p/popura/popura-0.4.3.ebuild |
20 |
@@ -3,31 +3,32 @@ |
21 |
|
22 |
EAPI=8 |
23 |
|
24 |
-inherit go-module linux-info systemd |
25 |
+inherit go-module linux-info systemd fcaps |
26 |
|
27 |
DESCRIPTION="Popura: alternative Yggdrasil network client" |
28 |
HOMEPAGE="https://github.com/popura-network/Popura/" |
29 |
-DOCS=( README.md ) |
30 |
- |
31 |
-KEYWORDS="~amd64" |
32 |
SRC_URI=" |
33 |
https://github.com/popura-network/Popura/archive/v${PV}+popura1.tar.gz -> ${P}+popura1.tar.gz |
34 |
https://codeberg.org/BratishkaErik/distfiles/media/branch/master/${P}+popura1-deps.tar.bz2 |
35 |
" |
36 |
|
37 |
-S="${WORKDIR}/Popura-${PV}-popura1" |
38 |
- |
39 |
LICENSE="LGPL-3 MPL-2.0 MIT Apache-2.0 BSD ZLIB" |
40 |
SLOT="0" |
41 |
+KEYWORDS="~amd64" |
42 |
|
43 |
DEPEND=" |
44 |
acct-user/yggdrasil |
45 |
acct-group/yggdrasil |
46 |
" |
47 |
|
48 |
-RDEPEND="!!net-p2p/yggdrasil-go" |
49 |
- |
50 |
BDEPEND=">=dev-lang/go-1.16.0" |
51 |
+RDEPEND="!net-p2p/yggdrasil-go" |
52 |
+ |
53 |
+S="${WORKDIR}/Popura-${PV}-popura1" |
54 |
+ |
55 |
+FILECAPS=( |
56 |
+ cap_net_admin,cap_net_bind_service "usr/bin/yggdrasil" |
57 |
+) |
58 |
|
59 |
pkg_setup() { |
60 |
linux-info_pkg_setup |
61 |
@@ -40,13 +41,16 @@ pkg_setup() { |
62 |
} |
63 |
|
64 |
src_compile() { |
65 |
- PKGNAME="${PN}" PKGVER="${PV}+popura1" \ |
66 |
- GOFLAGS="-trimpath -buildmode=pie -mod=readonly" \ |
67 |
- ./build -l "-linkmode external -extldflags \"${LDFLAGS}\"" |
68 |
+ local package="github.com/yggdrasil-network/yggdrasil-go/src/version" |
69 |
+ |
70 |
+ for CMD in yggdrasil yggdrasilctl ; do |
71 |
+ ego build -buildmode=pie -ldflags "-s -linkmode external -extldflags '${LDFLAGS}' -X ${package}.buildName=${PN} -X ${package}.buildVersion=v${PV}+popura1" -trimpath ./cmd/$CMD |
72 |
+ done |
73 |
} |
74 |
|
75 |
src_install() { |
76 |
dobin {yggdrasil,yggdrasilctl} |
77 |
+ dodoc README.md |
78 |
systemd_dounit "contrib/systemd/yggdrasil.service" |
79 |
systemd_dounit "contrib/systemd/yggdrasil-default-config.service" |
80 |
doinitd "contrib/openrc/yggdrasil" |
81 |
|
82 |
diff --git a/net-p2p/popura/popura-9999.ebuild b/net-p2p/popura/popura-9999.ebuild |
83 |
index 5b58d7b27..26e19a2b1 100644 |
84 |
--- a/net-p2p/popura/popura-9999.ebuild |
85 |
+++ b/net-p2p/popura/popura-9999.ebuild |
86 |
@@ -3,26 +3,22 @@ |
87 |
|
88 |
EAPI=8 |
89 |
|
90 |
-inherit go-module linux-info systemd git-r3 |
91 |
- |
92 |
-EGIT_REPO_URI="https://github.com/popura-network/Popura" |
93 |
+inherit go-module linux-info systemd git-r3 fcaps |
94 |
|
95 |
DESCRIPTION="Popura: alternative Yggdrasil network client" |
96 |
HOMEPAGE="https://github.com/popura-network/Popura" |
97 |
-DOCS=( README.md ) |
98 |
+EGIT_REPO_URI="https://github.com/popura-network/Popura" |
99 |
|
100 |
LICENSE="LGPL-3 MPL-2.0 MIT Apache-2.0 BSD ZLIB" |
101 |
SLOT="0" |
102 |
-KEYWORDS="" |
103 |
|
104 |
DEPEND=" |
105 |
acct-user/yggdrasil |
106 |
acct-group/yggdrasil |
107 |
" |
108 |
|
109 |
-RDEPEND="!!net-p2p/yggdrasil-go" |
110 |
- |
111 |
BDEPEND=">=dev-lang/go-1.16.0" |
112 |
+RDEPEND="!net-p2p/yggdrasil-go" |
113 |
|
114 |
pkg_setup() { |
115 |
linux-info_pkg_setup |
116 |
@@ -40,12 +36,16 @@ src_unpack() { |
117 |
} |
118 |
|
119 |
src_compile() { |
120 |
- GOFLAGS="-trimpath -buildmode=pie -mod=readonly" \ |
121 |
- ./build -l "-linkmode external -extldflags \"${LDFLAGS}\"" |
122 |
+ local package="github.com/yggdrasil-network/yggdrasil-go/src/version" |
123 |
+ |
124 |
+ for CMD in yggdrasil yggdrasilctl ; do |
125 |
+ ego build -buildmode=pie -ldflags "-s -linkmode external -extldflags '${LDFLAGS}' -X ${package}.buildName=${PN} -X ${package}.buildVersion=v${PV}+popura1" -trimpath ./cmd/$CMD |
126 |
+ done |
127 |
} |
128 |
|
129 |
src_install() { |
130 |
dobin {yggdrasil,yggdrasilctl} |
131 |
+ dodoc README.md |
132 |
systemd_dounit "contrib/systemd/yggdrasil.service" |
133 |
systemd_dounit "contrib/systemd/yggdrasil-default-config.service" |
134 |
doinitd "contrib/openrc/yggdrasil" |