ed1afde7aa01d05cd0f1aba363bc3bda77501c4b
[openwrt/svn-archive/archive.git] / utils / lm-sensors / Makefile
1 #
2 # Copyright (C) 2006-2011 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.3.0
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:=5eb18d7531ead4f54f28a1133a606535
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/lm_sensors-$(PKG_VERSION)
19 PKG_BUILD_PARALLEL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/lm-sensors/Default
24 DEPENDS:=+sysfsutils
25 URL:=http://www.lm-sensors.org/
26 MAINTAINER:=Luka Perkov <openwrt@lukaperkov.net>
27 endef
28
29 define Package/lm-sensors
30 $(call Package/lm-sensors/Default)
31 SECTION:=utils
32 CATEGORY:=Utilities
33 TITLE:=lm-sensors
34 DEPENDS+=+libsensors
35 endef
36
37 define Package/libsensors
38 $(call Package/lm-sensors/Default)
39 SECTION:=libs
40 CATEGORY:=Libraries
41 TITLE:=libsensors
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 Package/lm-sensors/conffiles
53 /etc/sensors.conf
54 endef
55
56 define Build/Compile
57 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
58 $(TARGET_CONFIGURE_OPTS) \
59 KERNELVERSION="$(LINUX_VERSION)" \
60 LINUX="$(LINUX_DIR)" \
61 CC="$(TARGET_CC)" \
62 STAGING_DIR="$(STAGING_DIR)" \
63 PREFIX="/usr" \
64 MACHINE="$(ARCH)" \
65 user
66 endef
67
68 define Build/InstallDev
69 $(INSTALL_DIR) $(1)/usr/include/sensors
70 $(CP) \
71 $(PKG_BUILD_DIR)/lib/sensors.h \
72 $(1)/usr/include/sensors
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(CP) \
75 $(PKG_BUILD_DIR)/lib/libsensors.{a,so*} \
76 $(1)/usr/lib
77 endef
78
79 define Package/lm-sensors/install
80 $(INSTALL_DIR) $(1)/usr/sbin
81 $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin
82 $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/detect/sensors-detect $(1)/usr/sbin
83 ifeq ($(ARCH),i386)
84 $(INSTALL_DIR) $(1)/etc
85 $(INSTALL_CONF) ./files/sensors.conf $(1)/etc/sensors.conf
86 endif
87 endef
88
89 define Package/libsensors/install
90 $(INSTALL_DIR) $(1)/usr/lib
91 $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib
92 endef
93
94 $(eval $(call BuildPackage,lm-sensors))
95 $(eval $(call BuildPackage,libsensors))