net-analyzer/testssl: new package
authorMichael Palimaka <kensington@gentoo.org>
Sun, 4 Oct 2015 16:21:45 +0000 (03:21 +1100)
committerMichael Palimaka <kensington@gentoo.org>
Sun, 4 Oct 2015 16:22:57 +0000 (03:22 +1100)
Gentoo-bug: 561888

Package-Manager: portage-2.2.20.1

net-analyzer/testssl/Manifest [new file with mode: 0644]
net-analyzer/testssl/metadata.xml [new file with mode: 0644]
net-analyzer/testssl/testssl-2.6.ebuild [new file with mode: 0644]

diff --git a/net-analyzer/testssl/Manifest b/net-analyzer/testssl/Manifest
new file mode 100644 (file)
index 0000000..23bcd10
--- /dev/null
@@ -0,0 +1 @@
+DIST testssl-2.6.tar.gz 12296414 SHA256 286b3285f096a5d249de1507eee88b14848514696bc5bbc4faceffa46b563ebd SHA512 c09ef82a8062cac484df956ea68d459dcedaa9e96301f5d5108323eb482dd4ef226e6a41446eb230cdb459404357e3fb3ec02a386697e335a58a2b14db327780 WHIRLPOOL 290c4202358ac647ca7ed2ce0d17cf5ace6c533f7c79cee066d599193f9e77cfdd1e440e7670c5216fec9b1f882986dcf26f5cad638384b8b7a278fbcbe5eace
diff --git a/net-analyzer/testssl/metadata.xml b/net-analyzer/testssl/metadata.xml
new file mode 100644 (file)
index 0000000..b500834
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer>
+               <email>kensington@gentoo.org</email>
+       </maintainer>
+       <use>
+               <flag name="bundled-openssl">Install precompiled versions of OpenSSL for greater testing coverage</flag>
+       </use>
+</pkgmetadata>
diff --git a/net-analyzer/testssl/testssl-2.6.ebuild b/net-analyzer/testssl/testssl-2.6.ebuild
new file mode 100644 (file)
index 0000000..320ab9e
--- /dev/null
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN="${PN}.sh"
+
+DESCRIPTION="Tool to check TLS/SSL cipher support"
+HOMEPAGE="https://testssl.sh/"
+SRC_URI="https://github.com/drwetter/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 bundled-openssl? ( openssl )"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="bundled-openssl"
+
+RDEPEND="
+       dev-libs/openssl:0
+       sys-apps/util-linux
+"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+QA_PREBUILT="opt/${PN}/*"
+
+pkg_setup() {
+       use amd64 && BUNDLED_OPENSSL="openssl.Linux.x86_64"
+}
+
+src_prepare() {
+       sed -i -e "s|MAPPING_FILE_RFC=\"\"|MAPPING_FILE_RFC=\"/usr/share/${PN}/mapping-rfc.txt\"|" ${PN}.sh || die
+}
+
+src_install() {
+       dodoc CHANGELOG.stable-releases.txt CREDITS.md Readme.md
+       dodoc openssl-rfc.mappping.html
+
+       dobin ${PN}.sh
+
+       insinto /usr/share/${PN}
+       doins mapping-rfc.txt
+
+       if use bundled-openssl; then
+               exeinto /opt/${PN}
+               use amd64 && doexe bin/${BUNDLED_OPENSSL}
+       fi
+}
+
+pkg_postinst() {
+       if use bundled-openssl; then
+               einfo "A precompiled version of OpenSSL has been installed into /opt/${PN},"
+               einfo "configured to enable a wider range of features to allow better testing."
+               einfo ""
+               einfo "To use it, call ${PN} appropriately:"
+               einfo "${MY_PN} --openssl /opt/${PN}/${BUNDLED_OPENSSL} example.com"
+       fi
+}