packages/utils/haveged/Makefile
Karel Kočí 1ef38f45d9
haveged: move init script from 13 to 01
This is intended as a match with standard urngd. They serve same purpose
and urngd starts as first with 00. Starting haveged later can create
issues if you replace urngd with it. The example problem is if
uci-defaults script decides to generate certificate. Haveged can supply
entropy but it is started later and to mitigate this urngd would still
have to be installed. This means that haveget can't serve as replacement
without moving it to match start order of urngd.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
2020-03-11 11:23:16 +01:00

66 lines
1.7 KiB
Makefile

#
# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=haveged
PKG_VERSION:=1.9.8
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/jirka-h/haveged/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=99aa1996c6e39ea2459cfc37addfb8b1eecc63f3a2b6da9db17b22e76b6851ae
PKG_BUILD_DIR:=$(BUILD_DIR)/haveged-$(PKG_VERSION)
PKG_LICENSE:=GPLv3
PKG_MAINTAINER:=Hannu Nyman <hannu.nyman@iki.fi>
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
define Package/haveged
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libhavege
TITLE:=Feeds the kernel entropy pool by timing CPU loops.
URL:=http://www.issihosts.com/haveged/
endef
define Package/libhavege
CATEGORY:=Libraries
TITLE:=Library for haveged
URL:=http://www.issihosts.com/haveged/
endef
CONFIGURE_ARGS+= \
--enable-daemon=yes \
--enable-threads=no \
--enable-olt=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)/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))