[bird] spec: specfile cleanup

Michal Sekletar msekleta at fedoraproject.org
Thu Oct 17 13:46:21 UTC 2013


commit 5df3bc236f500b746112bb845b9180efc0574e57
Author: Michal Sekletar <msekleta at redhat.com>
Date:   Thu Oct 17 14:39:07 2013 +0200

    spec: specfile cleanup
    
    We use macros almost everywhere thus we should be consistent and don't use
    $RPM_BUILD_ROOT. Separate main specfile sections by two empty lines. %clean and
    BuildRoot are not needed nowadays.

 bird.spec |   56 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 28 insertions(+), 28 deletions(-)
---
diff --git a/bird.spec b/bird.spec
index 9dd55f6..f85b977 100644
--- a/bird.spec
+++ b/bird.spec
@@ -1,16 +1,15 @@
-Name:           bird
-Version:        1.3.11
-Release:       	1%{?dist}
-Summary:        BIRD Internet Routing Daemon
-
-Group:          System Environment/Daemons
-License:        GPLv2+
-URL:            http://bird.network.cz
-Source0:        ftp://bird.network.cz/pub/bird/bird-%{version}.tar.gz
-Source1:        bird.service
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires:  flex bison ncurses-devel readline-devel sed systemd
+Name:             bird
+Version:          1.3.11
+Release:          1%{?dist}
+Summary:          BIRD Internet Routing Daemon
+
+Group:            System Environment/Daemons
+License:          GPLv2+
+URL:              http://bird.network.cz
+Source0:          ftp://bird.network.cz/pub/bird/bird-%{version}.tar.gz
+Source1:          bird.service
+
+BuildRequires:    flex bison ncurses-devel readline-devel sed systemd
 Requires(post):   systemd
 Requires(preun):  systemd
 Requires(postun): systemd
@@ -24,8 +23,8 @@ This package contains IPv4 version.
 
 
 %package -n bird6
-Summary:        BIRD Internet Routing Daemon
-Group:          System Environment/Daemons
+Summary:          BIRD Internet Routing Daemon
+Group:            System Environment/Daemons
 Requires(post):   systemd
 Requires(preun):  systemd
 Requires(postun): systemd
@@ -39,20 +38,23 @@ This package contains IPv6 version.
 
 
 %package doc
-Summary:        BIRD Internet Routing Daemon
-Group:          System Environment/Daemons
+Summary:          BIRD Internet Routing Daemon
+Group:            System Environment/Daemons
+
 %description doc
 BIRD is dynamic routing daemon supporting IPv4 and IPv6 versions of routing
 protocols BGP, RIP and OSPF.
 
 This package contains documentation.
 
+
 %prep
 %setup -q
 
 #Don't strip executables
 sed -i 's/\$(INSTALL_PROGRAM) -s/\$(INSTALL_PROGRAM)/' tools/Makefile.in
 
+
 %build
 mkdir ipv6
 tar c --exclude ipv6 . | tar x -C ipv6
@@ -72,21 +74,15 @@ make %{?_smp_mflags}
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
-
-make install DESTDIR=$RPM_BUILD_ROOT
+make install DESTDIR=%{buildroot}
 
 cd ipv6
-make install DESTDIR=$RPM_BUILD_ROOT
+make install DESTDIR=%{buildroot}
 cd ..
 
-install -d $RPM_BUILD_ROOT%{_unitdir}
-sed 's/BIRD_PROGNAME/bird/' %SOURCE1 > $RPM_BUILD_ROOT%{_unitdir}/bird.service
-sed 's/BIRD_PROGNAME/bird6/' %SOURCE1 > $RPM_BUILD_ROOT%{_unitdir}/bird6.service
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+install -d %{buildroot}%{_unitdir}
+sed 's/BIRD_PROGNAME/bird/' %SOURCE1 > %{buildroot}%{_unitdir}/bird.service
+sed 's/BIRD_PROGNAME/bird6/' %SOURCE1 > %{buildroot}%{_unitdir}/bird6.service
 
 
 %post
@@ -98,6 +94,7 @@ rm -rf $RPM_BUILD_ROOT
 %postun
 %systemd_postun_with_restart bird.service
 
+
 %post -n bird6
 %systemd_post bird6.service
 
@@ -107,6 +104,7 @@ rm -rf $RPM_BUILD_ROOT
 %postun -n bird6
 %systemd_postun_with_restart bird6.service
 
+
 %files
 %defattr(-,root,root,-)
 %doc NEWS README TODO
@@ -130,6 +128,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc NEWS README TODO
 %doc doc/bird*.html
 
+
 %changelog
 * Thu Oct 17 2013 Michal Sekletar <msekleta at redhat.com> - 1.3.11-1
 - update to 1.3.11
@@ -138,6 +137,7 @@ rm -rf $RPM_BUILD_ROOT
 - drop rpm triggers used for migration from sysv to systemd
 - drop sysvinit subpackages
 - use macroized systemd scriptlets
+- specfile cleanup
 
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.10-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild


More information about the scm-commits mailing list