Using the latest cmake
:
$ cmake --version
cmake version 3.18.20200707-gee781ac
CMake suite maintained and supported by Kitware (kitware.com/cmake).
cmake
ing the cmake
project from git clone https://gitlab.kitware.com/cmake/cmake.git
starting with:
cd cmake
mkdir cmake-build && cd cmake-build
cmake .. -G Ninja -DSPHINX_MAN=ON -DSPHINX_HTML=ON -DCPACK_RPM_PACKAGE_RELEASE_DIST=ON -DCPACK_RPM_FILE_NAME=RPM-DEFAULT -DCPACK_BINARY_RPM=ON -DCPACK_RPM_PACKAGE_RELEASE_DIST=1 -DCPACK_PACKAGING_INSTALL_PREFIX=/usr/local -DCPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST="$(for dir in $(rpm -ql filesystem) ; do [[ -d $dir ]] && echo -n $dir "" ; done)" -DCMAKE_INSTALL_PREFIX=/usr/local
CPackConfig.cmake
seems OK with a giant set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST "/ /bin /boot ... /var/yp")
line. Or maybe there should be no "
?
ninja package
completes without error, but rpm -qlp cmake-3.18.20200707_gee781ac-1.fc29.x86_64.rpm
shows, among lots of other stuff,
...
/usr/local
/usr/local/bin
...
/usr/local/doc
...
… and lots of other directories that should have been excluded.
cmake-build/_CPack_Packages/Linux-x86_64/RPM/SPECS/cmake.spec
shows, in part,
...
%dir "/usr/local"
%dir "/usr/local/bin"
...
%dir "/usr/local/doc"
...
How can I cpack
a RPM and exclude these directories?