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.

72 lines
1.9 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.6
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/nhorman/rng-tools.git
  13. PKG_SOURCE_VERSION:=4ebc21d6f387bb7b4b3f6badc429e27b21c0a6ee
  14. PKG_MIRROR_HASH:=d942283b7482337d40a4933f7b24a5d1361518dacf9c87928f5ea06d492e95b0
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
  16. PKG_LICENSE:=GPLv2
  17. PKG_MAINTAINER:=Nathaniel Wesley Filardo <nwfilardo@gmail.com>
  18. PKG_FIXUP:=autoreconf
  19. PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/rng-tools
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=Daemon for adding entropy to kernel entropy pool
  25. URL:=https://github.com/nhorman/rng-tools
  26. DEPENDS:=+libsysfs
  27. endef
  28. define Package/rng-tools/description
  29. Daemon for adding entropy to kernel entropy pool. By default it uses
  30. /dev/urandom as the source but the init script can be modified
  31. to use a hardware source like /dev/hwrng if present
  32. endef
  33. ifdef CONFIG_USE_UCLIBC
  34. CONFIGURE_VARS += \
  35. LIBS="-largp"
  36. endif
  37. ifdef CONFIG_USE_MUSL
  38. CONFIGURE_VARS += \
  39. LIBS="-largp"
  40. endif
  41. CONFIGURE_ARGS += \
  42. --without-libgcrypt \
  43. --without-nistbeacon
  44. define Build/Prepare
  45. $(call Build/Prepare/Default)
  46. (cd $(PKG_BUILD_DIR); ln -s README.md README)
  47. endef
  48. define Package/rng-tools/install
  49. $(INSTALL_DIR) $(1)/etc/init.d
  50. $(INSTALL_BIN) ./files/rngd.init $(1)/etc/init.d/rngd
  51. $(INSTALL_DIR) $(1)/etc/uci-defaults
  52. $(INSTALL_BIN) ./files/rngd.uci_defaults $(1)/etc/uci-defaults/rngd
  53. $(INSTALL_DIR) $(1)/usr/bin
  54. $(INSTALL_BIN) $(PKG_BUILD_DIR)/rngtest $(1)/usr/bin/
  55. $(INSTALL_DIR) $(1)/sbin
  56. $(INSTALL_BIN) $(PKG_BUILD_DIR)/rngd $(1)/sbin/
  57. endef
  58. $(eval $(call BuildPackage,rng-tools))