I have a fairly complicated project that builds using CMake. The project uses CPack to generate .deb packages. When I just build the project with make
(i.e. not building a .deb) a clean build takes roughly 2 minutes. However when I build a package using make package
the build takes roughly 12 minutes, with most of the the extra 10 minutes spent during CPack: - Run preinstall target for...
.
Building a .deb "manually" using dpkg-deb
takes a couple seconds at most, so I'm wondering what CPack is doing when it's running the preinstall target.
I'm not necessarily interested in why it takes a long for my project specifically. I'm more curious about how the preinstall target fits into CPack's process of building a Debian package and how CPack chooses what actions will be taken when running the preinstall target.