[lxc] Use %license only where possible.

Thomas Moschny thm at fedoraproject.org
Wed Mar 18 08:45:30 UTC 2015


commit 9ec775f7da952b71290bd8479b4b074cb31b4d75
Author: Thomas Moschny <thm at fedoraproject.org>
Date:   Wed Mar 18 09:45:16 2015 +0100

    Use %license only where possible.

 lxc.spec | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/lxc.spec b/lxc.spec
index 52ba35d..241026a 100644
--- a/lxc.spec
+++ b/lxc.spec
@@ -31,7 +31,7 @@
 
 Name:           lxc
 Version:        1.1.1
-Release:        %{?prerel:0.}1%{?prerel:.%{prerel}}%{?dist}
+Release:        %{?prerel:0.}2%{?prerel:.%{prerel}}%{?dist}
 Summary:        Linux Resource Containers
 Group:          Applications/System
 License:        LGPLv2+ and GPLv2
@@ -221,7 +221,7 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
 chmod -x %{buildroot}%{luapkgdir}/lxc.lua
 
 mkdir -p %{buildroot}%{_pkgdocdir}
-cp -a AUTHORS README %{buildroot}%{_pkgdocdir}
+cp -a AUTHORS README %{!?_licensedir:COPYING} %{buildroot}%{_pkgdocdir}
 mkdir -p %{buildroot}%{_pkgdocdir}/api
 cp -a doc/api/html/* %{buildroot}%{_pkgdocdir}/api/
 
@@ -324,7 +324,11 @@ fi
 %dir %{_pkgdocdir}
 %{_pkgdocdir}/AUTHORS
 %{_pkgdocdir}/README
+%if 0%{?_licensedir:1}
 %license COPYING
+%else
+%{_pkgdocdir}/COPYING
+%endif
 %if 0%{?with_systemd}
 %{_unitdir}/%{name}.service
 %{_unitdir}/%{name}-net.service
@@ -371,10 +375,15 @@ fi
 # README, AUTHORS and COPYING intentionally duplicated because -doc
 # can be installed on its own.
 %{_pkgdocdir}/*
+%if 0%{?_licensedir:1}
 %license COPYING
+%endif
 
 
 %changelog
+* Tue Mar 17 2015 Thomas Moschny <thomas.moschny at gmx.de> - 1.1.1-2
+- Use %%license only where possible.
+
 * Tue Mar 17 2015 Thomas Moschny <thomas.moschny at gmx.de> - 1.1.1-1
 - Update to 1.1.1.
 - Add dependency on rsync (rhbz#1177981).


More information about the scm-commits mailing list