Make obsolete scriptlets conditional for EPEL < 8

This commit is contained in:
Robert Scheck 2019-01-27 23:45:12 +01:00
parent 701e270ff3
commit 62988b5636
1 changed files with 17 additions and 4 deletions

View File

@ -14,8 +14,11 @@ Source2: %{name}.desktop
Source3: %{name}-sound.desktop
Patch0: moon-buggy-1.0.51-pause.patch
Patch1: moon-buggy-1.0.51-sound.patch
BuildRequires: gcc
BuildRequires: ncurses-devel, texinfo
%if 0%{?rhel} && 0%{?rhel} <= 7
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%endif
BuildRequires: gcc, ncurses-devel, texinfo
%if !%{oldstyle}
BuildRequires: esound-devel, desktop-file-utils, autoconf, automake
%endif
@ -44,7 +47,6 @@ autoreconf -f -i
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install
# Create zero-sized highscore file
@ -72,8 +74,19 @@ sed -i 's|\r$||g' TODO.utf8
touch -c -r TODO TODO.utf8
mv -f TODO.utf8 TODO
%if 0%{?rhel} && 0%{?rhel} <= 7
%post
/sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir
%preun
if [ $1 = 0 ]; then
/sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || :
fi
%endif
%files
%doc ANNOUNCE AUTHORS ChangeLog COPYING README THANKS
%licese COPYING
%doc ANNOUNCE AUTHORS ChangeLog README THANKS
%if !%{oldstyle}
%doc README.sound
%{_datadir}/%{name}/