aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorhwspeedy <ns@bigbear.dk>2024-03-02 01:54:17 +0100
committerhwspeedy <ns@bigbear.dk>2024-03-02 01:54:17 +0100
commit900ec3ca37afc4cf7a70fef589cec508738e2adc (patch)
treefaea6035b8c40ce19ee5f21c15c1ef7f594bf856 /CMakeLists.txt
parent0ca6127eaef7bbb0f2b66742009ec22b979196cd (diff)
PACKAGING added distro maintainer - see README.md - Distro building
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 14 insertions, 4 deletions
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 <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")
-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 <hardinfo2@bigbear.dk>")
+ endif()
+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}")
@@ -522,7 +532,7 @@ else()
endif()
#RPM
-SET(CPACK_RPM_PACKAGE_MAINTAINER "hwspeedy <hardinfo2@bigbear.dk>")
+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 <hardinfo2@bigbear.dk>")
+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")