From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 057A6138334 for ; Mon, 29 Apr 2019 16:06:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E9DF8E08CD; Mon, 29 Apr 2019 16:06:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 99CC9E08C8 for ; Mon, 29 Apr 2019 16:06:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2FE08342FCA for ; Mon, 29 Apr 2019 16:06:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 11EAA58A for ; Mon, 29 Apr 2019 16:06:27 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1556553979.9c3452893b828ec48768c4ce334b7bae602bd35f.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/umurmur/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-sound/umurmur/umurmur-0.2.17-r2.ebuild X-VCS-Directories: media-sound/umurmur/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 9c3452893b828ec48768c4ce334b7bae602bd35f X-VCS-Branch: master Date: Mon, 29 Apr 2019 16:06:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 923db1d5-ef41-4fa1-b922-6bb27c2a05f4 X-Archives-Hash: c33c48e5428843af39a8d63cf2d51349 commit: 9c3452893b828ec48768c4ce334b7bae602bd35f Author: Lars Wendler gentoo org> AuthorDate: Mon Apr 29 16:06:02 2019 +0000 Commit: Lars Wendler gentoo org> CommitDate: Mon Apr 29 16:06:19 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c345289 media-sound/umurmur: Revbump adding mbedtls support. Closes: https://bugs.gentoo.org/647656 Package-Manager: Portage-2.3.65, Repoman-2.3.12 Signed-off-by: Lars Wendler gentoo.org> media-sound/umurmur/umurmur-0.2.17-r2.ebuild | 114 +++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/media-sound/umurmur/umurmur-0.2.17-r2.ebuild b/media-sound/umurmur/umurmur-0.2.17-r2.ebuild new file mode 100644 index 00000000000..cf1ac28351f --- /dev/null +++ b/media-sound/umurmur/umurmur-0.2.17-r2.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools systemd readme.gentoo-r1 user + +DESCRIPTION="Minimalistic Murmur (Mumble server)" +HOMEPAGE="https://github.com/umurmur/umurmur" +if [[ "${PV}" == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/umurmur/umurmur.git" +else + SRC_URI="https://github.com/${PN}/${PN}/archive/${PV/_}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~x86" +fi +LICENSE="BSD" +SLOT="0" +IUSE="gnutls libressl mbedtls shm" + +# ssl-provider precendence: gnutls, mbedtls, libressl +# and openssl if none specified +DEPEND=">=dev-libs/protobuf-c-1.0.0_rc2 + dev-libs/libconfig + gnutls? ( >=net-libs/gnutls-3.0.0 ) + !gnutls? ( + mbedtls? ( net-libs/mbedtls ) + !mbedtls? ( + libressl? ( dev-libs/libressl:0= ) + !libressl? ( dev-libs/openssl:0= ) + ) + ) +" + +RDEPEND="${DEPEND}" + +DOC_CONTENTS=" + A configuration file has been installed at /etc/umurmur/umurmur.conf - you + may want to review it. See also\n + https://github.com/umurmur/umurmur/wiki/Configuration " + +S="${WORKDIR}/${P/_}" + +get_ssl_impl() { + local ssl_provider=() + + use gnutls && ssl_provider+=( gnutls ) + use mbedtls && ssl_provider+=( mbedtls ) + use libressl && ssl_provider+=( libressl ) + + if ! use gnutls && ! use mbedtls && ! use libressl ; then + ssl_provider+=( openssl ) + fi + echo ${ssl_provider[@]} +} + +pkg_pretend() { + local ssl_provider=( $(get_ssl_impl) ) + + if [[ ${#ssl_provider[@]} -gt 1 ]] ; then + ewarn "More than one ssl provider selected (${ssl_provider[@]})" + ewarn "defaulting to ${ssl_provider[0]}." + fi +} + +pkg_setup() { + enewgroup murmur + enewuser murmur "" "" "" murmur +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local ssl_provider=( $(get_ssl_impl) ) + + local myeconfargs=( + --with-ssl="${ssl_provider[@]}" + $(use_enable shm shmapi) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + local confdir + + emake DESTDIR="${D}" install + + newinitd "${FILESDIR}"/umurmurd.initd umurmurd + newconfd "${FILESDIR}"/umurmurd.confd umurmurd + systemd_dounit "${FILESDIR}"/umurmurd.service + + dodoc AUTHORS ChangeLog + newdoc README.md README + + confdir="/etc/umurmur" + insinto "${confdir}" + doins "${FILESDIR}"/umurmur.conf + + # Some permissions are adjusted as the config may contain a server + # password, and /etc/umurmur will typically contain the cert and the + # key used to sign it, which are read after priveleges are dropped. + fperms 0750 "${confdir}" + fowners -R root:murmur "${confdir}" + fperms 0640 "${confdir}"/umurmur.conf + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +}