build: cleanup RPM build rules in CMake
ignore for some Centos system dirs
CPACK_RPM_PACKAGE_RELEASE = CPACK_PACKAGE_RELEASE
@@ -596,6 +596,7 @@ set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/td-agent-bit")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")
set(CPACK_RPM_PACKAGE_GROUP "System Environment/Daemons")
set(CPACK_RPM_PACKAGE_LICENSE "Apache v2.0")
+set(CPACK_RPM_PACKAGE_RELEASE ${CPACK_PACKAGE_RELEASE})
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/cpack/description")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Fast data collector for Linux")
set(CPACK_RPM_SPEC_MORE_DEFINE "%define ignore \#")
@@ -605,6 +606,8 @@ set(CPACK_RPM_USER_FILELIST
"%ignore /lib/systemd/system"
"%ignore /lib64"
"%ignore /lib64/pkgconfig"
+ "%ignore /usr/local"
+ "%ignore /usr/local/bin"
"%ignore /opt"
"%ignore /etc")
set(CPACK_PACKAGING_INSTALL_PREFIX "/")
