From 900ec3ca37afc4cf7a70fef589cec508738e2adc Mon Sep 17 00:00:00 2001 From: hwspeedy Date: Sat, 2 Mar 2024 01:54:17 +0100 Subject: PACKAGING added distro maintainer - see README.md - Distro building --- CMakeLists.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a94fe5fa..bfeacf29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,10 +7,12 @@ set(HARDINFO2_VERSION "2.0.10") 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) +set(DISTRO "" CACHE STRING "Distro build version eg. 1.el(rpm) or 1(deb)") +set(MAINTAINER "" CACHE STRING "Distro maintainer 'name '") +#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") -set(DISTRO "" CACHE STRING "Distro build version eg. 1.el(rpm) or 1(deb)") SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(GNUInstallDirs) @@ -114,13 +116,21 @@ endif() set(PACKAGE_DISTRO ${HARDINFO2_VERSION}-${distro}-${disversion}${CPACK_SYSTEM_NAME}) SET(CPACK_PACKAGE_VERSION ${HARDINFO2_VERSION}) if(DISTRO) + message("-- DISTRO BUILD") string(REGEX REPLACE "[.].*" "" DISTRO_BUILD_VER ${DISTRO}) set(CPACK_PACKAGE_VERSION "${HARDINFO2_VERSION}-${DISTRO_BUILD_VER}") set(PACKAGE_DISTRO "${HARDINFO2_VERSION}-${DISTRO}") if(${HARDINFO2_GTK3}) else() - message(FATAL_ERROR "Distro-Building not supported with GTK2!!") + message(FATAL_ERROR "Distro-Building not supported with GTK2!!") endif() + if(MAINTAINER) + set(PACKAGE_MAINTAINER ${MAINTAINER}) + else() + set(PACKAGE_MAINTAINER "hwspeedy ") + endif() +else() + set(PACKAGE_MAINTAINER "hwspeedy ") endif() #Put it together string(REPLACE " " "_" CPACK_PACKAGE_FILE_NAME "hardinfo${PACKAGE_DELIMITER}${PACKAGE_DISTRO}${PACKAGE_ARCHITECTURE}") @@ -522,7 +532,7 @@ else() endif() #RPM -SET(CPACK_RPM_PACKAGE_MAINTAINER "hwspeedy ") +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_RECOMMENDS "sysbench, udisks2, mesa-utils, lsscsi, lm-sensors, xdg-utils, iperf3") SET(CPACK_RPM_PACKAGE_LICENSE "GPL2+") @@ -540,7 +550,7 @@ 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_MAINTAINER "hwspeedy ") +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_RECOMMENDS "sysbench, udisks2, mesa-utils, lsscsi, lm-sensors, xdg-utils, iperf3") SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/hardinfo2/hardinfo2") -- cgit v1.2.3