f87064ca8888c12523470ddb47487d500f5b532d
[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:=3.0.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=lm_sensors-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://dl.lm-sensors.org/lm-sensors/releases/
17 PKG_MD5SUM:=5b210ba9cc01f00161c438fd618484e5
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/lm_sensors-$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/lm-sensors/Default
24 SECTION:=utils
25 CATEGORY:=Utilities
26 TITLE:=lm-sensors
27 DEPENDS:=+sysfsutils @LINUX_2_6
28 URL:=http://www.lm-sensors.org/
29 endef
30
31 define Package/lm-sensors
32 $(call Package/lm-sensors/Default)
33 TITLE+= (programs)
34 DEPENDS+= @TARGET_x86
35 endef
36
37 define Package/libsensors
38 $(call Package/lm-sensors/Default)
39 SECTION:=libs
40 CATEGORY:=Libraries
41 TITLE+= libraries
42 endef
43
44 define Package/lm-sensors/description
45 Utility to read hardware sensor data
46 endef
47
48 define Package/libsensors/description
49 lm-sensors libraries
50 endef
51
52 define Build/Compile
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 KERNELVERSION="$(LINUX_VERSION)" \
55 LINUX="$(LINUX_DIR)" \
56 CC="$(TARGET_CC)" \
57 STAGING_DIR="$(STAGING_DIR)" \
58 PREFIX="/usr" \
59 MACHINE="$(ARCH)" \
60 user
61 endef
62
63 define Package/lm-sensors/install
64 $(INSTALL_DIR) $(1)/usr/sbin
65 $(CP) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin/
66 $(CP) $(PKG_BUILD_DIR)/prog/detect/i2cdetect $(1)/usr/sbin/
67 $(CP) $(PKG_BUILD_DIR)/prog/detect/sensors-detect $(1)/usr/sbin/
68 $(INSTALL_DIR) $(1)/etc
69 $(CP) files/sensors.conf $(1)/etc/sensors.conf
70 endef
71
72 define Package/libsensors/install
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(CP) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib/
75 endef
76
77
78 $(eval $(call BuildPackage,lm-sensors))
79 $(eval $(call BuildPackage,libsensors))