Add lm-sensors (#1068)
[openwrt/svn-archive/archive.git] / utils / lm-sensors / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=lm-sensors
12 PKG_VERSION:=2.10.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=lm_sensors-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://dl.lm-sensors.org/lm-sensors/releases/
17 PKG_MD5SUM:=55d77146fbd56c205a9f81d262b9453c
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/lm_sensors-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/lm-sensors
25 SECTION:=utils
26 CATEGORY:=Utilities
27 TITLE:=lm-sensors
28 DEPENDS:=+sysfsutils
29 DESCRIPTION:=\
30 Utility to read hardware sensor data
31 URL:=http://www.lm-sensors.org/
32 endef
33
34 define Build/Compile
35 $(MAKE) -C $(PKG_BUILD_DIR) \
36 KERNELVERSION="$(LINUX_VERSION)" \
37 LINUX="$(LINUX_DIR)" \
38 CC="$(TARGET_CC)" \
39 STAGING_DIR="$(STAGING_DIR)" \
40 user
41 endef
42
43 define Package/lm-sensors/install
44 $(INSTALL_DIR) $(1)/usr/lib
45 $(CP) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib/
46 $(INSTALL_DIR) $(1)/usr/sbin
47 $(CP) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin/
48 $(CP) $(PKG_BUILD_DIR)/prog/detect/i2cdetect $(1)/usr/sbin/
49 $(CP) $(PKG_BUILD_DIR)/prog/detect/sensors-detect $(1)/usr/sbin/
50 $(INSTALL_DIR) $(1)/etc
51 $(CP) files/sensors.conf $(1)/etc/sensors.conf
52 endef
53
54 $(eval $(call BuildPackage,lm-sensors))