xref: /OK3568_Linux_fs/buildroot/package/rng-tools/rng-tools.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# rng-tools
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunRNG_TOOLS_VERSION = 6.14
8*4882a593SmuzhiyunRNG_TOOLS_SITE = $(call github,nhorman,$(RNG_TOOLS_NAME),v$(RNG_TOOLS_VERSION))
9*4882a593SmuzhiyunRNG_TOOLS_LICENSE = GPL-2.0
10*4882a593SmuzhiyunRNG_TOOLS_LICENSE_FILES = COPYING
11*4882a593SmuzhiyunRNG_TOOLS_CPE_ID_VENDOR = rng-tools_project
12*4882a593SmuzhiyunRNG_TOOLS_SELINUX_MODULES = rngd
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunRNG_TOOLS_DEPENDENCIES = host-pkgconf openssl
15*4882a593Smuzhiyun# From git
16*4882a593SmuzhiyunRNG_TOOLS_AUTORECONF = YES
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunRNG_TOOLS_CONF_OPTS = --without-pkcs11
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun# Work around for uClibc or musl toolchains which lack argp_*()
21*4882a593Smuzhiyun# functions.
22*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
23*4882a593SmuzhiyunRNG_TOOLS_CONF_ENV += LIBS="-largp"
24*4882a593SmuzhiyunRNG_TOOLS_DEPENDENCIES += argp-standalone
25*4882a593Smuzhiyunendif
26*4882a593Smuzhiyun
27*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBRTLSDR),y)
28*4882a593SmuzhiyunRNG_TOOLS_DEPENDENCIES += librtlsdr
29*4882a593SmuzhiyunRNG_TOOLS_CONF_OPTS += --with-rtlsdr
30*4882a593Smuzhiyunelse
31*4882a593SmuzhiyunRNG_TOOLS_CONF_OPTS += --without-rtlsdr
32*4882a593Smuzhiyunendif
33*4882a593Smuzhiyun
34*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_RNG_TOOLS_JITTERENTROPY_LIBRARY),y)
35*4882a593SmuzhiyunRNG_TOOLS_DEPENDENCIES += jitterentropy-library
36*4882a593SmuzhiyunRNG_TOOLS_CONF_OPTS += --enable-jitterentropy
37*4882a593Smuzhiyunelse
38*4882a593SmuzhiyunRNG_TOOLS_CONF_OPTS += --disable-jitterentropy
39*4882a593Smuzhiyunendif
40*4882a593Smuzhiyun
41*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_RNG_TOOLS_NISTBEACON),y)
42*4882a593SmuzhiyunRNG_TOOLS_DEPENDENCIES += jansson libcurl libxml2
43*4882a593SmuzhiyunRNG_TOOLS_CONF_OPTS += --with-nistbeacon
44*4882a593Smuzhiyunelse
45*4882a593SmuzhiyunRNG_TOOLS_CONF_OPTS += --without-nistbeacon
46*4882a593Smuzhiyunendif
47*4882a593Smuzhiyun
48*4882a593Smuzhiyundefine RNG_TOOLS_INSTALL_INIT_SYSV
49*4882a593Smuzhiyun	$(INSTALL) -D -m 755 package/rng-tools/S21rngd \
50*4882a593Smuzhiyun		$(TARGET_DIR)/etc/init.d/S21rngd
51*4882a593Smuzhiyunendef
52*4882a593Smuzhiyun
53*4882a593Smuzhiyundefine RNG_TOOLS_INSTALL_INIT_SYSTEMD
54*4882a593Smuzhiyun	$(INSTALL) -D -m 644 package/rng-tools/rngd.service \
55*4882a593Smuzhiyun		$(TARGET_DIR)/usr/lib/systemd/system/rngd.service
56*4882a593Smuzhiyunendef
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun$(eval $(autotools-package))
59