b46563413bc0a7c92c21a6eeb84e313564a023dd
[scm/bb/meta-tizen.git] / recipes-tizen / location-manager / 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
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 inherit autotools-brokensep
11
12 PROVIDES = ""
13
14 #PROVIDES by capi-location-manager-dev 
15
16
17 #PROVIDES by capi-location-manager 
18
19
20 RDEPENDS = ""
21 #RDEPENDS of capi-location-manager-dev (capi-${PN}-dev)
22 RDEPENDS_capi-${PN}-dev += "capi-location-manager"
23
24
25 DEPENDS = ""
26 #DEPENDS of capi-location-manager 
27 DEPENDS_append_class-native = " cmake-native"
28 DEPENDS_append_class-target = " cmake-native"
29 DEPENDS += "common"
30 DEPENDS += "dlog"
31 DEPENDS += "libslp-location"
32
33 do_prep() {
34  cd ${S}
35  chmod -Rf a+rX,u+w,g-w,o-w ${S}
36  #setup -q
37  cp ${S}/packaging/capi-location-manager.manifest .
38  
39  
40  
41 }
42 do_patch_append() {
43     bb.build.exec_func('do_prep', d)
44 }
45
46 do_configure() {
47 }
48
49 do_compile() {
50  cd ${S}
51  LANG=C
52  export LANG
53  unset DISPLAY
54  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
55  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
56  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
57  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
58  
59  MAJORVER=`echo 0.1.11 | awk 'BEGIN {FS="."}{print $1}'`
60  
61    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
62    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
63    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ; 
64    cmake \
65          -DCMAKE_VERBOSE_MAKEFILE=ON \
66          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
67          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
68          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
69          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
70          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
71          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
72          -DCMAKE_SKIP_RPATH:BOOL=ON \
73          -DBUILD_SHARED_LIBS:BOOL=ON . -DFULLVER=0.1.11 -DMAJORVER=${MAJORVER}
74  
75  make -j16
76  
77  
78  
79 }
80
81 do_install() {
82  echo export RPM_BUILD_ROOT=${D}
83  cd ${S}
84  LANG=C
85  export LANG
86  unset DISPLAY
87  rm -rf ${D} 
88  mkdir -p ${D} 
89  
90  
91    oe_runmake \
92          DESTDIR=${D} \
93          INSTALL_ROOT=${D} \
94          BINDIR=${prefix}/bin \
95    install  
96    rm -f ${D}${infodir}/dir 
97    find ${D} -regex ".*\.la$" | xargs rm -f -- 
98    find ${D} -regex ".*\.a$" | xargs rm -f --
99  
100  
101 }
102
103 PACKAGES += " capi-location-manager-dev "
104 PACKAGES += " capi-location-manager "
105
106 capi-location-manager-dev_files = ""
107 capi-location-manager-dev_files += "capi-location-manager.manifest"
108 capi-location-manager-dev_files += "${prefix}/include/location/*.h"
109 capi-location-manager-dev_files += "${prefix}/lib/pkgconfig/*.pc"
110 capi-location-manager-dev_files += "${prefix}/lib/libcapi-location-manager.so"
111
112 capi-location-manager_files = ""
113 capi-location-manager_files += "capi-location-manager.manifest"
114 capi-location-manager_files += "capi-location-manager.manifest"
115 capi-location-manager_files += "${prefix}/lib/libcapi-location-manager.so.*"
116
117 FILES_${PN}-dev = "${capi-location-manager-dev_files}"
118 FILES_${PN} = "${capi-location-manager_files}"
119
120 PKG_capi-location-manager-dev= "capi-location-manager-dev"
121 PKG_capi-location-manager= "capi-location-manager"
122
123 require location-manager-extraconf.inc
124