From 51db2842c8c2c925a6c0d7c7875949e94afa9d6f Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Mon, 22 Feb 2021 02:02:52 +0100 Subject: app-misc/beep: capabilities added, suid removed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/716734 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Alessandro Barbieri Closes: https://github.com/gentoo/gentoo/pull/19588 Signed-off-by: Michał Górny --- app-misc/beep/beep-1.4.9-r1.ebuild | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 app-misc/beep/beep-1.4.9-r1.ebuild (limited to 'app-misc/beep') diff --git a/app-misc/beep/beep-1.4.9-r1.ebuild b/app-misc/beep/beep-1.4.9-r1.ebuild new file mode 100644 index 000000000000..7d53cca7a698 --- /dev/null +++ b/app-misc/beep/beep-1.4.9-r1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit fcaps toolchain-funcs + +DESCRIPTION="Advanced PC speaker beeper" +HOMEPAGE="https://github.com/spkr-beep" +SRC_URI="https://github.com/spkr-beep/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" + +# Tests require a speaker +RESTRICT="test" + +src_prepare() { + default + + sed -i -e "s#-D_FORTIFY_SOURCE=2##g;" GNUmakefile || die +} + +src_compile() { + emake \ + COMPILERS=gcc \ + COMPILER_gcc="$(tc-getCC)" \ + LINKER_gcc="$(tc-getCC)" \ + CFLAGS_gcc="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + CPPFLAGS_gcc="" \ + all +} + +src_test() { + emake \ + COMPILERS=gcc \ + COMPILER_gcc="$(tc-getCC)" \ + LINKER_gcc="$(tc-getCC)" \ + CFLAGS_gcc="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + check +} + +src_install() { + dobin beep + doman "${PN}.1" + + fperms 0711 /usr/bin/beep + + einstalldocs +} + +pkg_postinst() { + fcaps cap_dac_override,cap_sys_tty_config "${EROOT}/usr/bin/beep" +} -- cgit v1.2.3-65-gdbad