rng-tools: update to 6.15
[feed/packages.git] / utils / rng-tools / Makefile
1 #
2 # Copyright (C) 2011-2015 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:=rng-tools
11 PKG_VERSION:=6.15
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=https://github.com/nhorman/rng-tools
16 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
17 PKG_MIRROR_HASH:=745a465062065104e2222ffc1b1bb3e0ce14626d44ee2176cb2a5c3723e3163a
18
19 PKG_MAINTAINER:=Nathaniel Wesley Filardo <nwfilardo@gmail.com>
20 PKG_LICENSE:=GPL-2.0-or-later
21 PKG_LICENSE_FILES:=COPYING
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
25 PKG_BUILD_PARALLEL:=1
26 PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/rng-tools
31 SECTION:=utils
32 CATEGORY:=Utilities
33 TITLE:=Daemon for adding entropy to kernel entropy pool
34 URL:=https://github.com/nhorman/rng-tools
35 DEPENDS:=+libsysfs +libopenssl
36 endef
37
38 define Package/rng-tools/description
39 Daemon for adding entropy to kernel entropy pool. By default it uses
40 /dev/urandom as the source but the init script can be modified
41 to use a hardware source like /dev/hwrng if present
42 endef
43
44 CONFIGURE_ARGS += \
45 --without-nistbeacon \
46 --without-pkcs11 \
47 --without-rtlsdr
48
49 ifndef CONFIG_USE_GLIBC
50 CONFIGURE_VARS += LIBS="-largp"
51 endif
52
53 define Build/Prepare
54 $(call Build/Prepare/Default)
55 (cd $(PKG_BUILD_DIR); ln -s README.md README)
56 endef
57
58 define Package/rng-tools/install
59 $(INSTALL_DIR) $(1)/etc/init.d
60 $(INSTALL_BIN) ./files/rngd.init $(1)/etc/init.d/rngd
61 $(INSTALL_DIR) $(1)/etc/uci-defaults
62 $(INSTALL_BIN) ./files/rngd.uci_defaults $(1)/etc/uci-defaults/rngd
63 $(INSTALL_DIR) $(1)/usr/bin
64 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rngtest $(1)/usr/bin/
65 $(INSTALL_DIR) $(1)/sbin
66 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rngd $(1)/sbin/
67 endef
68
69 $(eval $(call BuildPackage,rng-tools))