usb-modeswitch: Fix a condition to compare default product id and switched product...
[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:=2
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/lm-sensors-detect
38 $(call Package/lm-sensors/Default)
39 SECTION:=utils
40 CATEGORY:=Utilities
41 TITLE:=lm-sensors-detect
42 DEPENDS+=+lm-sensors +perl +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-xsloader
43 endef
44
45 define Package/libsensors
46 $(call Package/lm-sensors/Default)
47 SECTION:=libs
48 CATEGORY:=Libraries
49 TITLE:=libsensors
50 endef
51
52 define Package/lm-sensors/description
53 Utility to read hardware sensor data
54 endef
55
56 define Package/lm-sensors-detect/description
57 Script to autodetect sensor hardware
58 endef
59
60 define Package/libsensors/description
61 lm-sensors libraries
62 endef
63
64 define Package/lm-sensors/conffiles
65 /etc/sensors.conf
66 endef
67
68 define Build/Compile
69 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
70 $(TARGET_CONFIGURE_OPTS) \
71 KERNELVERSION="$(LINUX_VERSION)" \
72 LINUX="$(LINUX_DIR)" \
73 CC="$(TARGET_CC)" \
74 STAGING_DIR="$(STAGING_DIR)" \
75 PREFIX="/usr" \
76 MACHINE="$(ARCH)" \
77 user
78 endef
79
80 define Build/InstallDev
81 $(INSTALL_DIR) $(1)/usr/include/sensors
82 $(CP) \
83 $(PKG_BUILD_DIR)/lib/sensors.h \
84 $(1)/usr/include/sensors
85 $(INSTALL_DIR) $(1)/usr/lib
86 $(CP) \
87 $(PKG_BUILD_DIR)/lib/libsensors.{a,so*} \
88 $(1)/usr/lib
89 endef
90
91 define Package/lm-sensors/install
92 $(INSTALL_DIR) $(1)/usr/sbin
93 $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin
94 ifeq ($(ARCH),i386)
95 $(INSTALL_DIR) $(1)/etc
96 $(INSTALL_CONF) ./files/sensors.conf $(1)/etc/sensors.conf
97 endif
98 endef
99
100 define Package/lm-sensors-detect/install
101 $(INSTALL_DIR) $(1)/usr/sbin
102 $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/detect/sensors-detect $(1)/usr/sbin
103 endef
104
105 define Package/libsensors/install
106 $(INSTALL_DIR) $(1)/usr/lib
107 $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib
108 endef
109
110 $(eval $(call BuildPackage,lm-sensors))
111 $(eval $(call BuildPackage,lm-sensors-detect))
112 $(eval $(call BuildPackage,libsensors))