[dpdk] - Avoid unnecessary use of %global, lazy expansion is normally better. (yes, Fedora recommendation

Panu Matilainen pmatilai at fedoraproject.org
Tue Jan 27 11:37:29 UTC 2015


commit a5cd00110734bb1eabbcda6b9808541151fba4e3
Author: Panu Matilainen <pmatilai at redhat.com>
Date:   Tue Jan 27 11:39:48 2015 +0200

    - Avoid unnecessary use of %global, lazy expansion is normally better.
      (yes, Fedora recommendation is misguided wrt this: %global has unwanted
      side-effects when used blindly for "everything", greetings from your
      friendly former rpm maintainer)
    - Drop unused destdir macro from the spec while at it

 dpdk.spec |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/dpdk.spec b/dpdk.spec
index 0bf764c..d90897a 100644
--- a/dpdk.spec
+++ b/dpdk.spec
@@ -1,6 +1,6 @@
 Name: dpdk
 Version: 1.7.0 
-Release: 4%{?dist}
+Release: 5%{?dist}
 URL: http://dpdk.org
 Source: http://dpdk.org/browse/dpdk/snapshot/dpdk-%{version}.tar.gz
 
@@ -24,9 +24,9 @@ License: BSD and LGPLv2 and GPLv2
 #
 ExclusiveArch: x86_64 
 
-%global machine native
+%define machine native
 
-%global target x86_64-%{machine}-linuxapp-gcc
+%define target x86_64-%{machine}-linuxapp-gcc
 
 
 
@@ -51,9 +51,8 @@ BuildArch: noarch
 %description doc
 API programming documentation for the Data Plane Development Kit.
 
-%global destdir %{buildroot}%{_prefix}
-%global datadir %{_datadir}/%{name}-%{version}
-%global docdir  %{_docdir}/%{name}-%{version}
+%define datadir %{_datadir}/%{name}-%{version}
+%define docdir  %{_docdir}/%{name}-%{version}
 
 %prep
 %setup -q
@@ -113,6 +112,10 @@ find %{buildroot}%{_includedir}/%{name}-%{version} -type f | xargs chmod 0644
 %{_includedir}/*
 
 %changelog
+* Tue Jan 27 2015 Panu Matilainen <pmatilai at redhat.com> - 1.7.0-5
+- Avoid unnecessary use of %%global, lazy expansion is normally better
+- Drop unused destdir macro while at it
+
 * Tue Jan 27 2015 Panu Matilainen <pmatilai at redhat.com> - 1.7.0-4
 - Copy the headers instead of broken symlinks into -devel package
 - Force sane mode on the headers


More information about the scm-commits mailing list