e1e61884d191a89e2b929c742faa653cff0b6ddd
[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:=2
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 PKG_CPE_ID:=cpe:/a:rng-tools_project:rng-tools
23
24 PKG_FIXUP:=autoreconf
25 PKG_INSTALL:=1
26 PKG_BUILD_PARALLEL:=1
27 PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
28
29 include $(INCLUDE_DIR)/package.mk
30
31 define Package/rng-tools
32 SECTION:=utils
33 CATEGORY:=Utilities
34 TITLE:=Daemon for adding entropy to kernel entropy pool
35 URL:=https://github.com/nhorman/rng-tools
36 DEPENDS:=+libopenssl
37 endef
38
39 define Package/rng-tools/description
40 Daemon for adding entropy to kernel entropy pool. By default it uses
41 /dev/urandom as the source but the init script can be modified
42 to use a hardware source like /dev/hwrng if present
43 endef
44
45 CONFIGURE_ARGS += \
46 --without-nistbeacon \
47 --without-pkcs11 \
48 --without-rtlsdr
49
50 ifndef CONFIG_USE_GLIBC
51 CONFIGURE_VARS += LIBS="-largp"
52 endif
53
54 define Build/Prepare
55 $(call Build/Prepare/Default)
56 (cd $(PKG_BUILD_DIR); ln -s README.md README)
57 endef
58
59 define Package/rng-tools/install
60 $(INSTALL_DIR) $(1)/etc/init.d
61 $(INSTALL_BIN) ./files/rngd.init $(1)/etc/init.d/rngd
62 $(INSTALL_DIR) $(1)/etc/uci-defaults
63 $(INSTALL_BIN) ./files/rngd.uci_defaults $(1)/etc/uci-defaults/rngd
64 $(INSTALL_DIR) $(1)/usr/bin
65 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rngtest $(1)/usr/bin/
66 $(INSTALL_DIR) $(1)/sbin
67 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rngd $(1)/sbin/
68 endef
69
70 $(eval $(call BuildPackage,rng-tools))