094915c7a95796b848cfcdb06b1cfb0f3528f35b
[scm/bb/meta-tizen.git] / recipes-tizen / librua / librua.inc
1 DESCRIPTION = "Recently used application"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Application Framework/Libraries"
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 librua 
15
16
17 #PROVIDES by librua-dev 
18
19
20 RDEPENDS = ""
21 #RDEPENDS of librua-dev (${PN}-dev)
22 RDEPENDS_${PN}-dev += "librua"
23
24
25 DEPENDS = ""
26 #DEPENDS of librua 
27 DEPENDS += "sqlite3"
28 DEPENDS += "tizen-platform-config"
29 DEPENDS_append_class-native = " cmake-native"
30 DEPENDS_append_class-target = " cmake-native"
31 DEPENDS += "libslp-db-util"
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/librua.manifest .
38  
39  
40 }
41 do_patch_append() {
42     bb.build.exec_func('do_prep', d)
43 }
44
45 do_configure() {
46 }
47
48 do_compile() {
49  cd ${S}
50  LANG=C
51  export LANG
52  unset DISPLAY
53  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
54  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
55  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
56  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
57  
58  
59    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
60    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
61    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ; 
62    cmake \
63          -DCMAKE_VERBOSE_MAKEFILE=ON \
64          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
65          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
66          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
67          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
68          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
69          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
70          -DCMAKE_SKIP_RPATH:BOOL=ON \
71          -DBUILD_SHARED_LIBS:BOOL=ON .
72  make -j16
73  
74  
75  
76 }
77
78 do_install() {
79  echo 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  mkdir -p ${D}%{TZ_SYS_DB}
97  sqlite3 ${D}%{TZ_SYS_DB}/.rua.db < data/rua_db.sql
98  
99  
100 }
101
102
103 librua_files = ""
104 librua_files += "librua.manifest"
105 librua_files += "%attr(0660,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.rua.db*"
106 librua_files += "${prefix}/lib/librua.so.*"
107
108 librua-dev_files = ""
109 librua-dev_files += "librua.manifest"
110 librua-dev_files += "${prefix}/include/rua"
111 librua-dev_files += "${prefix}/include/rua/*.h"
112 librua-dev_files += "${prefix}/lib/librua.so"
113 librua-dev_files += "${prefix}/lib/pkgconfig/rua.pc"
114
115 FILES_${PN} = "${librua_files}"
116 FILES_${PN}-dev = "${librua-dev_files}"
117
118 PKG_librua= "librua"
119 PKG_librua-dev= "librua-dev"
120
121 require librua-extraconf.inc
122