]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
spec: Use %license when available
authorCole Robinson <crobinso@redhat.com>
Thu, 14 Sep 2017 21:21:29 +0000 (17:21 -0400)
committerCole Robinson <crobinso@redhat.com>
Fri, 15 Sep 2017 12:43:54 +0000 (08:43 -0400)
This is required by the fedora packaging guidelines:

https://fedoraproject.org/wiki/Packaging:LicensingGuidelines

This macro isn't available on stock RHEL6 so provide a backcompat
definition

https://bugzilla.redhat.com/show_bug.cgi?id=1483293

Reported-by: Ville Skyttä <ville.skytta@iki.fi>
libvirt.spec.in

index 583fb05837dcfeac6c0e44ec0f496b69e0614b90..5f232b1bad500952645fe23001e2457b03e1869f 100644 (file)
@@ -15,6 +15,8 @@
 # touch configure.ac or Makefile.am.
 %{!?enable_autotools:%global enable_autotools 0}
 
+# RHEL6 doesn't have 'license' macro
+%{!?_licensedir:%global license %%doc}
 
 # The hypervisor drivers that run in libvirtd
 %define with_xen           0%{!?_without_xen:1}
@@ -2030,7 +2032,7 @@ exit 0
 %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
 
 %files libs -f %{name}.lang
-%doc COPYING COPYING.LESSER
+%license COPYING COPYING.LESSER
 %config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
 %config(noreplace) %{_sysconfdir}/libvirt/libvirt-admin.conf
 %{_libdir}/libvirt.so.*