The following script is meant to be used to create a debian package out of a CMake project well defined
GNU nano 2.9.3 build_deb_from_cmake.sh Modified
export DEBMAIL="your@amazing-email.com"
export DEBFULLNAME="Ignacio Ricart"
export DEB_BUILD_OPTIONS=nocheck
export DEB_CFLAGS_MAINT_APPEND="-Wno-sizeof-pointer-memaccess -Wno-stringop-truncation"
#### Go to the source folder or build folder and execute the following #####
dh_make -p packgae-name_version --createorig -s -y
# Attention to the name (package-name-always-with-hifen_VERSION_WITH_UNDERSCORE)
#### modify your debian rule file at debian/rule
# ATTENTION TO THE TAB instead of SPACE
#%:
# dh $@
#override_dh_usrlocal:
# dh $@
#
#override_dh_shlibdeps:
# dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
### Now build your deb package as follows
dpkg-buildpackage -b -uc
## your debian package is the folder ../
## Install your deb file if it fails due to dependency issues
sudo apt install -yy -o Dpkg::Options::="--force-overwrite" ../your-deb-file.deb
In case of TAB error, the following message will be shown
debian/rules:24: *** missing separator (did you mean TAB instead of 8 spaces?). Stop. dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2