Showing posts with label checkinstall. Show all posts
Showing posts with label checkinstall. Show all posts

Friday, June 21, 2019

Linux Mint: Compile the Lua interpreter from source and build your own Debian package to install it

Objective


Compile the latest version of the Lua language interpreter from source. First build a locally installed Lua interpreter for the current user only. Finally, build a Debian package to install it and have the possibility to safely remove it when necessary.

Motivation


Recently, I thought it was a good idea to learn a new programming language that can be easily integrated and combined with C++. After a quick research I figured that Lua would be very handy for such a job. Unfortunately, my current Mint version does not quite support the latest Lua version in it's repository. Additionally, I plan to use Lua from Windows 10, too. So, I wanted to have the installation build from the same sources for both Operating Systems as well. This article describes the process to get a local portable installation of Lua on per user basis and a description on how to build a Debian installer package for Linux that can be easily uninstalled again. An upcoming article will describe how to compile your own Lua interpreter on Windows 10 using the (command line interface) CLI compiler from Microsoft e.g. Visual Studio Professional.

Prerequisites



Solution


I decided to do the whole build and temporary stuff within a "tmp" folder in my home account.
The boostrap toolchain will reside in the sub-directory "lua" within the "tmp" folder.

Get the latest source of the Lua interpreter from their homepage


Open a terminal and change the current directory to "~/tmp". Type the following commands to dowload the latest version of the source code of the Lua interpreter, in my case version 5.3.5.

$> mkdir -p ~/tmp/lua
$> cd ~/tmp/lua
$> wget https://www.lua.org/ftp/lua-5.3.5.tar.gz

you'll see some output similar to this:

--2019-06-19 21:34:32-- https://www.lua.org/ftp/lua-5.3.5.tar.gz
Resolving www.lua.org (www.lua.org)... 88.99.213.221, 2a01:4f8:10a:3edc::2
Connecting to www.lua.org (www.lua.org)|88.99.213.221|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 303543 (296K) [application/gzip]
Saving to: ‘lua-5.3.5.tar.gz’

lua-5.3.5.tar.gz 100%[===============================================================>] 296,43K --.-KB/s in 0,1s

2019-06-19 21:34:32 (2,56 MB/s) - ‘lua-5.3.5.tar.gz’ saved [303543/303543]

Now you have to unpack the downloaded package:

$> tar -xzvf lua-5.3.5.tar.gz

Everything will be unpacked into the sub-directory "lua-5.3.5"

lua-5.3.5/
lua-5.3.5/Makefile
lua-5.3.5/doc/
lua-5.3.5/doc/luac.1
lua-5.3.5/doc/manual.html
lua-5.3.5/doc/manual.css
lua-5.3.5/doc/contents.html
[...]
lua-5.3.5/doc/readme.html
lua-5.3.5/src/
lua-5.3.5/src/ldblib.c
lua-5.3.5/src/lmathlib.c
lua-5.3.5/src/loslib.c
lua-5.3.5/src/lvm.c
lua-5.3.5/src/ldo.h
lua-5.3.5/src/lua.h
[...]
lua-5.3.5/src/lua.hpp
[...]
lua-5.3.5/README
[...]

Change into the directory "~/tmp/lua/lua-5.3.5" in order to build the interpreter.

$> cd ~/tmp/lua/lua-5.3.5

Compile the Lua interpreter from the sources


In order to check how the interpreter can be build and to get more information, we type "make"

$> make

Please do 'make PLATFORM' where PLATFORM is one of these:
aix bsd c89 freebsd generic linux macosx mingw posix solaris
See doc/readme.html for complete instructions.

For further explanations, we can check the included documentation in "doc/readme.html".

Let's compile the sources for the Linux target system.

$> make linux

cd src && make linux
make[1]: Entering directory '/home/cschmidt/tmp/lua/lua-5.3.5/src'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[2]: Entering directory '/home/cschmidt/tmp/lua/lua-5.3.5/src'
gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lapi.o lapi.c
[...]
gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o linit.o linit.c
ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib liblua.a
gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lua.o lua.c
lua.c:82:10: fatal error: readline/readline.h: No such file or directory
#include
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
: recipe for target 'lua.o' failed
make[2]: *** [lua.o] Error 1
make[2]: Leaving directory '/home/cschmidt/tmp/lua/lua-5.3.5/src'
Makefile:110: recipe for target 'linux' failed
make[1]: *** [linux] Error 2
make[1]: Leaving directory '/home/cschmidt/tmp/lua/lua-5.3.5/src'
Makefile:55: recipe for target 'linux' failed
make: *** [linux] Error 2

Ooops, that was unexpected!

