Update recipes generation.
[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 BBCLASSEXTEND += ""
13 PROVIDES = ""
14
15 #PROVIDES by capi-location-manager-dev 
16
17
18 #PROVIDES by capi-location-manager 
19
20
21 RDEPENDS = ""
22 #RDEPENDS of capi-location-manager-dev (capi-${PN}-dev)
23 RDEPENDS_capi-${PN}-dev += "capi-location-manager"
24
25
26 DEPENDS = ""
27 #DEPENDS of capi-location-manager 
28 DEPENDS_append_class-native = " cmake-native"
29 DEPENDS_append_class-target = " cmake-native"
30 DEPENDS += "common"
31 DEPENDS += "dlog"
32 DEPENDS += "libslp-location"
33
34 do_prep() {
35  cd ${S}
36  chmod -Rf a+rX,u+w,g-w,o-w ${S}
37  #setup -q
38  cp ${S}/packaging/capi-location-manager.manifest .
39  
40  
41  
42 }
43 do_patch_append() {
44     bb.build.exec_func('do_prep', d)
45 }
46
47 do_configure() {
48 }
49
50 do_compile() {
51  cd ${S}
52  LANG=C
53  export LANG
54  unset DISPLAY
55  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
56  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
57  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
58  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
59  
60  MAJORVER=`echo 0.1.11 | awk 'BEGIN {FS="."}{print $1}'`
61  
62    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
63    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
64    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ; 
65    cmake \
66          -DCMAKE_VERBOSE_MAKEFILE=ON \
67          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
68          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
69          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
70          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
71          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
72          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
73          -DCMAKE_SKIP_RPATH:BOOL=ON \
74          -DBUILD_SHARED_LIBS:BOOL=ON . -DFULLVER=0.1.11 -DMAJORVER=${MAJORVER}
75  
76  make -j16
77  
78  
79  
80 }
81
82 do_install() {
83  echo 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 PACKAGES += " capi-location-manager-dev "
105 PACKAGES += " capi-location-manager "
106
107 capi-location-manager-dev_files = ""
108 capi-location-manager-dev_files += "capi-location-manager.manifest"
109 capi-location-manager-dev_files += "${prefix}/include/location/*.h"
110 capi-location-manager-dev_files += "${prefix}/lib/pkgconfig/*.pc"
111 capi-location-manager-dev_files += "${prefix}/lib/libcapi-location-manager.so"
112
113 capi-location-manager_files = ""
114 capi-location-manager_files += "capi-location-manager.manifest"
115 capi-location-manager_files += "capi-location-manager.manifest"
116 capi-location-manager_files += "${prefix}/lib/libcapi-location-manager.so.*"
117
118 FILES_${PN}-dev = "${capi-location-manager-dev_files}"
119 FILES_${PN} = "${capi-location-manager_files}"
120
121 PKG_capi-location-manager-dev= "capi-location-manager-dev"
122 PKG_capi-location-manager= "capi-location-manager"
123
124 require location-manager-extraconf.inc
125