From 1ababda27ac03e3b9ad8aeb824658936df68d8c5 Mon Sep 17 00:00:00 2001 From: hwspeedy Date: Sun, 3 Mar 2024 05:33:32 +0100 Subject: PACKAGING - debian/redhat source package fixing - add script to create debian source package tools/create_debian_source.sh --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ee5c461..28182192 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,6 +134,11 @@ else() endif() #Put it together string(REPLACE " " "_" CPACK_PACKAGE_FILE_NAME "hardinfo${PACKAGE_DELIMITER}${PACKAGE_DISTRO}${PACKAGE_ARCHITECTURE}") +if(${RPM}) + string(REPLACE " " "_" CPACK_SOURCE_PACKAGE_FILE_NAME "hardinfo${PACKAGE_DELIMITER}${HARDINFO2_VERSION}.src") +else() + string(REPLACE " " "_" CPACK_SOURCE_PACKAGE_FILE_NAME "hardinfo-${HARDINFO2_VERSION}") +endif() message("-- Found Package Target ${CPACK_PACKAGE_FILE_NAME}") message("-- Found Package Version ${CPACK_PACKAGE_VERSION}") @@ -522,11 +527,16 @@ install(FILES pixmaps/hardinfo2.png #Please update here for building packages #keep package name as hardinfo to allow for upgrading in distro SET(CPACK_PACKAGE_NAME "hardinfo") +SET(CPACK_SOURCE_PACKAGE_NAME "hardinfo") SET(CPACK_PACKAGE_HOMEPAGE_URL "https://www.hardinfo2.org") if(${RPM}) + SET(CPACK_SOURCE_IGNORE_FILES "/build/;/.git/;/.github/;.gitignore;.gitmodules;*.po.old;*~;*.mo;*.dsc;/debian/") + SET(CPACK_SOURCE_GENERATOR "RPM") SET(CPACK_GENERATOR "RPM") SET(PACKAGE_GTK2 "libgtk-2-0") else() + SET(CPACK_SOURCE_IGNORE_FILES "/build/;/.git/;/.github/;.gitignore;.gitmodules;*.po.old;*~;*.mo") + SET(CPACK_SOURCE_GENERATOR "TGZ") SET(CPACK_GENERATOR "DEB") SET(PACKAGE_GTK2 "libgtk2.0-0") endif() -- cgit v1.2.3