0fc3a67e55201c1b94891438df9ffa5e34608664
[AGL/meta-agl.git] / meta-app-framework / recipes-core / af-binder / af-binder_1.0.bb
1 SUMMARY = "HTTP REST interface to automotive backends for HTML5 UI support"
2 DESCRIPTION = "Automotive-Framework-Binder Daemon provides a HTTP REST \
3 interface to various automotive-oriented bindings, \
4 allowing HTML5 UIs to send platform-specific requests in a secure way."
5 HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-binder"
6
7 LICENSE = "Apache-2.0"
8 LIC_FILES_CHKSUM = "file://LICENSE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
9
10 DEPENDS = "file json-c libmicrohttpd systemd util-linux openssl cynara"
11
12 SRC_URI_git = "git://gerrit.automotivelinux.org/gerrit/src/app-framework-binder;protocol=https;branch=master"
13 SRC_URI_files = ""
14 SRC_URI = "${SRC_URI_git} \
15            ${SRC_URI_files} \
16           "
17
18 SRCREV = "913e41d02977ee045490fbdcc94979c122c6a981"
19 PV = "master+git${SRCPV}"
20
21 S = "${WORKDIR}/git"
22
23 inherit cmake pkgconfig
24
25 EXTRA_OECMAKE_append_agl-devel = " -DAGL_DEVEL=ON -DINCLUDE_MONITORING=ON"
26
27 pkg_postinst_${PN}() {
28         mkdir -p "$D${libdir}/afb"
29 }
30
31 #############################################
32 # setup package
33 #############################################
34 PACKAGES += "${PN}-tools ${PN}-meta"
35
36 FILES_${PN} += "${datadir}"
37
38 FILES_${PN}_append_agl-devel = " ${libdir}/afb/monitoring"
39
40 ALLOW_EMPTY_${PN}-meta = "1"
41
42 FILES_${PN}-tools = "\
43         ${bindir}/afb-client-demo \
44         ${bindir}/afb-genskel \
45 "
46
47 RDEPENDS_${PN}-dev += "libafbwsc-dev"
48
49 #############################################
50 # setup sample binding packages
51 #############################################
52 PACKAGES_DYNAMIC = "${PN}-binding-*"
53
54 python populate_packages_prepend () {
55     afb_libdir = d.expand('${libdir}/afb')
56     postinst = d.getVar('binding_postinst', True)
57     pkgs = []
58     pkgs_dbg = []
59
60     pkgs += do_split_packages(d, afb_libdir, '(.*)-api\.so$', d.expand('${PN}-binding-%s'), 'AFB binding for %s', postinst=postinst, extra_depends=d.expand('${PN}'))
61     pkgs += do_split_packages(d, afb_libdir, '(.*(?!-api))\.so$', d.expand('${PN}-binding-%s'), 'AFB binding for %s', postinst=postinst, extra_depends=d.expand('${PN}'))
62
63     pkgs_dbg += do_split_packages(d, oe.path.join(afb_libdir, ".debug"), '(.*)-api\.so$', d.expand('${PN}-binding-%s-dbg'), 'AFB binding for %s, debug info', postinst=postinst, extra_depends=d.expand('${PN}'))
64     pkgs_dbg += do_split_packages(d, oe.path.join(afb_libdir, ".debug"), '(.*(?!-api))\.so$', d.expand('${PN}-binding-%s-dbg'), 'AFB binding for %s, debug info', postinst=postinst, extra_depends=d.expand('${PN}'))
65
66     metapkg = d.getVar('PN', True) + '-meta'
67     d.setVar('RDEPENDS_' + metapkg, ' '.join(pkgs))
68 }
69
70 #############################################
71 # setup libafbwsc package
72 #############################################
73 PACKAGES =+ "libafbwsc libafbwsc-dev libafbwsc-dbg"
74
75 FILES_libafbwsc = "\
76         ${libdir}/libafbwsc.so.* \
77 "
78 FILES_libafbwsc-dev = "\
79         ${includedir}/afb/afb-wsj1.h \
80         ${includedir}/afb/afb-ws-client.h \
81         ${libdir}/libafbwsc.so \
82         ${libdir}/pkgconfig/libafbwsc.pc \
83 "
84 FILES_libafbwsc-dbg = "\
85         ${libdir}/.debug/libafbwsc.so.* \
86         ${bindir}/.debug/afb-client-demo \
87 "
88 RDEPENDS_libafbwsc-dbg += "${PN}-dbg libafbwsc-dev"
89
90