You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.8 KiB

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