fe660e0f5f3963f720f1707111822358b78ce2c7
[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 += "aul-1"
29 DEPENDS += "tizen-platform-config"
30 DEPENDS += "cmake"
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          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake .
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