Tizen recipes : Fix tizen common build and get little more closer to current Tizen...
[scm/bb/meta-tizen.git] / meta-tizen-ivi / meta-tizen-common-base / recipes-application-framework / capi-web-favorites / capi-web-favorites.inc
1 DESCRIPTION = "Internet bookmark and history API"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Web Framework/API"
4 LICENSE = "Apache-2.0"
5 PV = "0.0.15"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by capi-web-favorites
17
18
19 #PROVIDES by capi-web-favorites-dev
20 PROVIDES += "capi-web-favorites-dev"
21
22
23 RDEPENDS = ""
24 #RDEPENDS of capi-web-favorites (${PN})
25 RDEPENDS_${PN} += "glibc"
26
27 #RDEPENDS of capi-web-favorites-dev (${PN}-dev)
28 RDEPENDS_${PN}-dev += "capi-web-favorites"
29
30
31 DEPENDS = ""
32 #DEPENDS of capi-web-favorites
33 inherit tizen_cmake
34 DEPENDS += "evas"
35 DEPENDS += "tizen-platform-config"
36 inherit pkgconfig
37 DEPENDS += "dlog"
38 DEPENDS += "capi-base-common"
39 DEPENDS += "libslp-db-util"
40
41 do_prep() {
42  cd ${S}
43  chmod -Rf a+rX,u+w,g-w,o-w ${S}
44  #setup -q
45  cp ${S}/packaging/capi-web-favorites.manifest .
46  
47  
48  
49 }
50 do_patch_append() {
51     bb.build.exec_func('do_prep', d)
52 }
53
54 do_configure() {
55 }
56
57 do_compile() {
58  cd ${S}
59  LANG=C
60  export LANG
61  unset DISPLAY
62  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
63  
64  
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 \
75          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
76          ${EXTRA_OECMAKE} . -DTZ_SYS_SHARE=${prefix}/share
77  make -j16
78  
79  
80  
81 }
82
83 do_install() {
84  export RPM_BUILD_ROOT=${D}
85  cd ${S}
86  LANG=C
87  export LANG
88  unset DISPLAY
89  rm -rf ${D}
90  mkdir -p ${D}
91  
92  
93    oe_runmake \
94          DESTDIR=${D} \
95          INSTALL_ROOT=${D} \
96          BINDIR=${prefix}/bin \
97    install  
98    rm -f ${D}${infodir}/dir 
99    find ${D} -regex ".*\.la$" | xargs rm -f -- 
100    find ${D} -regex ".*\.a$" | xargs rm -f --
101  
102  
103 }
104
105 pkg_postinst_${PN}() {
106     #!/bin/sh -e
107
108     [ "x$D" == "x" ] && ldconfig
109     source /etc/tizen-platform.conf
110     users_gid=$(getent group $TZ_SYS_USER_GROUP | cut -f3 -d':')
111     chsmack -a 'User' /opt/usr/dbspace/.browser-history.db*
112     chsmack -a 'User' /opt/usr/dbspace/.internet_bookmark.db*
113     # set default vconf values
114     ##################################################
115     #internal keys
116     vconftool set -t string db/browser/browser_user_agent "System user agent" -g $users_gid -f
117     vconftool set -t string db/browser/custom_user_agent "" -g $users_gid -f
118     #public keys
119     vconftool set -t string db/browser/user_agent "Mozilla/5.0 (Linux; Tizen 2.1; sdk) AppleWebKit/537.3 (KHTML, like Gecko) Version/2.1 Mobile Safari/537.3" -g $users_gid -f
120
121 }
122
123 pkg_postrm_${PN}() {
124     #!/bin/sh -e
125
126     [ "x$D" == "x" ] && ldconfig
127 }
128
129 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
130 PACKAGES += " capi-web-favorites "
131 PACKAGES += " capi-web-favorites-dev "
132
133 capi-web-favorites_files = ""
134 capi-web-favorites_files += "${prefix}/lib/libcapi-web-favorites.so"
135 capi-web-favorites_files += "${prefix}/share/capi-web-favorites/internet_bookmark_DB_init.sh"
136 capi-web-favorites_files += "${prefix}/share/capi-web-favorites/browser_history_DB_init.sh"
137 MANIFESTFILES_${PN} = "capi-web-favorites.manifest"
138
139 capi-web-favorites-dev_files = ""
140 capi-web-favorites-dev_files += "${prefix}/include/web/*.h"
141 capi-web-favorites-dev_files += "${prefix}/lib/pkgconfig/*.pc"
142 MANIFESTFILES_${PN}-dev = "capi-web-favorites.manifest"
143
144 FILES_${PN} = "${capi-web-favorites_files}"
145 FILES_${PN}-dev = "${capi-web-favorites-dev_files}"
146
147 PKG_capi-web-favorites= "capi-web-favorites"
148 PKG_capi-web-favorites-dev= "capi-web-favorites-dev"
149
150 require capi-web-favorites-extraconf.inc
151