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