Skip to contentSkip to conversation

package/hddtemp: new package

Buildroot Yann E. MORIN 1 participant 1 message Feb 20, 2023

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=93d982207b43f9e741e190a71317901972175796
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

[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]

[[email protected]:
- 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
]

---
 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(+)
DEVELOPERS +1 -0
index 04047d43da..29dffaadf1 100644
@@ -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/
package/Config.in +1 -0
index 6804e1d418..10a0493b8d 100644
@@ -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"
package/hddtemp/Config.in new file +17 -0
new file mode 100644
index 0000000000..0e02252461
@@ -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
package/hddtemp/hddtemp.hash new file +3 -0
new file mode 100644
index 0000000000..cd82d7f89b
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  592322c64f0d5f035132249e3d051b752f5d24867514522a17285d5e72d21075  hddtemp-0.4.3.tar.gz
+sha256  e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4  GPL-2
package/hddtemp/hddtemp.mk new file +35 -0
new file mode 100644
index 0000000000..7023e11e59
@@ -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))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot