# # spec file for package beep # # Copyright (c) 2024 SUSE LLC # Copyright (c) 2020 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: beep Version: 1.4.12 Release: 0 Summary: Beep the PC speaker License: GPL-2.0-only URL: https://github.com/spkr-beep/beep Source: https://github.com/spkr-beep/beep/archive/v%{version}/%{name}-%{version}.tar.gz Source1: EXAMPLES BuildRequires: gcc BuildRequires: make BuildRequires: udev Requires: acl Requires: shadow Requires: udev %description beep allows you to have the PC speaker issue beeps and beep patterns with given frequencies, durations, and spacing. Desktop users are allowed to use this out of the box. Remote users need to be member of the beep group. %prep %setup -q # we deal with documentation ourself, and don't like executables in the docs sed -i '/doc_DATA += .*$/d' GNUmakefile sed -i '/contrib_SCRIPTS += .*$/d' GNUmakefile # use prefix = /usr instead /usr/local sed -i 's|prefix = /usr/local|prefix = /usr|g' GNUmakefile cp -p %{SOURCE1} . %build %make_build %install %make_install install -d -m 755 %{buildroot}/%{_udevrulesdir} cat > %{buildroot}/%{_udevrulesdir}/70-pcspkr-beep.rules << EOF # Give write access to the PC speaker to the user logged in on the current virtual console ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="PC Speaker", ENV{DEVNAME}!="", TAG+="uaccess" # Add write access to the PC speaker for the "beep" group ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="PC Speaker", ENV{DEVNAME}!="", RUN+="/usr/bin/setfacl -m g:beep:w '$env{DEVNAME}'" EOF %post getent group beep >/dev/null || groupadd --system beep %udev_rules_update %preun %udev_rules_update getent group beep >/dev/null || groupdel beep %files %license COPYING %doc EXAMPLES *.md %{_bindir}/beep %{_mandir}/man1/beep.1%{?ext_man} %{_udevrulesdir}/70-pcspkr-beep.rules %changelog