We got the range wrong the last time. This does the
correct Requires:
el7 systemd
el8 systemd-udev
el9 systemd-udev
fc36 systemd-udev
fc37 systemd-udev
fc38 systemd-udev
It appears that the udev directories
/etc/udev/rules.d/
/usr/lib/udev/rules.d/
were split off from the systemd package into the systemd-udev package
some time after EL7, so a beep package for EL7 and earlier can only
"Require:" systemd, not the systemd-udev package introduced later.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2157788
Stop using %doc with relative paths and absolute paths: Only use
%doc with absolute paths (%{_pkgdocdir}).
Why? It's in the Fedora Packaging Guidelines, and epel7 builds
complain about doc files being listed twice.
Use %{build_cflags} and %{build_ldflags} to hopefully use more of
what default flags are available in default builds, and switch to
more %{...} rpm macros instead of ${RPM_*} shell vars.
Apparently, epel7 uses a versioned directory name
/usr/share/doc/$(PACKAGE)-$(VERSION)/
to store documentation files instead of the more common
(f34 and f35 and fNN for along time, and epel8, and
presumably epel9 as well, also Debian 10, FreeBSD13,
etc.)
/usr/share/doc/$(PACKAGE)/
Remove all kmod(pcspkr.ko) dependencies as
https://bugzilla.redhat.com/show_bug.cgi?id=1652823
shows dnf would just install the wrong package.
So instead, we document that the user has to explicitly
install the kernel-modules-extra package.
We "recommend" the kernel driver and do not "require" it in order to
not break cases where beep is installed on systems other than
bare-metal PC hardware such as containers.
This assumes the people using the "beep" package can deal with a
"beep" invocation not producing a beep on those other systems.
The alternative would be to "require" the kernel driver which would
mean that you could not install beep inside a container, even if
that container is run in a priviledged way with access to the host's
pcspkr.ko.
While the kernel supports more speaker drivers, the only hardware
platforms with a speaker driver supported by Fedora use pcspkr.ko
(PCSPKR_PLATFORM in the kernel config).
Slightly (but not quite) similar packages would be floppy-support
and joystick-support which both "require" their respective kernel
drivers, but they make less sense inside containers.
The "BuildRequires: make" was added by a script running
through all of Fedora, so they did not check that the
indentation matches that of the surrounding lines of
spec file.
This adapts this line to match the indentation of the
other lines in the spec file.
Update to beep-1.4.7:
- Install contrib scripts for both successfully and
failing sounding beeps.
- beep installs its man page uncompressed, so the
spec file can stop unzipping it for the packaging
scripts to be able to do their compression magic.
Summary of the changes compared to the beep-1.4.4 release:
* Use va_copy() macro in function with va_list parameter
to avoid possible bug
* Use BEEP_LOG_LEVEL environment variable for default log level
Summary of the changes in the beep-1.4.4 release:
* ship our own modprobe.d and udev rules.d files
* install udev rules into /usr/lib/udev/rules.d/
(if the sysadmin want their own rules, they can
add them to /etc/udev/rules.d/)
* new out of the box permission setup: allow local
users and "beep" group
* add note on using sox/play with modern sound infrastructure
* adapt beep(1) man page to mention README.fedora
* set compiler flags for "make install" (just in case)
* install extra source files directly from %{SOURCEn}
* ship the installed doc files as %doc (no need to install
them from source)