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