However, a quick online research shows that in order to compile Lua the dependency to the "readline" library has to be met.
Let's quickly resolve that.

$> sudo apt-get install libreadline-dev

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libtinfo-dev
Suggested packages:
readline-doc
The following NEW packages will be installed:
libreadline-dev libtinfo-dev
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 214 kB of archives.
After this operation, 1.134 kB of additional disk space will be used.
Do you want to continue? [J/n] J
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtinfo-dev amd64 6.1-1ubuntu1.18.04 [81,3 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libreadline-dev amd64 7.0-3 [133 kB]
Fetched 214 kB in 0s (557 kB/s)
Selecting previously unselected package libtinfo-dev:amd64.
(Reading database ... 354931 files and directories currently installed.)
Preparing to unpack .../libtinfo-dev_6.1-1ubuntu1.18.04_amd64.deb ...
Unpacking libtinfo-dev:amd64 (6.1-1ubuntu1.18.04) ...
Selecting previously unselected package libreadline-dev:amd64.
Preparing to unpack .../libreadline-dev_7.0-3_amd64.deb ...
Unpacking libreadline-dev:amd64 (7.0-3) ...
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Setting up libtinfo-dev:amd64 (6.1-1ubuntu1.18.04) ...
Setting up libreadline-dev:amd64 (7.0-3) ...

And try again ...

$> make linux

cd src && make linux
make[1]: Entering directory '/home/cschmidt/tmp/lua/lua-5.3.5/src'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[2]: Entering directory '/home/cschmidt/tmp/lua/lua-5.3.5/src'
gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lua.o lua.c
gcc -std=gnu99 -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline
gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o luac.o luac.c
gcc -std=gnu99 -o luac luac.o liblua.a -lm -Wl,-E -ldl -lreadline
make[2]: Leaving directory '/home/cschmidt/tmp/lua/lua-5.3.5/src'
make[1]: Leaving directory '/home/cschmidt/tmp/lua/lua-5.3.5/src'

Done.

In order to install everything system-wide, you can now type

$> sudo make linux install

But hold on!
Do we really want to pollute our system and install things system-wide without having the possibility to uninstall safely everything later?

What about just create a local install for the current user ...

$> make local

make install INSTALL_TOP=../install
make[1]: Entering directory '/home/cschmidt/tmp/lua/lua-5.3.5'
cd src && mkdir -p ../install/bin ../install/include ../install/lib ../install/man/man1 ../install/share/lua/5.3 ../install/lib/lua/5.3
cd src && install -p -m 0755 lua luac ../install/bin
cd src && install -p -m 0644 lua.h luaconf.h lualib.h lauxlib.h lua.hpp ../install/include
cd src && install -p -m 0644 liblua.a ../install/lib
cd doc && install -p -m 0644 lua.1 luac.1 ../install/man/man1

Let's see, what this did:

$> ls -la

drwxr-xr-x 5 cschmidt cschmidt 4096 Jun 19 21:43 .
drwxrwxr-x 3 cschmidt cschmidt 4096 Jun 19 21:35 ..
drwxr-xr-x 2 cschmidt cschmidt 4096 Jun 26 2018 doc
drwxrwxr-x 7 cschmidt cschmidt 4096 Jun 19 21:43install
-rw-r--r-- 1 cschmidt cschmidt 3273 Dez 20 2016 Makefile
-rw-r--r-- 1 cschmidt cschmidt 151 Jun 26 2018 README
drwxr-xr-x 2 cschmidt cschmidt 4096 Jun 19 21:40 src

$> ls -la install

drwxrwxr-x 7 cschmidt cschmidt 4096 Jun 19 21:43 .
drwxr-xr-x 57 cschmidt users 4096 Jun 20 20:59 ..
drwxrwxr-x 2 cschmidt cschmidt 4096 Jun 19 21:43 bin
drwxrwxr-x 2 cschmidt cschmidt 4096 Jun 19 21:43 include
drwxrwxr-x 3 cschmidt cschmidt 4096 Jun 19 21:43 lib
drwxrwxr-x 3 cschmidt cschmidt 4096 Jun 19 21:43 man
drwxrwxr-x 3 cschmidt cschmidt 4096 Jun 19 21:43 share

Fine, everything is build locally into a sub-folder "install". If we want to use this version, we can just move it to our home-account and expand the "PATH" environment variable by the location to the Lua interpreter binary:

$> mv install ~/lua
$> set PATH=$PATH:~/lua/bin

In order to add the binary path permanently after a new login, we need to edit the "PATH" variable in our ".bashrc" file as we already did in some of the other articles e.g. Linux Mint: Compile and install the Go compiler from source.

Anyway, this time we want to build a Debian installer package instead.

Build a Debian package to install


As we already know from the article about Linux Mint: Linux Mint: Build your own debian package of cmake, we can use "checkinstall":

$> sudo checkinstall --install=no

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.



*****************************************
**** Debian package creation selected ***
*****************************************

The configuration will look like something similar to

This package will be built according to these values:

0 - Maintainer: [ cschmidt@gimli ]
1 - Summary: [ Lua 5.3.0 private build ]
2 - Name: [ lua ]
3 - Version: [ 5.3.5 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ lua-5.3.5 ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ lua ]
12 - Conflicts: [ ]
13 - Replaces: [ ]

Enter a number to change any of them or press ENTER to continue:

so we adjust everything in order to our needs (for details see also the article Linux Mint: Linux Mint: Build your own debian package of cmake):

This package will be built according to these values:

0 - Maintainer: [ christianschmidt@hotmail.com ]
1 - Summary: [ Lua 5.3.0 private build ]
2 - Name: [ lua ]
3 - Version: [ 5.3.5 ]
4 - Release: [ 1 ]
5 - License: [ MIT ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ lua-5.3.5 ]
9 - Alternate source location: [ https://www.lua.org/ftp/lua-5.3.5.tar.gz ]
10 - Requires: [ ]
11 - Provides: [ lua ]
12 - Conflicts: [ ]
13 - Replaces: [ ]

Enter a number to change any of them or press ENTER to continue:

Now, we can hit "ENTER" to start the build process.

Installing with make install...

========================= Installation results ===========================
cd src && mkdir -p /usr/local/bin /usr/local/include /usr/local/lib /usr/local/man/man1 /usr/local/share/lua/5.3 /usr/local/lib/lua/5.3
cd src && install -p -m 0755 lua luac /usr/local/bin
cd src && install -p -m 0644 lua.h luaconf.h lualib.h lauxlib.h lua.hpp /usr/local/include
cd src && install -p -m 0644 liblua.a /usr/local/lib
cd doc && install -p -m 0644 lua.1 luac.1 /usr/local/man/man1

======================== Installation successful ==========================

Copying documentation directory...
./
./doc/
./doc/lua.css
./doc/contents.html
./doc/manual.css
./doc/luac.1
./doc/index.css
./doc/osi-certified-72x60.png
./doc/readme.html
./doc/lua.1
./doc/logo.gif
./doc/manual.html
./README

Copying files to the temporary directory...OK

Stripping ELF binaries and libraries...OK

Compressing man pages...OK

Building file list...OK

Building Debian package...OK

NOTE: The package will not be installed

Erasing temporary files...OK

Deleting temp dir...OK


**********************************************************************

Done. The new package has been saved to

/home/cschmidt/tmp/lua/lua-5.3.5/lua_5.3.5-1_amd64.deb
You can install it in your system anytime using:

dpkg -i lua_5.3.5-1_amd64.deb

**********************************************************************

Finished.

We now have a package "lua_5.3.5-1_amd64.deb" in the folder "~/tm/lua/lua-3.5.3" that we can e.g. double-click to install.

References:

  1. Lua homepage

Wednesday, June 20, 2018

Linux Mint: Build your own debian package of cmake

Objective


I wanted to use the newest available version of CMake (version 3.12.0-rc1) on Linux Mint 18.3 Sylvia.

Motivation


My company started using CMake as a Meta-Build-System in combination with Visual Studio 2017 in a brand new software project. Because of this fact, I had the opportunity, to attend a Modern CMake seminar at Eclipseina GmbH, covering most features of Modern CMake.
As Visual Studio 2017 comes with a CMake-component of version 3.10.0 already, I wanted at least to be able to use the same version of CMake on my Linux Mint 18.3 at home.
Modern CMake requires at least CMake version 3.x.

Unfortunately, the repository of Linux Mint 18.3 only supports a Debian package installer for CMake 3.5.1. The homepage of CMake at cmake.org only offers an install script, without uninstaller. I don't want to pollute my system with early access versions of software packages that I cannot clearly uninstall later.
In contrary, I wanted to be able to install and uninstall any version of CMake. Therefore I needed to build my own Debian install package (*.deb) for CMake.

Prerequisites



Solution


Install CMake locally


Open a terminal. Download and install the CMake installer script:

$> mkdir Downloads
$> cd Downloads
$> wget https://cmake.org/files/v3.12/cmake-3.12.0-rc1-Linux-x86_64.sh

you'll see some output like this:

--2018-06-19 22:58:04-- https://cmake.org/files/v3.12/cmake-3.12.0-rc1-Linux-x86_64.sh
Resolving cmake.org (cmake.org)... 66.194.253.19
Connecting to cmake.org (cmake.org)|66.194.253.19|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30260259 (29M) [text/x-sh]
Saving to: ‘cmake-3.12.0-rc1-Linux-x86_64.sh.1’

cmake-3.12.0-rc1-Linux-x86_64.sh 100%[==========================================================>] 28,86M 6,02MB/s in 5,3s

2018-06-19 22:58:10 (5,41 MB/s) - ‘cmake-3.12.0-rc1-Linux-x86_64.sh.1’ saved [30260259/30260259]

Now, set the executable flag for the downloaded script and start the temporary local install as normal user

$> chmod u+x cmake-3.12.0-rc1-Linux-x86_64.sh
$> ./cmake-3.12.0-rc1-Linux-x86_64.sh

CMake Installer Version: 3.12.0-rc1, Copyright (c) Kitware
This is a self-extracting archive.
The archive will be extracted to: /home/cschmidt/Downloads

If you want to stop extracting, please press .
CMake - Cross Platform Makefile Generator
Copyright 2000-2018 Kitware, Inc. and Contributors
All rights reserved.

[...]
Do you accept the license? [yN]:

Accept the license, by typing 'y'.

By default the CMake will be installed in:
"/home/cschmidt/Downloads/cmake-3.12.0-rc1-Linux-x86_64"
Do you want to include the subdirectory cmake-3.12.0-rc1-Linux-x86_64?
Saying no will install in: "/home/cschmidt/Downloads" [Yn]:

Accept the default path, by typing 'Y'.

Using target directory: /home/cschmidt/Downloads/cmake-3.12.0-rc1-Linux-x86_64
Extracting, please wait...

Unpacking finished successfully

To be able to use the locally installed CMake, you must add it's binary directory to your environment path:
(Of course, you must use the path from above that reflects your install directory and add a "/bin" path-component here)

$> PATH=$PATH:/home/cschmidt/Downloads/cmake-3.12.0-rc1-Linux-x86_64/bin

Download and extract the CMake source package


$> wget https://cmake.org/files/v3.12/cmake-3.12.0-rc1.tar.gz

--2018-06-19 23:15:38-- https://cmake.org/files/v3.12/cmake-3.12.0-rc1.tar.gz
Resolving cmake.org (cmake.org)... 66.194.253.19
Connecting to cmake.org (cmake.org)|66.194.253.19|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8089283 (7,7M) [application/x-gzip]
Saving to: ‘cmake-3.12.0-rc1.tar.gz.1’

cmake-3.12.0-rc1.tar.gz.1 100%[==========================================================>] 7,71M 3,46MB/s in 2,2s

2018-06-19 23:15:42 (3,46 MB/s) - ‘cmake-3.12.0-rc1.tar.gz.1’ saved [8089283/8089283]

Extract the source tar-gz package:

$> tar -xvzf cmake-3.12.0-rc1.tar.gz
cmake-3.12.0-rc1/.clang-format
cmake-3.12.0-rc1/.clang-tidy
cmake-3.12.0-rc1/Auxiliary/
cmake-3.12.0-rc1/Auxiliary/bash-completion/
cmake-3.12.0-rc1/Auxiliary/bash-completion/cmake
cmake-3.12.0-rc1/Auxiliary/bash-completion/CMakeLists.txt
[...]
cmake-3.12.0-rc1/Utilities/Sphinx/static/cmake-favicon.ico
cmake-3.12.0-rc1/Utilities/Sphinx/static/cmake-logo-16.png
cmake-3.12.0-rc1/Utilities/Sphinx/static/cmake.css
cmake-3.12.0-rc1/Utilities/Sphinx/templates/
cmake-3.12.0-rc1/Utilities/Sphinx/templates/layout.html

Compile CMake from source using your temporary CMake installation


$> cd cmake-3.12.0-rc1
$> mkdir build
$> cd build/
$> cmake ..

CMake does some checks of your system and builds the binaries from source, which takes a while ...

-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
[...]
-- Performing Test run_inlines_hidden_test
-- Performing Test run_inlines_hidden_test - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cschmidt/Downloads/cmake-3.12.0-rc1/build
cschmidt@gimli:~/Downloads/cmake-3.12.0-rc1/build$ make
Scanning dependencies of target cmsys_c
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/ProcessUNIX.c.o
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/Base64.c.o
[...]
[ 1%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/String.c.o
[ 1%] Linking C static library libcmsys_c.a
[...]
Scanning dependencies of target foo
[100%] Building CXX object Tests/FindPackageModeMakefileTest/CMakeFiles/foo.dir/foo.cpp.o
[100%] Linking CXX static library libfoo.a
[100%] Built target foo

Build the Debian package (*.deb)


If checkinstall is not installed on your machine, you can install it via:

$> sudo apt-get install checkinstall

On mine, it's already available, therefore...

Reading package lists... Done
Building dependency tree
Reading state information... Done
checkinstall is already the newest version (1.6.2-4ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Normally checkinstall needs to be run as root and does not only build the package, but also install the software.
To just build the package, without root privileges and without automatically installing it, we have to run checkinstall using fakeroot.

$> fakeroot checkinstall --install=no --fstrans=yes

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.


The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y

Confirm the question with 'y'.

Preparing package documentation...OK

*** No known documentation files were found. The new package
*** won't include a documentation directory.

*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values:

0 - Maintainer: [ cschmidt@gimli ]
1 - Summary: [ CMake Release Candidate (3.12.0-rc1) ]
2 - Name: [ build ]
3 - Version: [ 20180618 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ build ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ build ]
12 - Conflicts: [ ]
13 - Replaces: [ ]

Now you have the opportunity to change some meta-data, e.g. name and URL:

Enter a number to change any of them or press ENTER to continue: 0
Enter the maintainer's name and e-mail address:
>> cwschmidt

Enter a number to change any of them or press ENTER to continue: 9
Enter the alternate source location:
>> https://cmake.org/files/v3.12/cmake-3.12.0-rc1.tar.gz

This package will be built according to these values:

0 - Maintainer: [ cwschmidt ]
1 - Summary: [ CMake Release Candidate (3.12.0-rc1) ]
2 - Name: [ build ]
3 - Version: [ 20180618 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ build ]
9 - Alternate source location: [ https://cmake.org/files/v3.12/cmake-3.12.0-rc1.tar.gz ]
10 - Requires: [ ]
11 - Provides: [ build ]
12 - Conflicts: [ ]
13 - Replaces: [ ]

Enter a number to change any of them or press ENTER to continue:

Finally, press Enter to continue

Installing with make install...

========================= Installation results ===========================
[ 1%] Built target cmsys_c
[ 2%] Built target cmsysTestsC
[ 4%] Built target cmsys
[...]
[100%] Built target pseudo_tidy
[100%] Built target pseudo_cppcheck
[100%] Built target foo
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/doc/cmake-3.12/Copyright.txt
-- Installing: /usr/local/share/cmake-3.12/Help
-- Installing: /usr/local/share/cmake-3.12/Help/prop_dir
-- Installing: /usr/local/share/cmake-3.12/Help/prop_dir/VS_GLOBAL_SECTION_PRE_section.rst
[...]
-- Installing: /usr/local/share/cmake-3.12/Modules
-- Installing: /usr/local/share/cmake-3.12/Modules/FindCurses.cmake
-- Installing: /usr/local/share/cmake-3.12/Modules/FindWget.cmake
-- Installing: /usr/local/share/cmake-3.12/Modules/FindAVIFile.cmake
[...]
-- Installing: /usr/local/bin/cmake
-- Installing: /usr/local/bin/ctest
-- Installing: /usr/local/bin/cpack
[...]
-- Installing: /usr/local/share/cmake-3.12/completions/cmake
-- Installing: /usr/local/share/cmake-3.12/completions/cpack
-- Installing: /usr/local/share/cmake-3.12/completions/ctest

======================== Installation successful ==========================

Some of the files created by the installation are inside the home directory: /home

You probably don't want them to be included in the package.
Do you want me to list them? [n]: y
Should I exclude them from the package? (Saying yes is a good idea) [n]: y

You were ask, to exclude the files that were placed in your home-directory.
To inspect the list, answer the first question with 'y'.
Answer the second question to exclude the files in the home-directory with 'y'.

Copying files to the temporary directory...OK

Stripping ELF binaries and libraries...OK

Compressing man pages...OK

Building file list...OK

Building Debian package...OK

NOTE: The package will not be installed

Erasing temporary files...OK

Writing backup package...OK
OK

Deleting temp dir...OK


**********************************************************************

Done. The new package has been saved to

/home/cschmidt/Downloads/cmake-3.12.0-rc1/build/build_20180618-1_amd64.deb
You can install it in your system anytime using:

dpkg -i build_20180618-1_amd64.deb

**********************************************************************

Finished. You can install the newly created package, by typing

$> sudo dpkg -i build_20180618-1_amd64.deb

or with your debian package manager with a double-click on the file "build_20180618-1_amd64.deb".

References:

  1. cmake.org
  2. How do I install the latest version of cmake from the command line?
  3. checkinstall source code inside home directory