How do you produce a .deb file for ubuntu from the CMake source code?

I already installed (hopefully most of) the build dependencies using apt:

sudo apt-get build-dep cmake

checked out the cmake repo using git:

git clone http://www.cmake.org/cmake.git

built cmake using the older cmake I already have:

cd cmake cmake . make

what next? This is surprisingly hard to google for; most people want to know how to package their own stuff ~with cmake. The CMake install instructions just specify a make install but dependency hell is bad enough ~with a package manager in my experience.

share|improve this question
up vote 0 down vote accepted

After building cmake, use cpack for generate deb package:

cpack -G deb

It should be run from the build tree.

share|improve this answer
    
Thanks; that at least generates a .deb, but it won't install: dpkg: error processing archive... trying to overwrite '/usr/share/aclocal/cmake.m4', which is also in package cmake-data 2.8.12.2-0ubuntu3 – Andrew Wagner Aug 17 '15 at 8:18
    
I tried using ccmake to set CPACK_BINARY_DEB to ON and rebuilding, and that produced a .deb file, but it has the same install problem. – Andrew Wagner Aug 17 '15 at 8:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.