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