kumquat-buildroot/package/tini/tini.mk
Christian Stewart 6098d2e498 tini: new package
Tini is a minimal init process to act as PID 1 for containers.

Note: it is not necessary to compile Tini statically for many
non-docker container environments, and Docker now statically links to
Tini internally (as of 1.13).

Tested-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Christian Stewart <christian@paral.in>
[Thomas: add entry to DEVELOPERS file.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-14 15:54:48 +02:00

36 lines
853 B
Makefile

################################################################################
#
# tini
#
################################################################################
TINI_VERSION = v0.18.0
TINI_SITE = $(call github,krallin,tini,$(TINI_VERSION))
TINI_LICENSE = MIT
TINI_LICENSE_FILES = LICENSE
TINI_CFLAGS = $(TARGET_CFLAGS) \
-DTINI_VERSION=\"$(TINI_VERSION)\" \
-DTINI_GIT=\"\"
ifeq ($(BR2_PACKAGE_TINI_MINIMAL),y)
TINI_CFLAGS += -DTINI_MINIMAL
endif
define TINI_CONFIGURE_CMDS
printf "#pragma once\n" > $(@D)/src/tiniConfig.h
endef
define TINI_BUILD_CMDS
mkdir -p $(@D)/bin
$(TARGET_CC) $(TINI_CFLAGS) \
-o $(@D)/bin/tini $(@D)/src/tini.c
endef
define TINI_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/bin/tini $(TARGET_DIR)/usr/bin/tini
endef
# Tini's CMakeLists.txt is not suitable for Buildroot.
$(eval $(generic-package))