1*4882a593Smuzhiyun################################################################################ 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# balena-engine 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun################################################################################ 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunBALENA_ENGINE_VERSION = 19.03.14 8*4882a593SmuzhiyunBALENA_ENGINE_SITE = $(call github,balena-os,balena-engine,v$(BALENA_ENGINE_VERSION)) 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunBALENA_ENGINE_LICENSE = Apache-2.0 11*4882a593SmuzhiyunBALENA_ENGINE_LICENSE_FILES = LICENSE 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunBALENA_ENGINE_DEPENDENCIES = host-pkgconf 14*4882a593SmuzhiyunBALENA_ENGINE_GOMOD = github.com/docker/docker 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunBALENA_ENGINE_LDFLAGS = \ 17*4882a593Smuzhiyun -X github.com/docker/cli/cli/version.Version=N/A \ 18*4882a593Smuzhiyun -X github.com/docker/cli/cli/version.GitCommit= \ 19*4882a593Smuzhiyun -X github.com/docker/cli/cli/version.BuildTime= \ 20*4882a593Smuzhiyun -X github.com/containerd/containerd/version.Version=N/A \ 21*4882a593Smuzhiyun -X github.com/opencontainers/runc.version=N/A 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunBALENA_ENGINE_TAGS = \ 24*4882a593Smuzhiyun cgo \ 25*4882a593Smuzhiyun exclude_graphdriver_zfs \ 26*4882a593Smuzhiyun autogen \ 27*4882a593Smuzhiyun no_buildkit \ 28*4882a593Smuzhiyun no_btrfs \ 29*4882a593Smuzhiyun no_cri \ 30*4882a593Smuzhiyun no_devmapper \ 31*4882a593Smuzhiyun no_zfs \ 32*4882a593Smuzhiyun exclude_disk_quota \ 33*4882a593Smuzhiyun exclude_graphdriver_btrfs \ 34*4882a593Smuzhiyun exclude_graphdriver_devicemapper 35*4882a593Smuzhiyun 36*4882a593SmuzhiyunBALENA_ENGINE_BUILD_TARGETS = cmd/balena-engine 37*4882a593Smuzhiyun 38*4882a593Smuzhiyunifeq ($(BR2_INIT_SYSTEMD),y) 39*4882a593SmuzhiyunBALENA_ENGINE_DEPENDENCIES += systemd 40*4882a593SmuzhiyunBALENA_ENGINE_TAGS += journald 41*4882a593Smuzhiyunendif 42*4882a593Smuzhiyun 43*4882a593Smuzhiyundefine BALENA_ENGINE_RUN_AUTOGEN 44*4882a593Smuzhiyun cd $(@D) && \ 45*4882a593Smuzhiyun VERSION=$(BALENA_ENGINE_VERSION) \ 46*4882a593Smuzhiyun PKG_CONFIG=$(PKG_CONFIG_HOST_BINARY) \ 47*4882a593Smuzhiyun $(TARGET_MAKE_ENV) \ 48*4882a593Smuzhiyun $(SHELL) hack/make/.go-autogen 49*4882a593Smuzhiyunendef 50*4882a593Smuzhiyun 51*4882a593SmuzhiyunBALENA_ENGINE_POST_CONFIGURE_HOOKS += BALENA_ENGINE_RUN_AUTOGEN 52*4882a593Smuzhiyun 53*4882a593Smuzhiyundefine BALENA_ENGINE_INSTALL_INIT_SYSTEMD 54*4882a593Smuzhiyun $(INSTALL) -D -m 644 $(@D)/contrib/init/systemd/balena-engine.service \ 55*4882a593Smuzhiyun $(TARGET_DIR)/usr/lib/systemd/system/balena-engine.service 56*4882a593Smuzhiyun $(INSTALL) -D -m 644 $(@D)/contrib/init/systemd/balena-engine.socket \ 57*4882a593Smuzhiyun $(TARGET_DIR)/usr/lib/systemd/system/balena-engine.socket 58*4882a593Smuzhiyunendef 59*4882a593Smuzhiyun 60*4882a593Smuzhiyundefine BALENA_ENGINE_USERS 61*4882a593Smuzhiyun - - balena-engine -1 * - - - balenaEngine daemon 62*4882a593Smuzhiyunendef 63*4882a593Smuzhiyun 64*4882a593Smuzhiyundefine BALENA_ENGINE_LINUX_CONFIG_FIXUPS 65*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_POSIX_MQUEUE) 66*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS) 67*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_MEMCG) 68*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_SCHED) 69*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_FREEZER) 70*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_CPUSETS) 71*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_DEVICE) 72*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_CPUACCT) 73*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_NAMESPACES) 74*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_UTS_NS) 75*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_IPC_NS) 76*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_PID_NS) 77*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_NET_NS) 78*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER) 79*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED) 80*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE_NETFILTER) 81*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK) 82*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_ADDRTYPE) 83*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_CONNTRACK) 84*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_IPVS) 85*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES) 86*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER) 87*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_NAT) 88*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_TARGET_MASQUERADE) 89*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE) 90*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_DUMMY) 91*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_MACVLAN) 92*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_VXLAN) 93*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_VETH) 94*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS) 95*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_KEYS) 96*4882a593Smuzhiyunendef 97*4882a593Smuzhiyun 98*4882a593Smuzhiyundefine BALENA_ENGINE_INSTALL_SYMLINK 99*4882a593Smuzhiyun ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-daemon 100*4882a593Smuzhiyun ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-containerd 101*4882a593Smuzhiyun ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-containerd-shim 102*4882a593Smuzhiyun ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-containerd-ctr 103*4882a593Smuzhiyun ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-runc 104*4882a593Smuzhiyun ln -f -s balena-engine $(TARGET_DIR)/usr/bin/balena-engine-proxy 105*4882a593Smuzhiyun $(if $(BR2_PACKAGE_TINI),ln -f -s tini $(TARGET_DIR)/usr/bin/balena-engine-init) 106*4882a593Smuzhiyunendef 107*4882a593SmuzhiyunBALENA_ENGINE_POST_INSTALL_TARGET_HOOKS += BALENA_ENGINE_INSTALL_SYMLINK 108*4882a593Smuzhiyun 109*4882a593Smuzhiyun$(eval $(golang-package)) 110