365602096de347a1865641f4eeed347f6865748b
[scm/bb/meta-tizen.git] / meta-tizen-common-base / recipes-application-framework / capi-network-bluetooth / capi-network-bluetooth.inc
1 DESCRIPTION = "Network Bluetooth Framework"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Connectivity/API"
4 LICENSE = "Apache-2.0"
5 PV = "0.1.39"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by capi-network-bluetooth-dev
17 PROVIDES += "capi-network-bluetooth-dev"
18
19
20 #PROVIDES by capi-network-bluetooth
21
22
23 RDEPENDS = ""
24 #RDEPENDS of capi-network-bluetooth-dev (${PN}-dev)
25 RDEPENDS_${PN}-dev += "capi-network-bluetooth"
26
27
28 DEPENDS = ""
29 #DEPENDS of capi-network-bluetooth
30 inherit tizen_cmake
31 inherit pkgconfig
32 DEPENDS += "dlog"
33 DEPENDS += "glib-2.0"
34 DEPENDS += "capi-base-common"
35 DEPENDS += "vconf"
36 DEPENDS += "dbus-glib"
37 DEPENDS += "bluetooth-frwk"
38
39 do_prep() {
40  cd ${S}
41  chmod -Rf a+rX,u+w,g-w,o-w ${S}
42  #setup -q
43  cp ${S}/packaging/capi-network-bluetooth.manifest ${S}/packaging/capi-network-bluetooth-devel.manifest .
44  
45  
46 }
47 do_patch_append() {
48     bb.build.exec_func('do_prep', d)
49 }
50
51 do_configure() {
52 }
53
54 do_compile() {
55  cd ${S}
56  LANG=C
57  export LANG
58  unset DISPLAY
59  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
60  
61  MAJORVER=`echo 0.1.39 | awk 'BEGIN {FS="."}{print $1}'`
62  
63    cmake \
64          -DCMAKE_VERBOSE_MAKEFILE=ON \
65          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
66          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
67          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
68          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
69          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
70          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
71          -DCMAKE_SKIP_RPATH:BOOL=ON \
72          -DBUILD_SHARED_LIBS:BOOL=ON \
73          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
74          ${EXTRA_OECMAKE} . -DFULLVER=0.1.39 -DMAJORVER=${MAJORVER}
75  
76  make -j16
77  
78  
79  
80 }
81
82 do_install() {
83  export RPM_BUILD_ROOT=${D}
84  cd ${S}
85  LANG=C
86  export LANG
87  unset DISPLAY
88  rm -rf ${D}
89  mkdir -p ${D}
90  
91  
92    oe_runmake \
93          DESTDIR=${D} \
94          INSTALL_ROOT=${D} \
95          BINDIR=${prefix}/bin \
96    install  
97    rm -f ${D}${infodir}/dir 
98    find ${D} -regex ".*\.la$" | xargs rm -f -- 
99    find ${D} -regex ".*\.a$" | xargs rm -f --
100  
101  
102  
103 }
104
105 pkg_postinst_${PN}() {
106     #!/bin/sh -e
107
108     [ "x$D" == "x" ] && ldconfig
109 }
110
111 pkg_postrm_${PN}() {
112     #!/bin/sh -e
113
114     [ "x$D" == "x" ] && ldconfig
115 }
116
117 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
118 PACKAGES += " capi-network-bluetooth-dev "
119 PACKAGES += " capi-network-bluetooth "
120
121 capi-network-bluetooth-dev_files = ""
122 capi-network-bluetooth-dev_files += "${prefix}/include/network/bluetooth.h"
123 capi-network-bluetooth-dev_files += "${prefix}/lib/pkgconfig/capi-network-bluetooth.pc"
124 capi-network-bluetooth-dev_files += "${prefix}/lib/libcapi-network-bluetooth.so"
125 MANIFESTFILES_${PN}-dev = "capi-network-bluetooth-devel.manifest"
126
127 capi-network-bluetooth_files = ""
128 capi-network-bluetooth_files += "${prefix}/lib/libcapi-network-bluetooth.so.*"
129 MANIFESTFILES_${PN} = "capi-network-bluetooth.manifest"
130
131 FILES_${PN}-dev = "${capi-network-bluetooth-dev_files}"
132 FILES_${PN} = "${capi-network-bluetooth_files}"
133
134 PKG_capi-network-bluetooth-dev= "capi-network-bluetooth-dev"
135 PKG_capi-network-bluetooth= "capi-network-bluetooth"
136
137 require capi-network-bluetooth-extraconf.inc
138