first commit
[scm/bb/meta-tizen.git] / recipes-tizen / route / route.inc
1 DESCRIPTION = "A Location Route library in Tizen Native API"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "API/C API"
4 LICENSE = "Apache-2.0"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by capi-location-route 
13 PROVIDES += "capi-location-route"
14 RPROVIDES_capi-location-route += "capi-location-route"
15
16 #PROVIDES by capi-location-route-devel 
17 PROVIDES += "capi-location-route-devel"
18 RPROVIDES_capi-location-route-devel += "capi-location-route-devel"
19 RPROVIDES_capi-location-route-devel += "capi-location-route-dev"
20
21 RDEPENDS = ""
22 #RDEPENDS of capi-location-route-devel (capi-location-${PN}-devel)
23 RDEPENDS_capi-location-${PN}-devel += "capi-location-route"
24
25
26 DEPENDS = ""
27 #DEPENDS of capi-location-route 
28 DEPENDS += "pkgconfig(location)"
29 DEPENDS += "cmake"
30 DEPENDS += "common"
31 DEPENDS += "pkgconfig(capi-location-manager)"
32 DEPENDS += "dlog"
33
34 do_patch() {
35  chmod -Rf a+rX,u+w,g-w,o-w ${S}
36  #setup -q
37  cp ${S}/packaging/capi-location-route.manifest .
38  
39  
40 }
41
42 do_configure() {
43 }
44
45 do_compile() {
46  LANG=C
47  export LANG
48  unset DISPLAY
49  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
50  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
51  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
52  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
53  
54  MAJORVER=`echo 0.1.4 | awk 'BEGIN {FS="."}{print $1}'`
55  
56    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
57    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
58    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ; 
59    cmake \
60          -DCMAKE_VERBOSE_MAKEFILE=ON \
61          -DCMAKE_INSTALL_PREFIX:PATH=/usr \
62          -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib \
63          -DINCLUDE_INSTALL_DIR:PATH=/usr/include \
64          -DLIB_INSTALL_DIR:PATH=/usr/lib \
65          -DSYSCONF_INSTALL_DIR:PATH=/etc \
66          -DSHARE_INSTALL_PREFIX:PATH=/usr/share \
67          -DCMAKE_SKIP_RPATH:BOOL=ON \
68          -DBUILD_SHARED_LIBS:BOOL=ON \
69          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake . -DFULLVER=0.1.4 -DMAJORVER=${MAJORVER}
70  
71  
72  make -j16
73  
74  
75  
76 }
77
78 do_install() {
79  echo export RPM_BUILD_ROOT=${D}
80  LANG=C
81  export LANG
82  unset DISPLAY
83  rm -rf ${D} 
84  mkdir -p ${D} 
85  
86  
87    oe_runmake \
88          DESTDIR=${D} \
89          INSTALL_ROOT=${D} \
90          BINDIR=/usr/bin \
91    install  
92    rm -f ${D}/usr/share/info/dir 
93    find ${D} -regex ".*\.la$" | xargs rm -f -- 
94    find ${D} -regex ".*\.a$" | xargs rm -f --
95  
96  
97 }
98
99 PACKAGES = ""
100 PACKAGES += "capi-location-route"
101 PACKAGES += "capi-location-route-devel"
102
103 capi-location-route_files = ""
104 capi-location-route_files += "capi-location-route.manifest"
105 capi-location-route_files += "/usr/lib/libcapi-location-route.so.*"
106
107 capi-location-route-devel_files = ""
108 capi-location-route-devel_files += "capi-location-route.manifest"
109 capi-location-route-devel_files += "/usr/include/location/*.h"
110 capi-location-route-devel_files += "/usr/lib/pkgconfig/*.pc"
111 capi-location-route-devel_files += "/usr/lib/libcapi-location-route.so"
112
113 FILES_${PN} = "${capi-location-route_files}"
114 FILES_${PN}-devel = "${capi-location-route-devel_files}"
115
116 PKG_capi-location-route= "capi-location-route"
117 PKG_capi-location-route-devel= "capi-location-route-devel"
118
119 require route-extraconf.inc