Hello,
I am trying to package qdldl.
https://build.opensuse.org/package/show/home:andythe_great/qdldl
qdldl tried to install /usr/lib/cmake/qdldl.
So I think the correct way should be /usr/lib64/cmake/qdldl.
So I use,
%if "%{_libdir}" != "%{_prefix}/lib"
mv %{buildroot}%{_prefix}/lib/cmake/qdldl/ %{_libdir}
%endif
just under %cmake_install.
However, I got mv: cannot move ‘/home/abuild/rpmbuild/BUILDROOT/qdldl-0.1.5-0.x86_64/usr/lib/cmake/qdldl/’ to ‘/usr/lib64/qdldl’: Permission denied
How to fix this?
Thank you.
Hi
When I’m not sure I always look in the local system to see what’s present and then look on OBS as to how it was done 
For example I see /usr/lib64/cmake/openblas;
https://build.opensuse.org/package/view_file/science/openblas/openblas.spec?expand=1
Looks like they use defines to get it into the correct location…
I have look into the openblas that you link, from what I understand, it seems that they hide the full directory under %define is that right?
So I tried it as well, but same error.
I ended up with this, but same error.
%define p_name qdldl
%define p_libdir /lib
%define p_cmakedir %{buildroot}%{_prefix}%{p_libdir}/cmake/%{p_name}
...
%if "%{_libdir}" != "%{_prefix}/lib"
mv %{p_cmakedir} %{_libdir}
%endif
SOLVED
I patch the cmake file instead