-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPL2+ LICENSE change and MAINTAINER change #710
Open
hwspeedy
wants to merge
10
commits into
lpereira:master
Choose a base branch
from
hwspeedy:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d511b67
LICENSE changed to GPL2+ for project and source code
hwspeedy 5525512
MAINTAINER CHANGE - Updated README.md
hwspeedy 8c8d672
Added Workflow test.yml build for README.md page
hwspeedy 2e8fbe6
FIX GTK3 now working, Package system implemented (WIP)
hwspeedy d338694
FIX workflow line breaks
hwspeedy dcb9ba3
Workflow - updated to v4
hwspeedy 196bf90
Workflow - Updated codeql v4 and GTK3 - GTK2 is removed on buildserver
hwspeedy d144f90
Merge branch 'master' of https://github.com/hwspeedy/hardinfo
hwspeedy aeacb71
FIX removed E2K due to missing answer on license change
hwspeedy 6d9608d
LICENSE - Reverted LGPL 2.1 file.
hwspeedy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. | ||
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | ||
# You can convert this to a matrix build if you need cross-platform coverage. | ||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install system dependencies | ||
run: sudo apt install libjson-glib-dev zlib1g-dev libsoup2.4-dev libgtk-3-dev libglib2.0-dev gettext | ||
|
||
- name: Configure CMake | ||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
|
||
- name: Build | ||
# Build your program with the given configuration | ||
run: cmake --build ${{github.workspace}}/build | ||
#--target hardinfo | ||
|
||
#--config ${{env.BUILD_TYPE}} | ||
|
||
#- name: Test | ||
# working-directory: ${{github.workspace}}/build | ||
# # Execute tests defined by the CMake configuration. | ||
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
# run: ctest -C ${{env.BUILD_TYPE}} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
project(HardInfo) | ||
cmake_minimum_required(VERSION 2.6) | ||
cmake_policy(VERSION 2.6) | ||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_policy(VERSION 2.8.12) | ||
project(hardinfo) | ||
|
||
set(HARDINFO_VERSION "1.0.1") | ||
|
||
option(HARDINFO_GTK3 "Build for GTK3 (0/off for GTK2)" 1) | ||
option(HARDINFO_LIBSOUP3 "Build for libsoup-3.0(EXPERIMENTAL) (0/off for libsoup-2.4)" 0) | ||
|
||
set(HARDINFO_VERSION "0.6-alpha") | ||
option(HARDINFO_GTK3 "Attempt to build for GTK3 (0/off for GTK2)" 0) | ||
set(OVRARCH "" CACHE STRING "Override HARDINFO_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( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ) | ||
set(OVRPACKAGE_FILENAME "" CACHE STRING "Override package filename") | ||
|
||
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
include(GNUInstallDirs) | ||
|
||
if(${CMAKE_BUILD_TYPE} MATCHES [Dd]ebug) | ||
|
@@ -51,8 +56,6 @@ elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "sh[3-5]") | |
set(HARDINFO_ARCH "sh") | ||
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "(riscv|riscv32|riscv64)") | ||
set(HARDINFO_ARCH "riscv") | ||
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "e2k") | ||
set(HARDINFO_ARCH "e2k") | ||
else() | ||
message(FATAL_ERROR "Unsupported architecture: ${CMAKE_HOST_SYSTEM_PROCESSOR}") | ||
endif() | ||
|
@@ -74,25 +77,90 @@ message(STATUS "LOCALEDIR = ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LOCALEDIR}") | |
message(STATUS "Building HardInfo for architecture: ${HARDINFO_OS}-${HARDINFO_ARCH}") | ||
|
||
add_definitions("-std=gnu89") | ||
add_definitions("-Wno-deprecated-declarations") | ||
#add_definitions("-Wno-deprecated-declarations") | ||
#add_definitions("-Wextra") | ||
#add_definitions("-Wno-missing-field-initializers") | ||
add_definitions("-Wformat") | ||
add_definitions("-Wformat-security") | ||
|
||
set(PACKAGE_LIBSOUP2_MINVERSION 2.42) | ||
#Actually needed for save settings, steal_pointer - FIXME | ||
set(PACKAGE_LIBGLIB2_MINVERSION 2.44) | ||
#set(PACKAGE_LIBGLIB2_MINVERSION 2.28) | ||
|
||
###################################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}") | ||
string(REGEX REPLACE "\"" "" distro "${distro}") | ||
file(STRINGS /etc/os-release disversion REGEX "^VERSION_ID=") | ||
string(REGEX REPLACE "VERSION_ID=" "" disversion "${disversion}") | ||
string(REGEX REPLACE "\"" "" disversion "${disversion}") | ||
string(REPLACE "/" "_" CPACK_SYSTEM_NAME ${distro}-${disversion}.${CMAKE_HOST_SYSTEM_PROCESSOR}) | ||
string(REPLACE " " "_" CPACK_SYSTEM_NAME ${CPACK_SYSTEM_NAME}) | ||
message("-- Found Package Target ${CPACK_SYSTEM_NAME}") | ||
if(OVRPACKAGE_FILENAME) | ||
set(CPACK_SYSTEM_NAME ${OVRPACKAGE_FILENAME}) | ||
endif() | ||
|
||
#flavour output | ||
set(HARDINFO_OS ${distro}) | ||
|
||
# currently all RPM flavours uses libsoup-2.4 | ||
if(${distro} MATCHES "Alma*" OR ${distro} MATCHES "Rocky*" OR ${distro} MATCHES "Fedora*" OR ${distro} MATCHES "Red*" OR ${distro} MATCHES "CentOS*" OR ${distro} MATCHES "Oracle*") | ||
set(RPM 1) | ||
set(HARDINFO_LIBSOUP3 0) | ||
endif() | ||
|
||
#oracle 6 | ||
if(${distro}${disversion} MATCHES "Oracle6*") | ||
set(HARDINFO_LIBSOUP3 0) | ||
set(HARDINFO_GTK3 0) | ||
#old deprecated version - but ok | ||
set(PACKAGE_LIBSOUP2_MINVERSION 2.34.3) | ||
#save settings disabled, steal_pointer disabled | ||
set(PACKAGE_LIBGLIB2_MINVERSION 2.28.8) | ||
message("-- Low GLIB2 version 2.28.0 - FIXME") | ||
endif() | ||
|
||
#ubuntu 20.04 | ||
if(${distro}${disversion} MATCHES "Ubuntu20.04") | ||
set(HARDINFO_LIBSOUP3 0) | ||
endif() | ||
|
||
#Debian 11 | ||
if(${distro}${disversion} MATCHES "Debian GNU/Linux11") | ||
set(HARDINFO_LIBSOUP3 0) | ||
endif() | ||
|
||
#Fedora 39 - bug with man pages - probably needs upgrade.. | ||
if(${distro}${disversion} MATCHES "Fedora Linux39") | ||
set(PACKAGE_MANPAGES 0) | ||
endif() | ||
|
||
################################################################################ | ||
add_subdirectory(po) | ||
|
||
|
||
include(FindPkgConfig) | ||
if (HARDINFO_GTK3) | ||
message(STATUS "Building for GTK3 (experimental!)") | ||
pkg_check_modules(GTK REQUIRED gtk+-3.0>=3.0 cairo>=1.0 cairo-png>=1.0 glib-2.0>=2.10 gthread-2.0>=2.10 gmodule-export-2.0>=2.10) | ||
add_definitions(-DGTK_DISABLE_SINGLE_INCLUDES) | ||
message(STATUS "Building for GTK3") | ||
pkg_check_modules(GTK REQUIRED gtk+-3.0>=3.0 cairo>=1.0 cairo-png>=1.0 gthread-2.0>=2.10 gmodule-export-2.0>=2.10) | ||
add_definitions(-DGTK_DISABLE_SINGLE_INCLUDES) | ||
else() | ||
message(STATUS "Building for GTK2") | ||
pkg_check_modules(GTK REQUIRED gtk+-2.0>=2.10 glib-2.0>=2.10 gthread-2.0>=2.10 gmodule-export-2.0>=2.10) | ||
message(STATUS "Building for GTK2") | ||
pkg_check_modules(GTK REQUIRED gtk+-2.0>=2.10 gthread-2.0>=2.10 gmodule-export-2.0>=2.10) | ||
endif() | ||
|
||
pkg_check_modules(LIBSOUP libsoup-2.4>=2.42) | ||
pkg_check_modules(JSON_GLIB REQUIRED json-glib-1.0) | ||
|
||
if (HARDINFO_LIBSOUP3) | ||
pkg_check_modules(LIBSOUP REQUIRED libsoup-3.0>=3.00) | ||
else() | ||
pkg_check_modules(LIBSOUP REQUIRED libsoup-2.4>=${PACKAGE_LIBSOUP2_MINVERSION}) | ||
endif() | ||
pkg_check_modules(GLIB2 REQUIRED glib-2.0>=${PACKAGE_LIBGLIB2_MINVERSION}) | ||
pkg_check_modules(JSON_GLIB REQUIRED json-glib-1.0>=0.14.2) | ||
pkg_check_modules(X11 REQUIRED x11) | ||
|
||
include(FindZLIB REQUIRED) | ||
|
@@ -136,11 +204,11 @@ set(HARDINFO_RESOURCES | |
"data/pci.ids.min" | ||
"data/kernel-module-icons.json" | ||
) | ||
|
||
if(${PACKAGE_MANPAGES}) | ||
set(HARDINFO_MANPAGES | ||
"hardinfo.1" | ||
) | ||
|
||
endif() | ||
set(MODULE_computer_SOURCES | ||
modules/computer.c | ||
modules/computer/alsa.c | ||
|
@@ -391,11 +459,11 @@ install(DIRECTORY pixmaps | |
PATTERN "*.{png,svg}" | ||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | ||
) | ||
install(DIRECTORY doc | ||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/hardinfo | ||
PATTERN "*.{hlp,png}" | ||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | ||
) | ||
#install(DIRECTORY doc | ||
# DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/hardinfo | ||
# PATTERN "*.{hlp,png}" | ||
# PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | ||
#) | ||
install(FILES ${HARDINFO_MANPAGES} | ||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 | ||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | ||
|
@@ -404,3 +472,54 @@ install(FILES pixmaps/hardinfo.png | |
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps | ||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | ||
) | ||
|
||
########################PACKAGE BUILDING FOR DISTROS########################### | ||
#Please update here for building packages | ||
|
||
SET(CPACK_PACKAGE_VERSION ${HARDINFO_VERSION}) | ||
SET(CPACK_PACKAGE_HOMEPAGE_URL "https://hardinfo.bigbear.dk") | ||
if(${RPM}) | ||
SET(CPACK_GENERATOR "RPM") | ||
else() | ||
SET(CPACK_GENERATOR "DEB") | ||
endif() | ||
|
||
#RPM | ||
SET(CPACK_RPM_PACKAGE_MAINTAINER "hwspeedy <[email protected]>") | ||
SET(CPACK_RPM_PACKAGE_DESCRIPTION "HardInfo 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") | ||
SET(CPACK_RPM_PACKAGE_LICENSE "GPL2+") | ||
SET(CPACK_RPM_PACKAGE_HOMEPAGE "https://github.com/hwspeedy/hardinfo") | ||
if(HARDINFO_LIBSOUP3) | ||
SET(PACKAGE_LS "libsoup (>=3.0)") | ||
else() | ||
SET(PACKAGE_LS "libsoup (>=${PACKAGE_LIBSOUP2_MINVERSION})") | ||
endif() | ||
if(HARDINFO_GTK3) | ||
SET(PACKAGE_GTK "libgtk-3-0 (>=3.0)") | ||
else() | ||
SET(PACKAGE_GTK "libgtk-2-0 (>=2.20)") | ||
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 <[email protected]>") | ||
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "HardInfo 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") | ||
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/hwspeedy/hardinfo") | ||
if(HARDINFO_LIBSOUP3) | ||
SET(PACKAGE_LS "libsoup-3.0.0 (>=3.0)") | ||
else() | ||
SET(PACKAGE_LS "libsoup2.4-1 (>=${PACKAGE_LIBSOUP2_MINVERSION})") | ||
if(${distro}${disversion} MATCHES "Debian GNU/Linux11") | ||
SET(PACKAGE_LS "libsoup2.4-0 (>=2.42)") | ||
endif() | ||
endif() | ||
if(HARDINFO_GTK3) | ||
SET(PACKAGE_GTK "libgtk-3-0 (>=3.0)") | ||
else() | ||
SET(PACKAGE_GTK "libgtk-2-0 (>=2.20)") | ||
endif() | ||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libjson-glib-1.0-0, zlib1g, ${PACKAGE_LS}, ${PACKAGE_GTK}") | ||
|
||
INCLUDE(CPack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hwspeedy this PR already covers the issue of uber-graph #702 ? as i can see, GTK3 does use it! based on CMAkelist file depends
NOTE what happened with the "forum like" place? where we discuss things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mckaygerhard - I am trying to keep the community together.
As soon as @lpereira has transferred the repo, I will recreate discussion for entire project.
I have around 20 commits lined up for you and others to provide feedback on. And we have a discussion about dependencies for packaging. It will be fun - we will get hardinfo released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok got it.. lest wait until responds, lest have a bit of patiente