[pkg] do not include toplevel directories in rpm (closes #10362119)
authorSamuel Trégouët <samuel.tregouet@logilab.fr>
Fri, 05 Feb 2016 12:26:28 +0100
changeset 11094 13c9cd75f097
parent 11093 f28a5c19d4ed
child 11100 5758ba784ebd
[pkg] do not include toplevel directories in rpm (closes #10362119) Our spec file conflicts with the filesystem package in centos7: we set permissions to 0755 for /usr/bin and /usr/lib whereas filesystem sets them to 0555. So to be compatible with both centos7 and others we simply ignore these directories.
cubicweb.spec
skeleton/DISTNAME.spec.tmpl
--- a/cubicweb.spec	Fri Feb 05 10:30:01 2016 +0100
+++ b/cubicweb.spec	Fri Feb 05 12:26:28 2016 +0100
@@ -5,6 +5,7 @@
 %define python python
 %define __python /usr/bin/python
 %endif
+%{!?_python_sitelib: %define _python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
 Name:           cubicweb
 Version:        3.22.0
@@ -57,5 +58,6 @@
 %files 
 %defattr(-, root, root)
 %dir /var/log/cubicweb
-/*
-
+%{_prefix}/share/cubicweb/*
+%{_python_sitelib}/*
+%{_bindir}/*
--- a/skeleton/DISTNAME.spec.tmpl	Fri Feb 05 10:30:01 2016 +0100
+++ b/skeleton/DISTNAME.spec.tmpl	Fri Feb 05 12:26:28 2016 +0100
@@ -44,4 +44,4 @@
 
 %%files
 %%defattr(-, root, root)
-/*
+%%{_prefix}/share/cubicweb/cubes/*