Relative Content

Tag Archive for cmakepackagingdebcpackdebian-packaging

How to use CMake / CPack to add a conffile to a deb package? With CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA?

I am developing a C/C++ package, built using CMake, and I want to package it for Debian. So I thought I’d use CPack to build a Debian package. I managed to do so, but my project should also contain configuration files, that should not be overwritten by package upgrades. IIUC, that’s what Debian conffiles are for, but I can’t figure out how to use CMake to insert them. Right now, it installs the files under /etc/myproject, but they get overwritten even if the info I found online seems to suggest that everything under /etc should be treated as a conffile. I also found that CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA may help me, but I can’t figure out how should I use it. So, how can I instruct CMake/CPack to install conffiles?