[libvirt] [dbus PATCH 2/4] spec: cleanup spec file based on fedora package review

Pavel Hrdina phrdina at redhat.com
Mon Mar 26 13:33:51 UTC 2018


All of these changes are simple enough so I've put the into single
commit:

    - remove obsolete tags and commands
    - %global macro is preferred over %define macro
    - use %autosetup, %make_build and %make_install macros
    - COPYING file should be listed using %license macro

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 libvirt-dbus.spec.in | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/libvirt-dbus.spec.in b/libvirt-dbus.spec.in
index 3a04ad6..4b8e752 100644
--- a/libvirt-dbus.spec.in
+++ b/libvirt-dbus.spec.in
@@ -1,19 +1,17 @@
 # -*- rpm-spec -*-
 
-%define glib2_version @GLIB2_REQUIRED@
-%define libvirt_version @LIBVIRT_REQUIRED@
-%define libvirt_glib_version @LIBVIRT_GLIB_REQUIRED@
-%define system_user @SYSTEM_USER@
+%global glib2_version @GLIB2_REQUIRED@
+%global libvirt_version @LIBVIRT_REQUIRED@
+%global libvirt_glib_version @LIBVIRT_GLIB_REQUIRED@
+%global system_user @SYSTEM_USER@
 
 Name: @PACKAGE@
 Version: @VERSION@
-Release: 1%{?dist}%{?extra_release}
+Release: 1%{?dist}
 Summary: libvirt dbus API binding
-Group: Development/Libraries
 License: LGPLv2+
 URL: https://libvirt.org/
 Source0: https://libvirt.org/sources/dbus/%{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires: gcc
 BuildRequires: glib2-devel >= %{glib2_version}
@@ -30,18 +28,14 @@ Requires(pre): shadow-utils
 This package provides integration between libvirt and the DBus
 
 %prep
-%setup -q
+%autosetup
 
 %build
 %configure
-%__make %{?_smp_mflags}
+%make_build
 
 %install
-rm -rf $RPM_BUILD_ROOT
-%__make install  DESTDIR=$RPM_BUILD_ROOT
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+%make_install
 
 %pre
 getent group %{system_user} >/dev/null || groupadd -r %{system_user}
@@ -51,8 +45,8 @@ getent passwd %{system_user} >/dev/null || \
 exit 0
 
 %files
-%defattr(-,root,root,-)
-%doc README.md HACKING.md COPYING NEWS
+%doc README.md HACKING.md NEWS
+%license COPYING
 %{_sysconfdir}/polkit-1/rules.d/libvirt-dbus.rules
 %{_bindir}/libvirt-dbus
 %{_datadir}/dbus-1/services/org.libvirt.service
-- 
2.14.3




More information about the libvir-list mailing list