diff options
author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 19:04:44 -0300 |
---|---|---|
committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 19:04:44 -0300 |
commit | 92787ae0c9bb15c7841d10654ef7a2e595664d99 (patch) | |
tree | 15450b2b4454094fc8571ae4932310a229e7519d /CMakeLists.txt | |
parent | 522813da585389c158c6a84e688bc9f53daea38d (diff) |
New upstream version 2.0.14preupstream/2.0.14pre
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 28182192..66e094f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,14 +2,14 @@ cmake_minimum_required(VERSION 3.0.0) cmake_policy(VERSION 3.0.0) project(hardinfo2) -set(HARDINFO2_VERSION "2.0.12") +set(HARDINFO2_VERSION "2.0.14") option(HARDINFO2_GTK3 "Build for GTK3 (0/off for GTK2)" 1) option(HARDINFO2_LIBSOUP3 "Build for libsoup-3.0(EXPERIMENTAL) (0/off for libsoup-2.4)" 0) +#old/unused deprecated - lets us know if anyone uses these below set(DISTRO "" CACHE STRING "Distro build version eg. 1.el(rpm) or 1(deb)") set(MAINTAINER "" CACHE STRING "Distro maintainer 'name <email>'") -#old/unused deprecated - lets us know if anyone uses these below set(OVRARCH "" CACHE STRING "Override HARDINFO2_ARCH value") set(OVRCPUINFO "" CACHE STRING "Specify a different file for /proc/cpuinfo") set(OVRDTRROOT "" CACHE STRING "Specify a different path for /proc/device-tree") @@ -85,7 +85,6 @@ set(PACKAGE_LIBGLIB2_MINVERSION 2.24) ###################################DISTRO CHANGES############################### #Please add all distro relates stuff here -SET(PACKAGE_MANPAGES 1) set(RPM 0) file(STRINGS /etc/os-release distro REGEX "^NAME=") string(REGEX REPLACE "NAME=" "" distro "${distro}") @@ -120,6 +119,11 @@ if(DISTRO) string(REGEX REPLACE "[.].*" "" DISTRO_BUILD_VER ${DISTRO}) set(CPACK_PACKAGE_VERSION "${HARDINFO2_VERSION}-${DISTRO_BUILD_VER}") set(PACKAGE_DISTRO "${HARDINFO2_VERSION}-${DISTRO}") + if(${DISTRO_BUILD_VER} MATCHES "src") + SET(CPACK_RPM_USER_BINARY_SPECFILE "hardinfo2.spec") + set(CPACK_PACKAGE_VERSION "${HARDINFO2_VERSION}") + set(PACKAGE_DISTRO "${HARDINFO2_VERSION}") + endif() if(${HARDINFO2_GTK3}) else() message(FATAL_ERROR "Distro-Building not supported with GTK2!!") @@ -133,11 +137,11 @@ else() set(PACKAGE_MAINTAINER "hwspeedy <hardinfo2@bigbear.dk>") endif() #Put it together -string(REPLACE " " "_" CPACK_PACKAGE_FILE_NAME "hardinfo${PACKAGE_DELIMITER}${PACKAGE_DISTRO}${PACKAGE_ARCHITECTURE}") +string(REPLACE " " "${PACKAGE_DELIMITER}" CPACK_PACKAGE_FILE_NAME "hardinfo2${PACKAGE_DELIMITER}${PACKAGE_DISTRO}${PACKAGE_ARCHITECTURE}") if(${RPM}) - string(REPLACE " " "_" CPACK_SOURCE_PACKAGE_FILE_NAME "hardinfo${PACKAGE_DELIMITER}${HARDINFO2_VERSION}.src") + string(REPLACE " " "-" CPACK_SOURCE_PACKAGE_FILE_NAME "hardinfo2-${PACKAGE_DISTRO}") else() - string(REPLACE " " "_" CPACK_SOURCE_PACKAGE_FILE_NAME "hardinfo-${HARDINFO2_VERSION}") + string(REPLACE " " "_" CPACK_SOURCE_PACKAGE_FILE_NAME "hardinfo2-${HARDINFO2_VERSION}") endif() message("-- Found Package Target ${CPACK_PACKAGE_FILE_NAME}") message("-- Found Package Version ${CPACK_PACKAGE_VERSION}") @@ -181,10 +185,7 @@ if(${distro}${disversion} MATCHES "DebianGNULinux11") set(HARDINFO2_LIBSOUP3 0) endif() -#Fedora 39 - bug with man pages - probably needs upgrade.. -if(${distro}${disversion} MATCHES "FedoraLinux39") - set(PACKAGE_MANPAGES 0) -endif() +#Fedora 39 - bug with man pages - upgrade cmake to 3.28.x ################################################################################ if(${CMAKE_BUILD_TYPE} MATCHES [Dd]ebug) @@ -258,11 +259,9 @@ set(HARDINFO2_RESOURCES "data/pci.ids" "data/kernel-module-icons.json" ) -if(${PACKAGE_MANPAGES}) set(HARDINFO2_MANPAGES "hardinfo2.1" ) -endif() set(MODULE_computer_SOURCES modules/computer.c modules/computer/alsa.c @@ -525,28 +524,29 @@ install(FILES pixmaps/hardinfo2.png ########################PACKAGE BUILDING FOR DISTROS########################### #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_PACKAGING_INSTALL_PREFIX "/usr") + SET(CPACK_SOURCE_IGNORE_FILES "/build/;/.git/;/.github/;.gitignore;.gitmodules;*.po.old;*~;*.mo;") + SET(CPACK_SOURCE_GENERATOR "RPM;TGZ") 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_SOURCE_GENERATOR "DEB;TGZ") SET(CPACK_GENERATOR "DEB") SET(PACKAGE_GTK2 "libgtk2.0-0") endif() #RPM +SET(CPACK_RPM_PACKAGE_OBSOLETES "hardinfo") SET(CPACK_RPM_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER}) -SET(CPACK_RPM_PACKAGE_DESCRIPTION "Hardinfo2 is a small application that displays information about your hardware and operating system. It has online benchmarking to check your machine performance against other machines.") +SET(CPACK_RPM_PACKAGE_DESCRIPTION "Hardinfo2 - System Information and Benchmark") SET(CPACK_RPM_PACKAGE_RECOMMENDS "sysbench, udisks2, mesa-utils, lsscsi, lm-sensors, xdg-utils, iperf3") SET(CPACK_RPM_PACKAGE_LICENSE "GPL2+") SET(CPACK_RPM_PACKAGE_HOMEPAGE "https://github.com/hardinfo2/hardinfo2") +SET(CPACK_RPM_PACKAGE_URL "https://www.hardinfo2.org") +#SET(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS "-DDISTRO=1") if(HARDINFO2_LIBSOUP3) SET(PACKAGE_LS "libsoup (>=3.0)") else() @@ -560,8 +560,10 @@ endif() SET(CPACK_RPM_PACKAGE_DEPENDS "libjson-glib-1.0-0, zlib, ${PACKAGE_LS}, ${PACKAGE_GTK}, libglib2.0-0 (>=2.10)") #DEB +SET(CPACK_DEBIAN_PACKAGE_REPLACES "hardinfo") +SET(CPACK_DEBIAN_PACKAGE_BREAKS "hardinfo") SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER}) -SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Hardinfo2 is a small application that displays information about your hardware and operating system. It has online benchmarking to check your machine performance against other machines.") +SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Hardinfo2 - System Information and Benchmark") SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "sysbench, udisks2, mesa-utils, lsscsi, lm-sensors, xdg-utils, iperf3") SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/hardinfo2/hardinfo2") if(HARDINFO2_LIBSOUP3) |