-
Notifications
You must be signed in to change notification settings - Fork 5
/
tini.mk
40 lines (33 loc) · 1017 Bytes
/
tini.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
################################################################################
#
# tini
#
################################################################################
TINI_VERSION = 0.19.0
TINI_SITE = $(call github,krallin,tini,v$(TINI_VERSION))
TINI_LICENSE = MIT
TINI_LICENSE_FILES = LICENSE
TINI_CPE_ID_VENDOR = tini_project
TINI_CFLAGS = $(TARGET_CFLAGS) \
-static \
-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
if [ ! -f $(TARGET_DIR)/usr/bin/docker-init ]; then \
ln -sf /usr/bin/tini $(TARGET_DIR)/usr/bin/docker-init; \
fi
endef
# Tini's CMakeLists.txt is not suitable for Buildroot.
$(eval $(generic-package))