buildroot/package/rng-tools/rng-tools.mk
Maxim Mikityanskiy 22cb51e1a2 package/rng-tools: add systemd support for rngd
Add rngd.service for systemd. Also patch rngd with patch from Fedora to
ignore failure if no hwrng present:
https://bugzilla.redhat.com/show_bug.cgi?id=892178

[Thomas:
 - rename patch to the proper naming convention
 - add description and SoB to patch
 - install service file to /usr/lib/systemd and not /lib/systemd
 - use a relative symbolic link instead of an absolute one]

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-04-22 22:07:26 +02:00

33 lines
1 KiB
Makefile

################################################################################
#
# rng-tools
#
################################################################################
RNG_TOOLS_VERSION = 5
RNG_TOOLS_SITE = http://downloads.sourceforge.net/project/gkernel/rng-tools/$(RNG_TOOLS_VERSION)
RNG_TOOLS_LICENSE = GPLv2
RNG_TOOLS_LICENSE_FILES = COPYING
# Work around for uClibc's lack of argp_*() functions
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
RNG_TOOLS_CONF_ENV += LIBS="-largp"
RNG_TOOLS_DEPENDENCIES += argp-standalone
endif
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
RNG_TOOLS_DEPENDENCIES += libgcrypt
else
RNG_TOOLS_CONF_OPTS += --without-libgcrypt
endif
define RNG_TOOLS_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/rng-tools/rngd.service \
$(TARGET_DIR)/usr/lib/systemd/system/rngd.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../../../../usr/lib/systemd/system/rngd.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rngd.service
endef
$(eval $(autotools-package))