0c9a78d3a3bc3a04fbfe9b141db19d7c8dc23956
[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 = "305d98f7b6db1a3207cc877bd2cda819e3b90656"
19 PV = "master+git${SRCPV}"
20
21 S = "${WORKDIR}/git"
22
23 inherit cmake pkgconfig
24
25 CFLAGS_append_agl-devel = " -DAGL_DEVEL"
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 ALLOW_EMPTY_${PN}-meta = "1"
39
40 FILES_${PN}-tools = "\
41         ${bindir}/afb-client-demo \
42         ${bindir}/afb-genskel \
43 "
44
45 RDEPENDS_${PN}-dev += "libafbwsc-dev"
46
47 #############################################
48 # setup sample binding packages
49 #############################################
50 PACKAGES_DYNAMIC = "${PN}-binding-*"
51
52 python populate_packages_prepend () {
53     afb_libdir = d.expand('${libdir}/afb')
54     postinst = d.getVar('binding_postinst', True)
55     pkgs = []
56     pkgs_dbg = []
57
58     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}'))
59     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}'))
60
61     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}'))
62     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}'))
63
64     metapkg = d.getVar('PN', True) + '-meta'
65     d.setVar('RDEPENDS_' + metapkg, ' '.join(pkgs))
66 }
67
68 #############################################
69 # setup libafbwsc package
70 #############################################
71 PACKAGES =+ "libafbwsc libafbwsc-dev libafbwsc-dbg"
72
73 FILES_libafbwsc = "\
74         ${libdir}/libafbwsc.so.* \
75 "
76 FILES_libafbwsc-dev = "\
77         ${includedir}/afb/afb-wsj1.h \
78         ${includedir}/afb/afb-ws-client.h \
79         ${libdir}/libafbwsc.so \
80         ${libdir}/pkgconfig/libafbwsc.pc \
81 "
82 FILES_libafbwsc-dbg = "\
83         ${libdir}/.debug/libafbwsc.so.* \
84         ${bindir}/.debug/afb-client-demo \
85 "
86 RDEPENDS_libafbwsc-dbg += "${PN}-dbg libafbwsc-dev"
87
88