From cbc662f837203242e85d0fb8e737f217ae6cd6fa Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Tue, 8 Jan 2019 07:59:39 +0100 Subject: [PATCH] clean up specfile with new guidelines in hand --- beep.spec | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/beep.spec b/beep.spec index 57836f8..27f98ec 100644 --- a/beep.spec +++ b/beep.spec @@ -5,7 +5,6 @@ Name: beep Version: 1.4.0 Release: 1%{?dist} -Group: Applications/System License: GPLv2+ URL: https://github.com/spkr-beep/beep/ @@ -28,6 +27,9 @@ BuildRequires: systemd Requires(pre): shadow-utils +Requires: /etc/modprobe.d/ +Requires: /etc/udev/rules.d/ + %description Beep allows the user to control the PC speaker with precision, @@ -40,23 +42,26 @@ what's interesting, but it's real good at that notifying part. %prep %setup -q -cp -p %{SOURCE1} README.fedora +install -m 0644 -p %{SOURCE1} README.fedora %build -make %{?_smp_mflags} COMPILERS=gcc CFLAGS_gcc="-Wall -Wextra -std=gnu99 -pedantic -Werror ${RPM_OPT_FLAGS}" CPPFLAGS_gcc="" +make %{?_smp_mflags} COMPILERS=gcc CFLAGS_gcc="-Wall -Wextra -std=gnu99 -pedantic -Werror ${RPM_OPT_FLAGS}" LDFLAGS="${RPM_LD_FLAGS}" CPPFLAGS_gcc="" %install rm -rf "$RPM_BUILD_ROOT" make install DESTDIR="$RPM_BUILD_ROOT" -install -d -m 0755 "$RPM_BUILD_ROOT/%{_sysconfdir}/modprobe.d/" -install -p -m 0644 pcspkr-beep.conf "$RPM_BUILD_ROOT/%{_sysconfdir}/modprobe.d/beep.conf" +install -d -m 0755 "$RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/" +install -p -m 0644 pcspkr-beep.conf "$RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/beep.conf" -install -d -m 0755 "$RPM_BUILD_ROOT/%{etcudevrulesdir}/" -install -p -m 0644 90-pcspkr-beep.rules "$RPM_BUILD_ROOT/%{etcudevrulesdir}/" +install -d -m 0755 "$RPM_BUILD_ROOT%{etcudevrulesdir}/" +install -p -m 0644 90-pcspkr-beep.rules "$RPM_BUILD_ROOT%{etcudevrulesdir}/" +# Fedora Packaging GL says Fedora wants to choose and do the compression itself + +gunzip "$RPM_BUILD_ROOT%{_mandir}/man1/beep.1.gz" %pre getent group beep >/dev/null || groupadd -r beep @@ -64,9 +69,10 @@ exit 0 %files -%doc CHANGELOG COPYING CREDITS README.md PERMISSIONS.md +%license %{_pkgdocdir}/COPYING +%doc CHANGELOG CREDITS README.md PERMISSIONS.md %attr(0755,root,root) %{_bindir}/beep -%{_mandir}/man1/beep.1.gz +%{_mandir}/man1/beep.1* %doc README.fedora %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/modprobe.d/beep.conf %config(noreplace) %{etcudevrulesdir}/90-pcspkr-beep.rules