2018-05-04 11:21:59 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# mender
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-03-20 23:28:34 +01:00
|
|
|
MENDER_VERSION = 2.5.0
|
2019-02-13 22:05:04 +01:00
|
|
|
MENDER_SITE = https://github.com/mendersoftware/mender/archive
|
|
|
|
MENDER_SOURCE = $(MENDER_VERSION).tar.gz
|
2018-08-20 15:09:10 +02:00
|
|
|
MENDER_LICENSE = Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, MIT, OLDAP-2.8
|
|
|
|
|
|
|
|
# Vendor license paths generated with:
|
|
|
|
# awk '{print $2}' LIC_FILES_CHKSUM.sha256 | grep vendor
|
|
|
|
MENDER_LICENSE_FILES = \
|
|
|
|
LICENSE \
|
|
|
|
LIC_FILES_CHKSUM.sha256 \
|
|
|
|
vendor/github.com/mendersoftware/mender-artifact/LICENSE \
|
2021-03-07 23:25:34 +01:00
|
|
|
vendor/github.com/mendersoftware/openssl/LICENSE \
|
2021-04-01 17:44:51 +02:00
|
|
|
vendor/github.com/minio/sha256-simd/LICENSE \
|
|
|
|
vendor/github.com/mendersoftware/progressbar/LICENSE \
|
2018-08-20 15:09:10 +02:00
|
|
|
vendor/github.com/pkg/errors/LICENSE \
|
2021-04-01 17:44:51 +02:00
|
|
|
vendor/github.com/godbus/dbus/LICENSE \
|
|
|
|
vendor/github.com/klauspost/compress/LICENSE \
|
2018-08-20 15:09:10 +02:00
|
|
|
vendor/github.com/pmezard/go-difflib/LICENSE \
|
2019-10-28 18:37:49 +01:00
|
|
|
vendor/golang.org/x/crypto/LICENSE \
|
2018-08-20 15:09:10 +02:00
|
|
|
vendor/golang.org/x/sys/LICENSE \
|
|
|
|
vendor/github.com/bmatsuo/lmdb-go/LICENSE.md \
|
2019-10-28 18:37:49 +01:00
|
|
|
vendor/github.com/remyoudompheng/go-liblzma/LICENSE \
|
2018-08-20 15:09:10 +02:00
|
|
|
vendor/github.com/davecgh/go-spew/LICENSE \
|
2021-04-01 17:44:51 +02:00
|
|
|
vendor/github.com/klauspost/pgzip/LICENSE \
|
2019-10-28 18:37:49 +01:00
|
|
|
vendor/github.com/sirupsen/logrus/LICENSE \
|
2018-08-20 15:09:10 +02:00
|
|
|
vendor/github.com/stretchr/testify/LICENSE \
|
|
|
|
vendor/github.com/ungerik/go-sysfs/LICENSE \
|
2021-03-07 23:25:34 +01:00
|
|
|
vendor/github.com/urfave/cli/v2/LICENSE \
|
|
|
|
vendor/github.com/stretchr/objx/LICENSE \
|
|
|
|
vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE \
|
|
|
|
vendor/gopkg.in/yaml.v3/LICENSE \
|
2021-04-01 17:44:51 +02:00
|
|
|
vendor/github.com/mattn/go-isatty/LICENSE \
|
2018-08-20 15:09:10 +02:00
|
|
|
vendor/github.com/bmatsuo/lmdb-go/LICENSE.mdb.md
|
2018-05-04 11:21:59 +02:00
|
|
|
|
2021-04-01 17:44:52 +02:00
|
|
|
MENDER_DEPENDENCIES = host-pkgconf openssl
|
2019-05-29 14:37:27 +02:00
|
|
|
|
2021-03-20 23:28:33 +01:00
|
|
|
MENDER_LDFLAGS = -X github.com/mendersoftware/mender/conf.Version=$(MENDER_VERSION)
|
2018-08-20 15:09:11 +02:00
|
|
|
|
2020-07-15 19:37:07 +02:00
|
|
|
MENDER_UPDATE_MODULES_FILES = \
|
|
|
|
directory \
|
|
|
|
script \
|
2020-07-16 01:19:16 +02:00
|
|
|
single-file \
|
2020-07-15 19:37:07 +02:00
|
|
|
$(if $(BR2_PACKAGE_DOCKER_CLI),docker) \
|
|
|
|
$(if $(BR2_PACKAGE_RPM),rpm)
|
|
|
|
|
2018-05-04 11:21:59 +02:00
|
|
|
define MENDER_INSTALL_CONFIG_FILES
|
2018-08-20 15:09:04 +02:00
|
|
|
$(INSTALL) -d -m 755 $(TARGET_DIR)/etc/mender/scripts
|
2020-07-15 19:37:06 +02:00
|
|
|
echo -n "3" > $(TARGET_DIR)/etc/mender/scripts/version
|
2018-08-20 15:09:04 +02:00
|
|
|
|
2018-08-20 15:09:12 +02:00
|
|
|
$(INSTALL) -D -m 0644 $(MENDER_PKGDIR)/mender.conf \
|
2018-05-04 11:21:59 +02:00
|
|
|
$(TARGET_DIR)/etc/mender/mender.conf
|
2018-08-20 15:09:12 +02:00
|
|
|
$(INSTALL) -D -m 0644 $(MENDER_PKGDIR)/server.crt \
|
2018-05-04 11:21:59 +02:00
|
|
|
$(TARGET_DIR)/etc/mender/server.crt
|
2018-08-20 15:09:01 +02:00
|
|
|
|
2018-08-20 15:09:09 +02:00
|
|
|
$(INSTALL) -D -m 0755 $(@D)/support/mender-device-identity \
|
2018-08-20 15:09:01 +02:00
|
|
|
$(TARGET_DIR)/usr/share/mender/identity/mender-device-identity
|
2019-05-14 11:04:50 +02:00
|
|
|
$(foreach f,hostinfo network os rootfs-type, \
|
2018-08-20 15:09:09 +02:00
|
|
|
$(INSTALL) -D -m 0755 $(@D)/support/mender-inventory-$(f) \
|
|
|
|
$(TARGET_DIR)/usr/share/mender/inventory/mender-inventory-$(f)
|
|
|
|
)
|
2019-02-05 11:49:55 +01:00
|
|
|
|
2021-03-20 23:28:32 +01:00
|
|
|
$(INSTALL) -D -m 0755 $(MENDER_PKGDIR)/artifact_info \
|
2019-02-05 11:49:57 +01:00
|
|
|
$(TARGET_DIR)/etc/mender/artifact_info
|
|
|
|
|
2021-03-20 23:28:32 +01:00
|
|
|
$(INSTALL) -D -m 0755 $(MENDER_PKGDIR)/device_type \
|
2019-02-05 11:49:58 +01:00
|
|
|
$(TARGET_DIR)/etc/mender/device_type
|
|
|
|
|
2019-02-15 22:42:53 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/var/lib
|
2019-02-05 11:49:55 +01:00
|
|
|
ln -snf /var/run/mender $(TARGET_DIR)/var/lib/mender
|
2020-07-15 19:37:07 +02:00
|
|
|
$(foreach f,$(MENDER_UPDATE_MODULES_FILES), \
|
|
|
|
$(INSTALL) -D -m 0755 $(@D)/support/modules/$(notdir $(f)) \
|
|
|
|
$(TARGET_DIR)/usr/share/mender/modules/v3/$(notdir $(f))
|
|
|
|
)
|
2018-05-04 11:21:59 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
MENDER_POST_INSTALL_TARGET_HOOKS += MENDER_INSTALL_CONFIG_FILES
|
|
|
|
|
2021-04-01 17:44:52 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_XZ),y)
|
|
|
|
MENDER_DEPENDENCIES += xz
|
|
|
|
else
|
|
|
|
MENDER_TAGS += nolzma
|
|
|
|
endif
|
|
|
|
|
2021-03-20 23:28:35 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DBUS),y)
|
|
|
|
define MENDER_INSTALL_DBUS_AUTHENTICATION_MANAGER_CONF
|
|
|
|
$(INSTALL) -D -m 0755 $(@D)/support/dbus/io.mender.AuthenticationManager.conf \
|
|
|
|
$(TARGET_DIR)/etc/dbus-1/system.d/io.mender.AuthenticationManager.conf
|
|
|
|
endef
|
|
|
|
MENDER_POST_INSTALL_TARGET_HOOKS += MENDER_INSTALL_DBUS_AUTHENTICATION_MANAGER_CONF
|
2021-04-01 17:44:53 +02:00
|
|
|
else
|
|
|
|
MENDER_TAGS += nodbus
|
2021-03-20 23:28:35 +01:00
|
|
|
endif
|
|
|
|
|
2018-05-04 11:21:59 +02:00
|
|
|
define MENDER_INSTALL_INIT_SYSTEMD
|
2020-08-28 19:08:44 +02:00
|
|
|
$(INSTALL) -D -m 0644 $(MENDER_PKGDIR)/mender-client.service \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/mender-client.service
|
2018-05-04 11:21:59 +02:00
|
|
|
endef
|
|
|
|
|
2019-02-05 11:49:56 +01:00
|
|
|
define MENDER_INSTALL_INIT_SYSV
|
2021-03-20 23:28:32 +01:00
|
|
|
$(INSTALL) -D -m 755 $(MENDER_PKGDIR)/S42mender \
|
2019-02-05 15:16:41 +01:00
|
|
|
$(TARGET_DIR)/etc/init.d/S42mender
|
2019-02-05 11:49:56 +01:00
|
|
|
endef
|
|
|
|
|
2018-05-04 11:21:59 +02:00
|
|
|
$(eval $(golang-package))
|