Gentoo Archives: gentoo-commits

From: Ronny Gutbrod <gentoo@××××××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-misc/gemserv/
Date: Wed, 03 Jun 2020 09:04:42
Message-Id: 1591175054.cca357a5c1dbe69841bdbf0ea7c4a40103cf5899.tastytea@gentoo
1 commit: cca357a5c1dbe69841bdbf0ea7c4a40103cf5899
2 Author: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de>
3 AuthorDate: Wed Jun 3 09:02:30 2020 +0000
4 Commit: Ronny Gutbrod <gentoo <AT> tastytea <DOT> de>
5 CommitDate: Wed Jun 3 09:04:14 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cca357a5
7
8 net-misc/gemserv: Version bump 0.4.1_pre20200529.
9
10 Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de>
11
12 net-misc/gemserv/gemserv-0.4.1_pre20200529.ebuild | 141 ++++++++++++++++++++++
13 1 file changed, 141 insertions(+)
14
15 diff --git a/net-misc/gemserv/gemserv-0.4.1_pre20200529.ebuild b/net-misc/gemserv/gemserv-0.4.1_pre20200529.ebuild
16 new file mode 100644
17 index 0000000..2a544c8
18 --- /dev/null
19 +++ b/net-misc/gemserv/gemserv-0.4.1_pre20200529.ebuild
20 @@ -0,0 +1,141 @@
21 +# Copyright 2020 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +
26 +CRATES="
27 + arc-swap-0.4.6
28 + atty-0.2.14
29 + autocfg-1.0.0
30 + bitflags-1.2.1
31 + bytes-0.5.4
32 + cc-1.0.54
33 + cfg-if-0.1.10
34 + chrono-0.4.11
35 + colored-1.9.3
36 + foreign-types-0.3.2
37 + foreign-types-shared-0.1.1
38 + fuchsia-zircon-0.3.3
39 + fuchsia-zircon-sys-0.3.3
40 + futures-core-0.3.5
41 + futures-macro-0.3.5
42 + futures-task-0.3.5
43 + futures-util-0.3.5
44 + hermit-abi-0.1.13
45 + idna-0.2.0
46 + iovec-0.1.4
47 + kernel32-sys-0.2.2
48 + lazy_static-1.4.0
49 + libc-0.2.71
50 + log-0.4.8
51 + matches-0.1.8
52 + memchr-2.3.3
53 + mime-0.3.16
54 + mime_guess-2.0.3
55 + mio-0.6.22
56 + mio-named-pipes-0.1.6
57 + mio-uds-0.6.8
58 + miow-0.2.1
59 + miow-0.3.4
60 + net2-0.2.34
61 + num-integer-0.1.42
62 + num-traits-0.2.11
63 + num_cpus-1.13.0
64 + once_cell-1.4.0
65 + openssl-0.10.29
66 + openssl-sys-0.9.57
67 + percent-encoding-2.1.0
68 + pin-project-0.4.17
69 + pin-project-internal-0.4.17
70 + pin-project-lite-0.1.5
71 + pin-utils-0.1.0
72 + pkg-config-0.3.17
73 + proc-macro-hack-0.5.16
74 + proc-macro-nested-0.1.4
75 + proc-macro2-1.0.17
76 + quote-1.0.6
77 + redox_syscall-0.1.56
78 + serde-1.0.110
79 + serde_derive-1.0.110
80 + signal-hook-registry-1.2.0
81 + simple_logger-1.6.0
82 + slab-0.4.2
83 + smallvec-1.4.0
84 + socket2-0.3.12
85 + syn-1.0.27
86 + time-0.1.43
87 + tokio-0.2.21
88 + tokio-openssl-0.4.0
89 + toml-0.5.6
90 + unicase-2.6.0
91 + unicode-bidi-0.3.4
92 + unicode-normalization-0.1.12
93 + unicode-xid-0.2.0
94 + url-2.1.1
95 + vcpkg-0.2.8
96 + version_check-0.9.2
97 + winapi-0.2.8
98 + winapi-0.3.8
99 + winapi-build-0.1.1
100 + winapi-i686-pc-windows-gnu-0.4.0
101 + winapi-x86_64-pc-windows-gnu-0.4.0
102 + ws2_32-sys-0.2.1
103 +"
104 +
105 +inherit cargo git-r3 systemd
106 +
107 +EGIT_REPO_URI="https://git.sr.ht/~int80h/gemserv"
108 +EGIT_COMMIT="cfcaf3f7c7ec6db48782932fd6ec025d12b79a40"
109 +
110 +DESCRIPTION="A gemini Server written in rust"
111 +HOMEPAGE="
112 + gemini://80h.dev/projects/gemserv/
113 + https://git.sr.ht/~int80h/gemserv
114 +"
115 +SRC_URI="$(cargo_crate_uris ${CRATES})"
116 +
117 +LICENSE="Apache-2.0 BSD MIT MPL-2.0"
118 +SLOT="0"
119 +KEYWORDS="~amd64"
120 +
121 +RDEPEND="
122 + >=dev-libs/openssl-1.1.0g
123 + acct-user/gemini
124 +"
125 +DEPEND="${RDEPEND}"
126 +
127 +src_prepare() {
128 + # Fix paths in systemd unit.
129 + sed -i "s@/path/to/bin /path/to/config@${EPREFIX}/usr/bin/gemserv ${EPREFIX}/etc/gemserv/config.toml@" \
130 + init-scripts/gemserv.service || die
131 +
132 + # Fix paths in config.
133 + sed -Ei 's@/path/to/(key|cert)@/etc/gemserv/\1.pem@' config.toml || die
134 + sed -Ei 's@/path/to/serv@/var/gemini@' config.toml || die
135 +
136 + default
137 +}
138 +
139 +src_unpack() {
140 + git-r3_src_unpack
141 + cargo_src_unpack
142 +}
143 +
144 +src_install() {
145 + cargo_src_install
146 +
147 + einstalldocs
148 +
149 + diropts --group=gemini
150 + insinto etc/gemserv
151 + newins config.toml config.toml.example
152 +
153 + systemd_dounit init-scripts/gemserv.service
154 + newinitd "init-scripts/${PN}.openrc" "${PN}"
155 +}
156 +
157 +pkg_postinst() {
158 + einfo "You can generate yourself a TLS certificate and key with:"
159 + einfo "openssl req -x509 -newkey rsa:4096 -sha256 -days 3660 -nodes \\"
160 + einfo " -keyout /etc/gemserv/key.pem -out /etc/gemserv/cert.pem"
161 +}