2019-05-20 14:38:33 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=urandom-seed
|
2021-01-25 11:48:42 +00:00
|
|
|
PKG_RELEASE:=3
|
2020-02-23 12:39:26 +00:00
|
|
|
PKG_LICENSE:=GPL-2.0-only
|
2019-05-20 14:38:33 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2020-02-23 12:37:36 +00:00
|
|
|
define Package/urandom-seed
|
2019-05-20 14:38:33 +00:00
|
|
|
SECTION:=base
|
|
|
|
CATEGORY:=Base system
|
|
|
|
TITLE:=/etc/urandom.seed handling for OpenWrt
|
2020-02-23 12:39:26 +00:00
|
|
|
URL:=https://openwrt.org/
|
2019-05-20 14:38:33 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile/Default
|
2022-03-28 04:25:56 +00:00
|
|
|
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \
|
|
|
|
-std=gnu99 -o $(PKG_BUILD_DIR)/seedrng seedrng.c
|
2019-05-20 14:38:33 +00:00
|
|
|
endef
|
|
|
|
Build/Compile = $(Build/Compile/Default)
|
|
|
|
|
2020-02-23 12:37:36 +00:00
|
|
|
define Package/urandom-seed/install
|
2019-05-20 14:38:33 +00:00
|
|
|
$(CP) ./files/* $(1)/
|
2022-03-28 04:25:56 +00:00
|
|
|
$(INSTALL_DIR) $(1)/sbin
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/seedrng $(1)/sbin/
|
2019-05-20 14:38:33 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,urandom-seed))
|