nuke $Id$ in /packages as well
[packages.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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=lm-sensors
11 PKG_VERSION:=3.0.2
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:=5b210ba9cc01f00161c438fd618484e5
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+= @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 Build/Compile
52         $(MAKE) -C $(PKG_BUILD_DIR) \
53                 KERNELVERSION="$(LINUX_VERSION)" \
54                 LINUX="$(LINUX_DIR)" \
55                 CC="$(TARGET_CC)" \
56                 STAGING_DIR="$(STAGING_DIR)" \
57                 PREFIX="/usr" \
58                 MACHINE="$(ARCH)" \
59                 user
60 endef
61
62 define Package/lm-sensors/install
63         $(INSTALL_DIR) $(1)/usr/sbin
64         $(CP) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin/
65         $(CP) $(PKG_BUILD_DIR)/prog/detect/sensors-detect $(1)/usr/sbin/
66         $(INSTALL_DIR) $(1)/etc
67         $(CP) files/sensors.conf $(1)/etc/sensors.conf
68 endef
69
70 define Package/libsensors/install
71         $(INSTALL_DIR) $(1)/usr/lib
72         $(CP) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib/
73 endef
74
75
76 $(eval $(call BuildPackage,lm-sensors))
77 $(eval $(call BuildPackage,libsensors))