spec: Fix licence handling
Fix the handling of licence files in the specfile.
Signed-off-by: David Howells <dhowells@redhat.com>
diff --git a/keyutils.spec b/keyutils.spec
index 8b3b4b2..04de0fb 100644
--- a/keyutils.spec
+++ b/keyutils.spec
@@ -86,7 +86,9 @@
%files
%defattr(-,root,root,-)
-%doc README LICENCE.GPL
+%doc README
+%{!?_licensedir:%global license %%doc}
+%license LICENCE.GPL
%{_sbindir}/*
%{_bindir}/*
%{datadir}
@@ -97,7 +99,8 @@
%files libs
%defattr(-,root,root,-)
-%doc LICENCE.LGPL
+%{!?_licensedir:%global license %%doc}
+%license LICENCE.LGPL
%{_mandir}/man7/*
%{_libdir}/libkeyutils.so.%{libapiversion}
%{_libdir}/libkeyutils.so.%{libapivermajor}