libwebsockets: correct build issue
[scm/bb/meta-tizen.git] / recipes-tizen / favorites / 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
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 inherit autotools-brokensep
11
12 BBCLASSEXTEND = ""
13 PROVIDES = ""
14
15 #PROVIDES by capi-web-favorites
16 PROVIDES += "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 (capi-web-${PN})
25 RDEPENDS_capi-web-${PN} += "eglibc"
26
27 #RDEPENDS of capi-web-favorites-dev (capi-web-${PN}-dev)
28 RDEPENDS_capi-web-${PN}-dev += "capi-web-favorites"
29
30
31 DEPENDS = ""
32 #DEPENDS of capi-web-favorites
33 DEPENDS_append_class-native = " cmake-native"
34 DEPENDS_append_class-target = " cmake-native"
35 DEPENDS += "evas"
36 DEPENDS += "tizen-platform-config"
37 DEPENDS += "dlog"
38 DEPENDS += "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          ${EXTRA_OECMAKE} . -DTZ_SYS_SHARE=${prefix}/share
76  make -j16
77  
78  
79  
80 }
81
82 do_install() {
83  echo export RPM_BUILD_ROOT=${D}
84  cd ${S}
85  LANG=C
86  export LANG
87  unset DISPLAY
88  rm -rf ${D}
89  mkdir -p ${D}
90  
91  
92    oe_runmake \
93          DESTDIR=${D} \
94          INSTALL_ROOT=${D} \
95          BINDIR=${prefix}/bin \
96    install  
97    rm -f ${D}${infodir}/dir 
98    find ${D} -regex ".*\.la$" | xargs rm -f -- 
99    find ${D} -regex ".*\.a$" | xargs rm -f --
100  
101  
102 }
103
104 pkg_postinst_${PN}() {
105     #!/bin/sh -e
106
107     [ "x\$D" == "x" ] && ldconfig
108     source /etc/tizen-platform.conf
109     users_gid=$(getent group $TZ_SYS_USER_GROUP | cut -f3 -d':')
110     chsmack -a 'User' /opt/usr/dbspace/.browser-history.db*
111     chsmack -a 'User' /opt/usr/dbspace/.internet_bookmark.db*
112     # set default vconf values
113     ##################################################
114     #internal keys
115     vconftool set -t string db/browser/browser_user_agent "System user agent" -g $users_gid -f
116     vconftool set -t string db/browser/custom_user_agent "" -g $users_gid -f
117     #public keys
118     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
119
120 }
121
122 pkg_postrm_${PN}() {
123     #!/bin/sh -e
124
125     [ "x\$D" == "x" ] && ldconfig
126 }
127
128 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
129 PACKAGES += " capi-web-favorites "
130 PACKAGES += " capi-web-favorites-dev "
131
132 capi-web-favorites_files = ""
133 capi-web-favorites_files += "${prefix}/lib/libcapi-web-favorites.so"
134 capi-web-favorites_files += "${prefix}/share/capi-web-favorites/internet_bookmark_DB_init.sh"
135 capi-web-favorites_files += "${prefix}/share/capi-web-favorites/browser_history_DB_init.sh"
136 MANIFESTFILES_capi-web-${PN} = "capi-web-favorites.manifest"
137
138 capi-web-favorites-dev_files = ""
139 capi-web-favorites-dev_files += "${prefix}/include/web/*.h"
140 capi-web-favorites-dev_files += "${prefix}/lib/pkgconfig/*.pc"
141 MANIFESTFILES_capi-web-${PN}-dev = "capi-web-favorites.manifest"
142
143 FILES_capi-web-${PN} = "${capi-web-favorites_files}"
144 FILES_capi-web-${PN}-dev = "${capi-web-favorites-dev_files}"
145
146 PKG_capi-web-favorites= "capi-web-favorites"
147 PKG_capi-web-favorites-dev= "capi-web-favorites-dev"
148
149 require favorites-extraconf.inc
150