From 6d55a065b73ea3d5c197bcc2335843efdb2dd98fa5e822efb477f887b56c3eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Fri, 14 Jun 2019 11:24:50 +0000 Subject: [PATCH] Provide %license backward compatibility OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kexec-tools?expand=0&rev=111 --- kexec-tools.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/kexec-tools.spec b/kexec-tools.spec index 6b0da49..c0ab545 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -94,6 +94,18 @@ ln -s %{_sbindir}/kexec %{buildroot}/sbin %posttrans %{?regenerate_initrd_posttrans} +# Compatibility cruft +# there is no %license prior to SLE12 +%if %{undefined _defaultlicensedir} +%define license %doc +%else +# filesystem before SLE12 SP3 lacks /usr/share/licenses +%if 0%(test ! -d %{_defaultlicensedir} && echo 1) +%define _defaultlicensedir %_defaultdocdir +%endif +%endif +# End of compatibility cruft + %files %license COPYING %doc AUTHORS News TODO doc