2018-05-04 11:21:59 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# mender
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2018-12-23 02:35:00 +01:00
|
|
|
MENDER_VERSION = 1.7.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/mendertesting/LICENSE \
|
|
|
|
vendor/github.com/mendersoftware/log/LICENSE \
|
|
|
|
vendor/github.com/mendersoftware/log/COPYING \
|
|
|
|
vendor/github.com/mendersoftware/scopestack/LICENSE \
|
|
|
|
vendor/github.com/mendersoftware/scopestack/COPYING \
|
|
|
|
vendor/github.com/mendersoftware/mender-artifact/LICENSE \
|
|
|
|
vendor/github.com/pkg/errors/LICENSE \
|
|
|
|
vendor/github.com/pmezard/go-difflib/LICENSE \
|
|
|
|
vendor/golang.org/x/sys/LICENSE \
|
|
|
|
vendor/golang.org/x/net/LICENSE \
|
|
|
|
vendor/github.com/bmatsuo/lmdb-go/LICENSE.md \
|
|
|
|
vendor/github.com/davecgh/go-spew/LICENSE \
|
|
|
|
vendor/github.com/Sirupsen/logrus/LICENSE \
|
|
|
|
vendor/github.com/stretchr/testify/LICENSE \
|
|
|
|
vendor/github.com/stretchr/testify/LICENCE.txt \
|
|
|
|
vendor/github.com/stretchr/objx/LICENSE.md \
|
|
|
|
vendor/github.com/ungerik/go-sysfs/LICENSE \
|
|
|
|
vendor/github.com/bmatsuo/lmdb-go/LICENSE.mdb.md
|
2018-05-04 11:21:59 +02:00
|
|
|
|
2018-08-20 15:09:11 +02:00
|
|
|
MENDER_LDFLAGS = -X main.Version=$(MENDER_VERSION)
|
|
|
|
|
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
|
|
|
|
echo -n "2" > $(TARGET_DIR)/etc/mender/scripts/version
|
|
|
|
|
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
|
2018-08-20 15:09:09 +02:00
|
|
|
$(foreach f,hostinfo network, \
|
|
|
|
$(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
|
|
|
|
2019-02-05 11:49:57 +01:00
|
|
|
$(INSTALL) -D -m 0755 package/mender/artifact_info \
|
|
|
|
$(TARGET_DIR)/etc/mender/artifact_info
|
|
|
|
|
2019-02-05 11:49:58 +01:00
|
|
|
$(INSTALL) -D -m 0755 package/mender/device_type \
|
|
|
|
$(TARGET_DIR)/etc/mender/device_type
|
|
|
|
|
2019-02-05 11:49:55 +01:00
|
|
|
ln -snf /var/run/mender $(TARGET_DIR)/var/lib/mender
|
2018-05-04 11:21:59 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
MENDER_POST_INSTALL_TARGET_HOOKS += MENDER_INSTALL_CONFIG_FILES
|
|
|
|
|
|
|
|
define MENDER_INSTALL_INIT_SYSTEMD
|
2018-08-20 15:09:12 +02:00
|
|
|
$(INSTALL) -D -m 0644 $(MENDER_PKGDIR)/mender.service \
|
2018-05-04 11:21:59 +02:00
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/mender.service
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
ln -fs ../../../../usr/lib/systemd/system/mender.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mender.service
|
|
|
|
endef
|
|
|
|
|
2019-02-05 11:49:56 +01:00
|
|
|
define MENDER_INSTALL_INIT_SYSV
|
2019-02-05 15:16:41 +01:00
|
|
|
$(INSTALL) -D -m 755 package/mender/S42mender \
|
|
|
|
$(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))
|