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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux