[koules] Attempt at saner SPEC file formatting

Lubomir Rintel lkundrak at fedoraproject.org
Thu Oct 24 09:47:18 UTC 2013


commit 14ea734daa36337216eecb27a7c1842ad67eb967
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Thu Oct 24 11:39:53 2013 +0200

    Attempt at saner SPEC file formatting
    
    I'm doing this semi-automatically across all packages I maintain, since some
    are several years old and since then several have suffered bit-rot and such.
    I'm fixing up the following:
    
    - Old RPM relics (such as %defattr, BuildRoot or %clean sections)
    - Whitespace errors (such as trailing spaces)
    - Consistent use of %{buildroot}
    - Dropping useless %{name} expansions that harm legibility
    - Consistent spacing between RPM sections
    - Bad days in %changelogs

 koules.spec |   34 ++++++++++++++++------------------
 1 files changed, 16 insertions(+), 18 deletions(-)
---
diff --git a/koules.spec b/koules.spec
index 1008ec5..aa28ebc 100644
--- a/koules.spec
+++ b/koules.spec
@@ -11,7 +11,7 @@
 
 Name:           koules
 Version:        1.4
-Release:        15%{?dist}
+Release:        16%{?dist}
 Summary:        Action game with multiplayer, network and sound support
 
 Group:          Amusements/Games
@@ -20,7 +20,6 @@ URL:            http://www.ucw.cz/~hubicka/koules/
 Source0:        http://www.ucw.cz/~hubicka/koules/packages/%{name}%{version}-src.tar.gz
 Source1:        koules.desktop
 Source2:        koules.sndsrv.linux
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libX11-devel
 BuildRequires:  libXext-devel
@@ -155,23 +154,22 @@ make %{makedirs} CCOPTIONS="%{optflags}"
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_mandir}/man6
-install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/sound
-install -d $RPM_BUILD_ROOT%{_libexecdir}/%{name}
+install -d %{buildroot}%{_mandir}/man6
+install -d %{buildroot}%{_datadir}/%{name}/sound
+install -d %{buildroot}%{_libexecdir}/%{name}
 
 %if %with svgalib
 # Install SVGAlib variant
 cd $RPM_BUILD_DIR/%{name}-%{version}-svga/%{name}%{version}
-make -f Makefile.svgalib install %{makedirs} DESTDIR=$RPM_BUILD_ROOT \
+make -f Makefile.svgalib install %{makedirs} DESTDIR=%{buildroot} \
         INSTALLSOUND=False
 %endif
 
 # Install X11 variant, and sound
 cd $RPM_BUILD_DIR/%{name}-%{version}-x11/%{name}%{version}
-make install %{makedirs} DESTDIR=$RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
-install Icon.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.xpm
+make install %{makedirs} DESTDIR=%{buildroot}
+install -d %{buildroot}%{_datadir}/pixmaps
+install Icon.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
 desktop-file-install \
 %if (0%{?fedora} && 0%{?fedora} < 19) || ( 0%{?rhel} && 0%{?rhel} < 7)
         --vendor fedora                    \
@@ -180,16 +178,11 @@ desktop-file-install \
         %{SOURCE1}
 
 # PulseAudio wrapper for the sound server
-mv $RPM_BUILD_ROOT%{_libexecdir}/%{name}/koules.sndsrv.linux{,.bin}
-cp %{SOURCE2} $RPM_BUILD_ROOT%{_libexecdir}/%{name}/koules.sndsrv.linux
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+mv %{buildroot}%{_libexecdir}/%{name}/koules.sndsrv.linux{,.bin}
+cp %{SOURCE2} %{buildroot}%{_libexecdir}/%{name}/koules.sndsrv.linux
 
 
 %files
-%defattr(-,root,root,-)
 %doc %{name}%{version}/ANNOUNCE
 %doc %{name}%{version}/BUGS
 %doc %{name}%{version}/COPYING
@@ -199,17 +192,19 @@ rm -rf $RPM_BUILD_ROOT
 %doc %{name}%{version}/README
 %doc %{name}%{version}/TODO
 
+
 %files sound
-%defattr(-,root,root,-)
 %{_datadir}/%{name}
 %{_libexecdir}/%{name}
 
+
 %if %with svgalib
 %files svgalib
 %attr(755,root,root) %{_bindir}/koules.svga
 %attr(644,root,root) %{_mandir}/man6/koules.svga.6*
 %endif
 
+
 %files x11
 %{_bindir}/xkoules
 %attr(644,root,root) %{_mandir}/man6/xkoules.6*
@@ -222,6 +217,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Thu Oct 24 2013 Lubomir Rintel <lkundrak at v3.sk> - 1.4-16
+- Bulk sad and useless attempt at consistent SPEC file formatting
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4-15
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list