Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/beep/
Date: Thu, 23 Sep 2021 08:20:30
Message-Id: 1632385023.51db2842c8c2c925a6c0d7c7875949e94afa9d6f.mgorny@gentoo
1 commit: 51db2842c8c2c925a6c0d7c7875949e94afa9d6f
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Mon Feb 22 01:02:52 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 23 08:17:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51db2842
7
8 app-misc/beep: capabilities added, suid removed
9
10 Closes: https://bugs.gentoo.org/716734
11 Package-Manager: Portage-3.0.14, Repoman-3.0.2
12 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
13 Closes: https://github.com/gentoo/gentoo/pull/19588
14 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
15
16 app-misc/beep/beep-1.4.9-r1.ebuild | 57 ++++++++++++++++++++++++++++++++++++++
17 1 file changed, 57 insertions(+)
18
19 diff --git a/app-misc/beep/beep-1.4.9-r1.ebuild b/app-misc/beep/beep-1.4.9-r1.ebuild
20 new file mode 100644
21 index 00000000000..7d53cca7a69
22 --- /dev/null
23 +++ b/app-misc/beep/beep-1.4.9-r1.ebuild
24 @@ -0,0 +1,57 @@
25 +# Copyright 1999-2021 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +inherit fcaps toolchain-funcs
31 +
32 +DESCRIPTION="Advanced PC speaker beeper"
33 +HOMEPAGE="https://github.com/spkr-beep"
34 +SRC_URI="https://github.com/spkr-beep/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
35 +
36 +LICENSE="GPL-2"
37 +SLOT="0"
38 +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
39 +
40 +# Tests require a speaker
41 +RESTRICT="test"
42 +
43 +src_prepare() {
44 + default
45 +
46 + sed -i -e "s#-D_FORTIFY_SOURCE=2##g;" GNUmakefile || die
47 +}
48 +
49 +src_compile() {
50 + emake \
51 + COMPILERS=gcc \
52 + COMPILER_gcc="$(tc-getCC)" \
53 + LINKER_gcc="$(tc-getCC)" \
54 + CFLAGS_gcc="${CFLAGS}" \
55 + LDFLAGS="${LDFLAGS}" \
56 + CPPFLAGS_gcc="" \
57 + all
58 +}
59 +
60 +src_test() {
61 + emake \
62 + COMPILERS=gcc \
63 + COMPILER_gcc="$(tc-getCC)" \
64 + LINKER_gcc="$(tc-getCC)" \
65 + CFLAGS_gcc="${CFLAGS}" \
66 + LDFLAGS="${LDFLAGS}" \
67 + check
68 +}
69 +
70 +src_install() {
71 + dobin beep
72 + doman "${PN}.1"
73 +
74 + fperms 0711 /usr/bin/beep
75 +
76 + einstalldocs
77 +}
78 +
79 +pkg_postinst() {
80 + fcaps cap_dac_override,cap_sys_tty_config "${EROOT}/usr/bin/beep"
81 +}