It appears that more and more projects are moving to cmake, especially with KDE4 making the jump. Two packages of mine (plplot and kdesvn) are also making the switch. I also happen to be the current packager for cmake itself (because I package paraview which uses it), though I expect it will have to get moved to core relatively soon.
It seems like it is time to start collecting cmake best practices for generating Fedora RPMS using cmake, and perhaps even creating a %cmake rpm macro that is analagous to the %configure macro.
Here's what I have so far (note that cmake generally does out of tree builds):
%build mkdir fedora cd fedora export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS" cmake .. \ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=ON make VERBOSE=1 %{?_smp_mflags}
%install rm -rf $RPM_BUILD_ROOT cd fedora make install DESTDIR=$RPM_BUILD_ROOT
I'm also running into trouble getting kdesvn to install into /usr/lib64 on x86_64. This might just be a matter of educating upstream users on the proper cmake commands for this (once I figure that out myself...). Currently there is lots of hard coding of "lib" into install paths.
Now, where to put this in the wiki?
Orion Poplawski wrote:
It appears that more and more projects are moving to cmake, especially with KDE4 making the jump. Two packages of mine (plplot and kdesvn) are also making the switch. I also happen to be the current packager for cmake itself (because I package paraview which uses it), though I expect it will have to get moved to core relatively soon.
It seems like it is time to start collecting cmake best practices for generating Fedora RPMS using cmake, and perhaps even creating a %cmake rpm macro that is analagous to the %configure macro.
Excellent!
...
Now, where to put this in the wiki?
I'd suggest http://fedoraproject.org/wiki/PackagingDrafts/cmake for starters.
-- Rex
Rex Dieter wrote:
Orion Poplawski wrote:
Now, where to put this in the wiki?
I'd suggest http://fedoraproject.org/wiki/PackagingDrafts/cmake for starters.
Created.
packaging@lists.fedoraproject.org