tools: add tmon package
[openwrt/staging/robimarko.git] / package / devel / tmon / Makefile
1 include $(TOPDIR)/rules.mk
2 include $(INCLUDE_DIR)/kernel.mk
3
4 PKG_NAME:=tmon
5 PKG_VERSION:=$(LINUX_VERSION)
6 PKG_RELEASE:=1
7
8 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
9 PKG_LICENSE:=GPL-2.0-only
10
11 include $(INCLUDE_DIR)/package.mk
12
13 define Package/tmon
14 SECTION:=devel
15 CATEGORY:=Development
16 TITLE:=Thermal monitoring and testing tool
17 VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
18 URL:=http://www.kernel.org
19 DEPENDS:=+libncursesw
20 endef
21
22 define Package/tmon/description
23 As hardware vendors cope with the thermal constraints on their products,
24 more and more sensors are added, new cooling capabilities are introduced.
25 To expose such relationship to the userspace, Linux generic thermal layer
26 introduced sysfs entry at /sys/class/thermal with a matrix of symbolic
27 links, trip point bindings, and device instances. To traverse such
28 matrix by hand is not a trivial task.
29 'TMON' is conceived as a tool to help visualize, tune, and test the
30 complex thermal subsystem.
31 endef
32
33 MAKE_FLAGS = \
34 ARCH="$(LINUX_KARCH)" \
35 CROSS_COMPILE="$(TARGET_CROSS)" \
36 CC="$(TARGET_CC)" \
37 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
38 LDFLAGS="$(TARGET_LDFLAGS)"
39
40 define Build/Compile
41 -$(MAKE) clean \
42 -C $(LINUX_DIR)/tools/thermal/tmon
43 +$(MAKE_FLAGS) $(MAKE) \
44 -C $(LINUX_DIR)/tools/thermal/tmon
45 endef
46
47 define Package/tmon/install
48 $(INSTALL_DIR) $(1)/usr/bin
49 $(INSTALL_BIN) $(LINUX_DIR)/tools/thermal/tmon/tmon \
50 $(1)/usr/bin/
51 endef
52
53 $(eval $(call BuildPackage,tmon))