|
1 | 1 | cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url |
2 | 2 |
|
3 | 3 | project(fastfetch |
4 | | - VERSION 2.11.3 |
| 4 | + VERSION 2.11.4 |
5 | 5 | LANGUAGES C |
6 | 6 | DESCRIPTION "Fast neofetch-like system information tool" |
7 | 7 | HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch" |
@@ -80,6 +80,7 @@ option(IS_MUSL "Build with musl libc" OFF) # Used by Github Actions |
80 | 80 | if (LINUX) |
81 | 81 | set(CUSTOM_PCI_IDS_PATH "" CACHE STRING "Custom path to file pci.ids, defaults to `/usr/share/hwdata/pci.ids`") |
82 | 82 | set(CUSTOM_AMDGPU_IDS_PATH "" CACHE STRING "Custom path to file amdgpu.ids, defaults to `/usr/share/libdrm/amdgpu.ids`") |
| 83 | + set(CUSTOM_OS_RELEASE_PATH "" CACHE STRING "Custom path to file os-release, defaults to `/etc/os-release`") |
83 | 84 | endif() |
84 | 85 |
|
85 | 86 | #################### |
@@ -789,6 +790,10 @@ if(NOT "${CUSTOM_AMDGPU_IDS_PATH}" STREQUAL "") |
789 | 790 | message(STATUS "Custom file path of amdgpu.ids: ${CUSTOM_AMDGPU_IDS_PATH}") |
790 | 791 | target_compile_definitions(libfastfetch PRIVATE FF_CUSTOM_AMDGPU_IDS_PATH=${CUSTOM_AMDGPU_IDS_PATH}) |
791 | 792 | endif() |
| 793 | +if(NOT "${CUSTOM_OS_RELEASE_PATH}" STREQUAL "") |
| 794 | + message(STATUS "Custom file path of os_release: ${CUSTOM_OS_RELEASE_PATH}") |
| 795 | + target_compile_definitions(libfastfetch PRIVATE FF_CUSTOM_OS_RELEASE_PATH=${CUSTOM_OS_RELEASE_PATH}) |
| 796 | +endif() |
792 | 797 |
|
793 | 798 | function(ff_lib_enable VARNAME PKGCONFIG_NAMES CMAKE_NAME) |
794 | 799 | if(NOT ENABLE_${VARNAME}) |
@@ -1153,7 +1158,15 @@ if(LINUX) |
1153 | 1158 |
|
1154 | 1159 | set(CPACK_DEBIAN_PACKAGE_SECTION, "utils") |
1155 | 1160 | set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") |
1156 | | - set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6") |
| 1161 | + |
| 1162 | + if(NOT IS_MUSL) |
| 1163 | + EXECUTE_PROCESS ( |
| 1164 | + COMMAND getconf GNU_LIBC_VERSION |
| 1165 | + OUTPUT_VARIABLE GLIBC_VERSION |
| 1166 | + OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 1167 | + STRING (REPLACE "glibc " "" GLIBC_VERSION ${GLIBC_VERSION}) |
| 1168 | + set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= ${GLIBC_VERSION})") |
| 1169 | + endif() |
1157 | 1170 | endif() |
1158 | 1171 |
|
1159 | 1172 | find_program(HAVE_RPMBUILD "rpmbuild") |
|
0 commit comments