Upgrade lm-sensors to 3.0.2, package libsensors separately, which can be built in...
authorFlorian Fainelli <florian@openwrt.org>
Mon, 14 Jul 2008 11:57:06 +0000 (11:57 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Mon, 14 Jul 2008 11:57:06 +0000 (11:57 +0000)
SVN-Revision: 11825

utils/lm-sensors/Makefile
utils/lm-sensors/patches/100-Makefile.patch [deleted file]

index 1db9b20..f87064c 100644 (file)
@@ -9,18 +9,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lm-sensors
-PKG_VERSION:=2.10.3
+PKG_VERSION:=3.0.2
 PKG_RELEASE:=1
 
-PKG_SOURCE:=lm_sensors-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=lm_sensors-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://dl.lm-sensors.org/lm-sensors/releases/
-PKG_MD5SUM:=55d77146fbd56c205a9f81d262b9453c
+PKG_MD5SUM:=5b210ba9cc01f00161c438fd618484e5
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/lm_sensors-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/lm-sensors
+define Package/lm-sensors/Default
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=lm-sensors
@@ -28,22 +28,39 @@ define Package/lm-sensors
   URL:=http://www.lm-sensors.org/
 endef
 
+define Package/lm-sensors
+  $(call Package/lm-sensors/Default)
+  TITLE+= (programs)
+  DEPENDS+= @TARGET_x86
+endef
+
+define Package/libsensors
+  $(call Package/lm-sensors/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE+= libraries
+endef
+
 define Package/lm-sensors/description
        Utility to read hardware sensor data
 endef
 
+define Package/libsensors/description
+       lm-sensors libraries
+endef
+
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                KERNELVERSION="$(LINUX_VERSION)" \
                LINUX="$(LINUX_DIR)" \
                CC="$(TARGET_CC)" \
                STAGING_DIR="$(STAGING_DIR)" \
+               PREFIX="/usr" \
+               MACHINE="$(ARCH)" \
                user
 endef
 
 define Package/lm-sensors/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/sbin
        $(CP) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin/
        $(CP) $(PKG_BUILD_DIR)/prog/detect/i2cdetect $(1)/usr/sbin/
@@ -52,4 +69,11 @@ define Package/lm-sensors/install
        $(CP) files/sensors.conf $(1)/etc/sensors.conf
 endef
 
+define Package/libsensors/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib/
+endef
+
+
 $(eval $(call BuildPackage,lm-sensors))
+$(eval $(call BuildPackage,libsensors))
diff --git a/utils/lm-sensors/patches/100-Makefile.patch b/utils/lm-sensors/patches/100-Makefile.patch
deleted file mode 100644 (file)
index 98be7f6..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
---- lm-sensors-2.10.1.orig/Makefile.orig       2006-09-25 00:30:10.000000000 +0200
-+++ lm-sensors-2.10.1/Makefile 2006-12-09 21:13:50.000000000 +0100
-@@ -45,7 +43,7 @@
- # may be used mistakenly. Note: This should point to the directory
- # *above* the linux/ subdirectory, so to /usr/local/include in the
- # above example.
--I2C_HEADERS := /usr/local/include
-+I2C_HEADERS := $(STAGING_DIR)/usr/include
- #I2C_HEADERS := $(LINUX_HEADERS)
- ifneq ($(MAKECMDGOALS),user)
-@@ -75,10 +73,10 @@
- DESTDIR :=
- # This is the prefix that will be used for almost all directories below.
--PREFIX := /usr/local
-+PREFIX := /usr
- # Your C compiler
--CC := gcc
-+CC := $(TARGET_CC)
- # This is the main modules directory into which the modules will be installed.
- # The magic invocation will return something like this:
-@@ -117,7 +115,7 @@
- # library files (both static and shared) will be installed.
- LIBDIR := $(PREFIX)/lib
--EXLDFLAGS := -Wl,-rpath,$(LIBDIR)
-+EXLDFLAGS := -Wl,-rpath,$(LIBDIR),-rpath-link,$(STAGING_DIR)/usr/lib
- # You should not need to change this. It is the directory into which the
- # executable program files will be installed. BINDIR for programs that are
---- lm-sensors-2.10.1.orig/lib/Module.mk       2006-09-25 00:30:10.000000000 +0200
-+++ lm-sensors-2.10.1/lib/Module.mk    2006-12-09 21:14:20.000000000 +0100
-@@ -66,7 +66,7 @@
- # How to create the shared library
- ifdef SYSFS_SUPPORT
- $(MODULE_DIR)/$(LIBSHLIBNAME): $(LIBSHOBJECTS)
--      $(CC) -shared -Wl,-soname,$(LIBSHSONAME) -o $@ $^ -lc -lm -lsysfs
-+      $(CC) -shared -L$(STAGING_DIR)/usr/lib -Wl,-soname,$(LIBSHSONAME) -o $@ $^ -lc -lm -lsysfs
- else
- $(MODULE_DIR)/$(LIBSHLIBNAME): $(LIBSHOBJECTS)
-       $(CC) -shared -Wl,-soname,$(LIBSHSONAME) -o $@ $^ -lc -lm