packages: haveged: upgrade to 1.7c
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 20 Oct 2013 16:20:03 +0000 (16:20 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 20 Oct 2013 16:20:03 +0000 (16:20 +0000)
This upgrades haveged from 1.4 to 1.7c (closes #13979)

Signed-off-by: Christian Pointner <equinox@chaos-at-home.org>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/packages@38485 3c298f89-4303-0410-b956-a3cf2f4a3e73

utils/haveged/Makefile
utils/haveged/files/haveged.init

index d176f40..05fbbe5 100644 (file)
@@ -4,17 +4,17 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id: Makefile 1 2012-01-12 03:50:18Z Olipro $ 
+# $Id: Makefile 1 2012-01-12 03:50:18Z Olipro $
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haveged
-PKG_VERSION:=1.5
+PKG_VERSION:=1.7c
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.issihosts.com/$(PKG_NAME)
-PKG_MD5SUM:=c1f34be00c3f438ec83862e90e192e4b
+PKG_MD5SUM:=036760389b1827a2532e248dd3cc46d3
 
 #ensure this is consistent with the dir in the tarball!!!
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -23,19 +23,45 @@ PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/haveged
+define Package/haveged/template
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=Feeds the kernel entropy pool by timing CPU loops.
-  DEPENDS:=+librt +libpthread
   URL:=http://www.issihosts.com/haveged/
 endef
 
+define Package/haveged
+  $(call Package/haveged/template)
+  DEPENDS:=+libhavege
+endef
+
+define Package/libhavege
+  $(call Package/haveged/template)
+  TITLE:=Library for haveged
+endef
+
+CONFIGURE_ARGS+= \
+      --enable-daemon=yes
+      --enable-threads=no
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/src/havege.h $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/src/.libs/libhavege.{a,so*} $(1)/usr/lib/
+endef
+
 define Package/haveged/install
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/haveged.init $(1)/etc/init.d/haveged
-       $(INSTALL_DIR) $(1)/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/haveged $(1)/sbin/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/haveged $(1)/usr/sbin/
+endef
+
+define Package/libhavege/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/src/.libs/libhavege.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,haveged))
+$(eval $(call BuildPackage,libhavege))
index 129d951..ce28e61 100644 (file)
@@ -8,9 +8,9 @@ HAVEGED_DCACHE=32
 HAVEGED_ICACHE=32
 
 start() {
-       service_start /sbin/haveged -w $HAVEGED_THRESHOLD -d $HAVEGED_DCACHE -i $HAVEGED_ICACHE -v 1
+       service_start /usr/sbin/haveged -w $HAVEGED_THRESHOLD -d $HAVEGED_DCACHE -i $HAVEGED_ICACHE -v 1
 }
 
 stop() {
-       service_stop /sbin/haveged
+       service_stop /usr/sbin/haveged
 }