Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build a .deb file for CMake from source?

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.

like image 857
Andrew Wagner Avatar asked Oct 28 '25 09:10

Andrew Wagner


1 Answers

After building cmake, use cpack for generate deb package:

cpack -G DEB

It should be run from the build tree.

like image 186
Tsyvarev Avatar answered Oct 30 '25 01:10

Tsyvarev