8f3a80e99b27fa3e80843443d6f8b6e5e2fd2499
[openwrt/svn-archive/archive.git] / utils / lm-sensors / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=lm-sensors
11 PKG_VERSION:=3.1.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=lm_sensors-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://dl.lm-sensors.org/lm-sensors/releases/
16 PKG_MD5SUM:=613d7cfa23b70c0abae3fabb0a72ff5f
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/lm_sensors-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/lm-sensors/Default
23 SECTION:=utils
24 CATEGORY:=Utilities
25 TITLE:=lm-sensors
26 DEPENDS:=+sysfsutils @LINUX_2_6
27 URL:=http://www.lm-sensors.org/
28 endef
29
30 define Package/lm-sensors
31 $(call Package/lm-sensors/Default)
32 TITLE+= (programs)
33 DEPENDS+= +libsensors @TARGET_x86
34 endef
35
36 define Package/libsensors
37 $(call Package/lm-sensors/Default)
38 SECTION:=libs
39 CATEGORY:=Libraries
40 TITLE+= libraries
41 endef
42
43 define Package/lm-sensors/description
44 Utility to read hardware sensor data
45 endef
46
47 define Package/libsensors/description
48 lm-sensors libraries
49 endef
50
51 define Package/lm-sensors/conffiles
52 /etc/sensors.conf
53 endef
54
55 define Build/Compile
56 $(MAKE) -C $(PKG_BUILD_DIR) \
57 KERNELVERSION="$(LINUX_VERSION)" \
58 LINUX="$(LINUX_DIR)" \
59 CC="$(TARGET_CC)" \
60 STAGING_DIR="$(STAGING_DIR)" \
61 PREFIX="/usr" \
62 MACHINE="$(ARCH)" \
63 user
64 endef
65
66 define Package/lm-sensors/install
67 $(INSTALL_DIR) $(1)/usr/sbin
68 $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin/
69 $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/detect/sensors-detect $(1)/usr/sbin/
70 $(INSTALL_DIR) $(1)/etc
71 $(INSTALL_CONF) ./files/sensors.conf $(1)/etc/sensors.conf
72 endef
73
74 define Package/libsensors/install
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(CP) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib/
77 endef
78
79
80 $(eval $(call BuildPackage,lm-sensors))
81 $(eval $(call BuildPackage,libsensors))