Upgrade lm-sensors package. Patch enables compiling applications that
depend on libsensors library.

Signed-off-by: Luka Perkov < openwrt ->-to->- lukaperkov.net >
---

Index: lm-sensors/Makefile
===================================================================
--- lm-sensors/Makefile (revision 23647)
+++ lm-sensors/Makefile (working copy)
@@ -9,27 +9,27 @@
 
 PKG_NAME:=lm-sensors
 PKG_VERSION:=3.2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=lm_sensors-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://dl.lm-sensors.org/lm-sensors/releases/
 PKG_MD5SUM:=829d88fb09d67723fbf42853eb84d1fd
-
+ 
 PKG_BUILD_DIR:=$(BUILD_DIR)/lm_sensors-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/lm-sensors/Default
-  SECTION:=utils
-  CATEGORY:=Utilities
-  TITLE:=lm-sensors
   DEPENDS:=+sysfsutils
   URL:=http://www.lm-sensors.org/
 endef
 
 define Package/lm-sensors
   $(call Package/lm-sensors/Default)
-  TITLE+=(programs)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=lm-sensors
   DEPENDS+=+libsensors
 endef
 
@@ -37,7 +37,7 @@
   $(call Package/lm-sensors/Default)
   SECTION:=libs
   CATEGORY:=Libraries
-  TITLE+=libraries
+  TITLE:=libsensors
 endef
 
 define Package/lm-sensors/description
@@ -49,11 +49,12 @@
 endef
 
 define Package/lm-sensors/conffiles
-/etc/sensors.conf
+       /etc/sensors.conf
 endef
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
+               $(TARGET_CONFIGURE_OPTS) \
                KERNELVERSION="$(LINUX_VERSION)" \
                LINUX="$(LINUX_DIR)" \
                CC="$(TARGET_CC)" \
@@ -63,6 +64,17 @@
                user
 endef
 
+define Build/InstallDev
+       mkdir -p $(1)/usr/include/sensors
+       $(CP) \
+               $(PKG_BUILD_DIR)/lib/sensors.h \
+               $(1)/usr/include/sensors
+       mkdir -p $(1)/usr/lib
+       $(CP) \
+               $(PKG_BUILD_DIR)/lib/libsensors.{a,so*} \
+               $(1)/usr/lib/
+endef
+
 define Package/lm-sensors/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin/
@@ -76,6 +88,5 @@
        $(CP) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib/
 endef
 
-
 $(eval $(call BuildPackage,lm-sensors))
 $(eval $(call BuildPackage,libsensors))
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to