summaryrefslogtreecommitdiffstats
path: root/rules/optee-client.make
blob: 042bfdfcc7bb30b0d94048141a710f8be5e50406 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# -*-makefile-*-
#
# Copyright (C) 2017 by Marc Kleine-Budde <mkl@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_OPTEE_CLIENT) += optee-client

#
# Paths and names
#
OPTEE_CLIENT_VERSION	:= 3.4.0
OPTEE_CLIENT_MD5	:= ccefa79858454e9255d1a5f93335e322
OPTEE_CLIENT		:= optee-client-$(OPTEE_CLIENT_VERSION)
OPTEE_CLIENT_SUFFIX	:= tar.gz
OPTEE_CLIENT_URL	:= https://github.com/OP-TEE/optee_client/archive/$(OPTEE_CLIENT_VERSION).$(OPTEE_CLIENT_SUFFIX)
OPTEE_CLIENT_SOURCE	:= $(SRCDIR)/$(OPTEE_CLIENT).$(OPTEE_CLIENT_SUFFIX)
OPTEE_CLIENT_DIR	:= $(BUILDDIR)/$(OPTEE_CLIENT)
OPTEE_CLIENT_LICENSE	:= BSD-2-Clause

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

OPTEE_CLIENT_CONF_TOOL := NO
OPTEE_CLIENT_MAKE_ENV := \
	$(CROSS_ENV) \
	LIBDIR=/usr/lib \
	BINDIR=/usr/bin \
	INCLUDEDIR=/usr/include

ifdef PTXDIST_ICECC
OPTEE_CLIENT_CFLAGS := -C
endif
# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/optee-client.targetinstall:
	@$(call targetinfo)

	@$(call install_init, optee-client)
	@$(call install_fixup, optee-client,PRIORITY,optional)
	@$(call install_fixup, optee-client,SECTION,base)
	@$(call install_fixup, optee-client,AUTHOR,"Marc Kleine-Budde <mkl@pengutronix.de>")
	@$(call install_fixup, optee-client,DESCRIPTION,missing)

	@$(call install_lib, optee-client, 0, 0, 0644, libteec)
	@$(call install_copy, optee-client, 0, 0, 0755, -, /usr/bin/tee-supplicant)
ifdef PTXCONF_OPTEE_CLIENT_SYSTEMD_UNIT
	@$(call install_alternative, optee-client, 0, 0, 0644, \
		/usr/lib/systemd/system/tee-supplicant.service)
	@$(call install_link, optee-client, ../tee-supplicant.service,\
		/usr/lib/systemd/system/multi-user.target.wants/tee-supplicant.service)
endif

	@$(call install_finish, optee-client)

	@$(call touch)

# vim: syntax=make