Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/testssl/
Date: Sun, 04 Oct 2015 16:23:11
Message-Id: 1443975777.e522a524f8387283102f8f46b86edb69a37744ca.kensington@gentoo
1 commit: e522a524f8387283102f8f46b86edb69a37744ca
2 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 4 16:21:45 2015 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 4 16:22:57 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e522a524
7
8 net-analyzer/testssl: new package
9
10 Gentoo-bug: 561888
11
12 Package-Manager: portage-2.2.20.1
13
14 net-analyzer/testssl/Manifest | 1 +
15 net-analyzer/testssl/metadata.xml | 10 ++++++
16 net-analyzer/testssl/testssl-2.6.ebuild | 58 +++++++++++++++++++++++++++++++++
17 3 files changed, 69 insertions(+)
18
19 diff --git a/net-analyzer/testssl/Manifest b/net-analyzer/testssl/Manifest
20 new file mode 100644
21 index 0000000..23bcd10
22 --- /dev/null
23 +++ b/net-analyzer/testssl/Manifest
24 @@ -0,0 +1 @@
25 +DIST testssl-2.6.tar.gz 12296414 SHA256 286b3285f096a5d249de1507eee88b14848514696bc5bbc4faceffa46b563ebd SHA512 c09ef82a8062cac484df956ea68d459dcedaa9e96301f5d5108323eb482dd4ef226e6a41446eb230cdb459404357e3fb3ec02a386697e335a58a2b14db327780 WHIRLPOOL 290c4202358ac647ca7ed2ce0d17cf5ace6c533f7c79cee066d599193f9e77cfdd1e440e7670c5216fec9b1f882986dcf26f5cad638384b8b7a278fbcbe5eace
26
27 diff --git a/net-analyzer/testssl/metadata.xml b/net-analyzer/testssl/metadata.xml
28 new file mode 100644
29 index 0000000..b500834
30 --- /dev/null
31 +++ b/net-analyzer/testssl/metadata.xml
32 @@ -0,0 +1,10 @@
33 +<?xml version="1.0" encoding="UTF-8"?>
34 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
35 +<pkgmetadata>
36 + <maintainer>
37 + <email>kensington@g.o</email>
38 + </maintainer>
39 + <use>
40 + <flag name="bundled-openssl">Install precompiled versions of OpenSSL for greater testing coverage</flag>
41 + </use>
42 +</pkgmetadata>
43
44 diff --git a/net-analyzer/testssl/testssl-2.6.ebuild b/net-analyzer/testssl/testssl-2.6.ebuild
45 new file mode 100644
46 index 0000000..320ab9e
47 --- /dev/null
48 +++ b/net-analyzer/testssl/testssl-2.6.ebuild
49 @@ -0,0 +1,58 @@
50 +# Copyright 1999-2015 Gentoo Foundation
51 +# Distributed under the terms of the GNU General Public License v2
52 +# $Id$
53 +
54 +EAPI=5
55 +
56 +MY_PN="${PN}.sh"
57 +
58 +DESCRIPTION="Tool to check TLS/SSL cipher support"
59 +HOMEPAGE="https://testssl.sh/"
60 +SRC_URI="https://github.com/drwetter/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
61 +
62 +LICENSE="GPL-2 bundled-openssl? ( openssl )"
63 +SLOT="0"
64 +KEYWORDS="~amd64"
65 +IUSE="bundled-openssl"
66 +
67 +RDEPEND="
68 + dev-libs/openssl:0
69 + sys-apps/util-linux
70 +"
71 +
72 +S=${WORKDIR}/${MY_PN}-${PV}
73 +
74 +QA_PREBUILT="opt/${PN}/*"
75 +
76 +pkg_setup() {
77 + use amd64 && BUNDLED_OPENSSL="openssl.Linux.x86_64"
78 +}
79 +
80 +src_prepare() {
81 + sed -i -e "s|MAPPING_FILE_RFC=\"\"|MAPPING_FILE_RFC=\"/usr/share/${PN}/mapping-rfc.txt\"|" ${PN}.sh || die
82 +}
83 +
84 +src_install() {
85 + dodoc CHANGELOG.stable-releases.txt CREDITS.md Readme.md
86 + dodoc openssl-rfc.mappping.html
87 +
88 + dobin ${PN}.sh
89 +
90 + insinto /usr/share/${PN}
91 + doins mapping-rfc.txt
92 +
93 + if use bundled-openssl; then
94 + exeinto /opt/${PN}
95 + use amd64 && doexe bin/${BUNDLED_OPENSSL}
96 + fi
97 +}
98 +
99 +pkg_postinst() {
100 + if use bundled-openssl; then
101 + einfo "A precompiled version of OpenSSL has been installed into /opt/${PN},"
102 + einfo "configured to enable a wider range of features to allow better testing."
103 + einfo ""
104 + einfo "To use it, call ${PN} appropriately:"
105 + einfo "${MY_PN} --openssl /opt/${PN}/${BUNDLED_OPENSSL} example.com"
106 + fi
107 +}