From 93d982207b43f9e741e190a71317901972175796 Mon Sep 17 00:00:00 2001 From: Gilles Chanteperdrix Date: Sun, 11 Dec 2022 12:28:24 +0100 Subject: [PATCH] package/hddtemp: new package [Bernd: - switched to actively maintained fork - package/Config.in: moved to "Hardware handling" (Peter) - added toolchain dependencies (Thomas) - added license hash - fixed build errors related to iconv and execinfo (Peter) - removed hook HDDTEMP_REMOVE_MAN (Thomas) - install hddtemp.db to target - added build/install _CMDS due to https://github.com/vitlav/hddtemp/issues/5] Signed-off-by: Bernd Kuhls [yann.morin.1998@free.fr: - use GETTEXTIZE=YES, drop host-gettext from _DEPENDENCIES - drop custom build and install commands now that we gettextize - explicitly specify the DB path, introduce HDDTEMP_DB_PATH ] Signed-off-by: Yann E. MORIN --- DEVELOPERS | 1 + package/Config.in | 1 + package/hddtemp/Config.in | 17 +++++++++++++++++ package/hddtemp/hddtemp.hash | 3 +++ package/hddtemp/hddtemp.mk | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 package/hddtemp/Config.in create mode 100644 package/hddtemp/hddtemp.hash create mode 100644 package/hddtemp/hddtemp.mk diff --git a/DEVELOPERS b/DEVELOPERS index 04047d43da..29dffaadf1 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -345,6 +345,7 @@ F: package/glmark2/ F: package/gpsd/ F: package/gptfdisk/ F: package/hdparm/ +F: package/hddtemp/ F: package/inih/ F: package/intel-gmmlib/ F: package/intel-mediadriver/ diff --git a/package/Config.in b/package/Config.in index 6804e1d418..10a0493b8d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -508,6 +508,7 @@ endmenu source "package/gpsd/Config.in" source "package/gptfdisk/Config.in" source "package/gvfs/Config.in" + source "package/hddtemp/Config.in" source "package/hdparm/Config.in" source "package/hwdata/Config.in" source "package/hwloc/Config.in" diff --git a/package/hddtemp/Config.in b/package/hddtemp/Config.in new file mode 100644 index 0000000000..0e02252461 --- /dev/null +++ b/package/hddtemp/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_HDDTEMP + bool "hddtemp" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + hddtemp is a small utility that gives you the temperature of + your hard drive by reading S.M.A.R.T. informations, for drives + that support this feature. + + https://github.com/vitlav/hddtemp + http://www.guzu.net/linux/hddtemp.php + +comment "hddtemp needs dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/hddtemp/hddtemp.hash b/package/hddtemp/hddtemp.hash new file mode 100644 index 0000000000..cd82d7f89b --- /dev/null +++ b/package/hddtemp/hddtemp.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 592322c64f0d5f035132249e3d051b752f5d24867514522a17285d5e72d21075 hddtemp-0.4.3.tar.gz +sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 GPL-2 diff --git a/package/hddtemp/hddtemp.mk b/package/hddtemp/hddtemp.mk new file mode 100644 index 0000000000..7023e11e59 --- /dev/null +++ b/package/hddtemp/hddtemp.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# hddtemp +# +################################################################################ + +HDDTEMP_VERSION = 0.4.3 +HDDTEMP_SITE = $(call github,vitlav,hddtemp,v$(HDDTEMP_VERSION)) +HDDTEMP_LICENSE = GPLv2 +HDDTEMP_LICENSE_FILES = GPL-2 + +# Fetched from Github with no configure script +HDDTEMP_AUTORECONF = YES +HDDTEMP_GETTEXTIZE = YES + +HDDTEMP_DB_PATH = /usr/share/misc/hddtemp.db +HDDTEMP_CONF_OPTS = --with-db-path=$(HDDTEMP_DB_PATH) +HDDTEMP_CONF_ENV = LIBS="$(HDDTEMP_LIBS)" + +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) +HDDTEMP_DEPENDENCIES += libexecinfo +HDDTEMP_LIBS += -lexecinfo +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +HDDTEMP_DEPENDENCIES += libiconv +HDDTEMP_LIBS += -liconv +endif + +define HDDTEMP_INSTALL_HDDTEMP_DB + $(INSTALL) -D $(@D)/data/hddtemp.db $(TARGET_DIR)$(HDDTEMP_DB_PATH) +endef +HDDTEMP_POST_INSTALL_TARGET_HOOKS += HDDTEMP_INSTALL_HDDTEMP_DB + +$(eval $(autotools-package))