0683f469454db4465068632cc279e81252175b6e
[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 = "ae6f684d830871e81b0b4168424f6a4873eabbff"
19 S = "${WORKDIR}/git"
20
21 inherit cmake pkgconfig
22
23 FILES_${PN} += "${datadir}"
24
25 pkg_postinst_${PN}() {
26         mkdir -p "$D${libdir}/afb"
27 }
28
29 #############################################
30 # setup meta package
31 #############################################
32 PACKAGES += "${PN}-meta"
33 ALLOW_EMPTY_${PN}-meta = "1"
34
35 #############################################
36 # setup sample binding packages
37 #############################################
38 PACKAGES_DYNAMIC = "${PN}-binding-*"
39
40 python populate_packages_prepend () {
41     afb_libdir = d.expand('${libdir}/afb')
42     postinst = d.getVar('binding_postinst', True)
43     pkgs = []
44     pkgs_dbg = []
45
46     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}'))
47     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}'))
48
49     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}'))
50     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}'))
51
52     metapkg = d.getVar('PN', True) + '-meta'
53     d.setVar('RDEPENDS_' + metapkg, ' '.join(pkgs))
54 }
55
56 #############################################
57 # setup libafbwsc package
58 #############################################
59 PACKAGES =+ "libafbwsc libafbwsc-dev libafbwsc-dbg"
60
61 FILES_libafbwsc = "\
62         ${libdir}/libafbwsc.so.* \
63 "
64 FILES_libafbwsc-dev = "\
65         ${includedir}/afb/afb-wsj1.h \
66         ${includedir}/afb/afb-ws-client.h \
67         ${bindir}/afb-client-demo \
68         ${libdir}/libafbwsc.so \
69         ${libdir}/pkgconfig/libafbwsc.pc \
70 "
71 FILES_libafbwsc-dbg = "\
72         ${libdir}/.debug/libafbwsc.so.* \
73         ${bindir}/.debug/afb-client-demo \
74 "
75 RDEPENDS_libafbwsc-dbg += "${PN}-dbg libafbwsc-dev"
76
77 RDEPENDS_${PN}-dev += "libafbwsc-dev"
78