Update recipes generation.
[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 BBCLASSEXTEND += ""
13 PROVIDES = ""
14
15 #PROVIDES by librua 
16
17
18 #PROVIDES by librua-dev 
19
20
21 RDEPENDS = ""
22 #RDEPENDS of librua-dev (${PN}-dev)
23 RDEPENDS_${PN}-dev += "librua"
24
25
26 DEPENDS = ""
27 #DEPENDS of librua 
28 DEPENDS += "sqlite3"
29 DEPENDS += "tizen-platform-config"
30 DEPENDS_append_class-native = " cmake-native"
31 DEPENDS_append_class-target = " cmake-native"
32 DEPENDS += "libslp-db-util"
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/librua.manifest .
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  
60    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
61    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
62    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ; 
63    cmake \
64          -DCMAKE_VERBOSE_MAKEFILE=ON \
65          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
66          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
67          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
68          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
69          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
70          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
71          -DCMAKE_SKIP_RPATH:BOOL=ON \
72          -DBUILD_SHARED_LIBS:BOOL=ON .
73  make -j16
74  
75  
76  
77 }
78
79 do_install() {
80  echo export RPM_BUILD_ROOT=${D}
81  cd ${S}
82  LANG=C
83  export LANG
84  unset DISPLAY
85  rm -rf ${D} 
86  mkdir -p ${D} 
87  
88  
89    oe_runmake \
90          DESTDIR=${D} \
91          INSTALL_ROOT=${D} \
92          BINDIR=${prefix}/bin \
93    install  
94    rm -f ${D}${infodir}/dir 
95    find ${D} -regex ".*\.la$" | xargs rm -f -- 
96    find ${D} -regex ".*\.a$" | xargs rm -f --
97  mkdir -p ${D}%{TZ_SYS_DB}
98  sqlite3 ${D}%{TZ_SYS_DB}/.rua.db < data/rua_db.sql
99  
100  
101 }
102
103
104 librua_files = ""
105 librua_files += "librua.manifest"
106 librua_files += "%attr(0660,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.rua.db*"
107 librua_files += "${prefix}/lib/librua.so.*"
108
109 librua-dev_files = ""
110 librua-dev_files += "librua.manifest"
111 librua-dev_files += "${prefix}/include/rua"
112 librua-dev_files += "${prefix}/include/rua/*.h"
113 librua-dev_files += "${prefix}/lib/librua.so"
114 librua-dev_files += "${prefix}/lib/pkgconfig/rua.pc"
115
116 FILES_${PN} = "${librua_files}"
117 FILES_${PN}-dev = "${librua-dev_files}"
118
119 PKG_librua= "librua"
120 PKG_librua-dev= "librua-dev"
121
122 require librua-extraconf.inc
123