1 |
commit: 63c183a960752150b42686ff09604ff253542988 |
2 |
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 5 18:26:34 2020 +0000 |
4 |
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 5 18:26:34 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63c183a9 |
7 |
|
8 |
sys-apps/rng-tools: add support for libressl |
9 |
|
10 |
Closes: https://bugs.gentoo.org/723866 |
11 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
12 |
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org> |
13 |
|
14 |
sys-apps/rng-tools/rng-tools-6.10-r1.ebuild | 85 +++++++++++++++++++++++++++++ |
15 |
1 file changed, 85 insertions(+) |
16 |
|
17 |
diff --git a/sys-apps/rng-tools/rng-tools-6.10-r1.ebuild b/sys-apps/rng-tools/rng-tools-6.10-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..d5f8c40bc12 |
20 |
--- /dev/null |
21 |
+++ b/sys-apps/rng-tools/rng-tools-6.10-r1.ebuild |
22 |
@@ -0,0 +1,85 @@ |
23 |
+# Copyright 1999-2020 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+inherit autotools systemd readme.gentoo-r1 toolchain-funcs |
29 |
+ |
30 |
+DESCRIPTION="Daemon to use hardware random number generators" |
31 |
+HOMEPAGE="https://github.com/nhorman/rng-tools" |
32 |
+SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
33 |
+ |
34 |
+LICENSE="GPL-2" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~x86" |
37 |
+IUSE="jitterentropy libressl nistbeacon pkcs11 selinux" |
38 |
+ |
39 |
+DEPEND=" |
40 |
+ !libressl? ( dev-libs/openssl:0= ) |
41 |
+ libressl? ( dev-libs/libressl:0= ) |
42 |
+ sys-fs/sysfsutils |
43 |
+ jitterentropy? ( |
44 |
+ app-crypt/jitterentropy:= |
45 |
+ ) |
46 |
+ nistbeacon? ( |
47 |
+ dev-libs/jansson |
48 |
+ dev-libs/libxml2:2= |
49 |
+ net-misc/curl[ssl] |
50 |
+ ) |
51 |
+ pkcs11? ( |
52 |
+ dev-libs/libp11:= |
53 |
+ ) |
54 |
+ elibc_musl? ( sys-libs/argp-standalone ) |
55 |
+" |
56 |
+RDEPEND="${DEPEND} |
57 |
+ selinux? ( sec-policy/selinux-rngd )" |
58 |
+BDEPEND=" |
59 |
+ virtual/pkgconfig |
60 |
+" |
61 |
+ |
62 |
+src_prepare() { |
63 |
+ echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die |
64 |
+ |
65 |
+ default |
66 |
+ |
67 |
+ mv README.md README || die |
68 |
+ |
69 |
+ eautoreconf |
70 |
+ |
71 |
+ sed -i '/^AR /d' Makefile.in || die |
72 |
+ tc-export AR |
73 |
+} |
74 |
+ |
75 |
+src_configure() { |
76 |
+ local myeconfargs=( |
77 |
+ $(use_enable jitterentropy) |
78 |
+ $(use_with nistbeacon) |
79 |
+ $(use_with pkcs11) |
80 |
+ --without-rtlsdr # no librtlsdr in the tree |
81 |
+ ) |
82 |
+ |
83 |
+ econf "${myeconfargs[@]}" |
84 |
+} |
85 |
+ |
86 |
+src_install() { |
87 |
+ default |
88 |
+ newinitd "${FILESDIR}"/rngd-initd-6.7-r1 rngd |
89 |
+ newconfd "${FILESDIR}"/rngd-confd-6.7 rngd |
90 |
+ systemd_dounit "${FILESDIR}"/rngd.service |
91 |
+ |
92 |
+ if use pkcs11; then |
93 |
+ local DISABLE_AUTOFORMATTING=1 |
94 |
+ local DOC_CONTENTS=" |
95 |
+The PKCS11 entropy source may require extra packages (e.g. 'dev-libs/opensc') |
96 |
+to support various smartcard readers. Make sure 'PKCS11_OPTIONS' in: |
97 |
+ '${EROOT}/etc/conf.d/rngd' |
98 |
+reflects the correct PKCS11 engine path to be used by rngd. |
99 |
+" |
100 |
+ readme.gentoo_create_doc |
101 |
+ fi |
102 |
+ |
103 |
+} |
104 |
+ |
105 |
+pkg_postinst() { |
106 |
+ use pkcs11 && readme.gentoo_print_elog |
107 |
+} |