Tizen recipes : Fix tizen common build and get little more closer to current Tizen...
[scm/bb/meta-tizen.git] / meta-tizen-common-base / recipes-application-framework / app-svc / app-svc.inc
1 DESCRIPTION = "Application Service"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Application Framework/Service"
4 LICENSE = "Apache-2.0"
5 PV = "0.1.53"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by app-svc
17
18
19 #PROVIDES by app-svc-dev
20 PROVIDES += "app-svc-dev"
21
22
23 RDEPENDS = ""
24 #RDEPENDS of app-svc (${PN})
25 RDEPENDS_${PN} += "glibc"
26
27 #RDEPENDS of app-svc-dev (${PN}-dev)
28 RDEPENDS_${PN}-dev += "app-svc"
29
30
31 DEPENDS = ""
32 #DEPENDS of app-svc
33 DEPENDS += "pkgmgr-info"
34 DEPENDS += "libsoup-2.4"
35 inherit tizen_cmake
36 DEPENDS += "iniparser"
37 DEPENDS += "tizen-platform-config"
38 inherit pkgconfig
39 DEPENDS += "dlog"
40 DEPENDS += "aul"
41 DEPENDS += "xdgmime"
42 DEPENDS += "ail"
43 DEPENDS += "bundle"
44 DEPENDS += "sqlite3"
45 DEPENDS += "ecore"
46 DEPENDS += "libprivilege-control"
47 DEPENDS += "glib-2.0"
48 DEPENDS += "dbus-glib"
49
50 do_prep() {
51  cd ${S}
52  chmod -Rf a+rX,u+w,g-w,o-w ${S}
53  #setup -q
54  sed -i ${S}/packaging/app-svc.manifest -e "s|TZ_SYS_DB|${prefix}/dbspace|g"
55  cp ${S}/packaging/app-svc.manifest .
56  
57  
58 }
59 do_patch_append() {
60     bb.build.exec_func('do_prep', d)
61 }
62
63 do_configure() {
64 }
65
66 do_compile() {
67  cd ${S}
68  LANG=C
69  export LANG
70  unset DISPLAY
71  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
72  
73  
74    cmake \
75          -DCMAKE_VERBOSE_MAKEFILE=ON \
76          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
77          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
78          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
79          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
80          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
81          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
82          -DCMAKE_SKIP_RPATH:BOOL=ON \
83          -DBUILD_SHARED_LIBS:BOOL=ON \
84          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
85          ${EXTRA_OECMAKE} . \
86  -Dwith_wayland=TRUE
87  
88  oe_runmake -j16
89  
90  
91  
92 }
93
94 do_install() {
95  export RPM_BUILD_ROOT=${D}
96  cd ${S}
97  LANG=C
98  export LANG
99  unset DISPLAY
100  rm -rf ${D}
101  mkdir -p ${D}
102  
103  
104    oe_runmake \
105          DESTDIR=${D} \
106          INSTALL_ROOT=${D} \
107          BINDIR=${prefix}/bin \
108    install  
109    rm -f ${D}${infodir}/dir 
110    find ${D} -regex ".*\.la$" | xargs rm -f -- 
111    find ${D} -regex ".*\.a$" | xargs rm -f --
112  
113  # Create database
114  mkdir -p ${D}${prefix}/dbspace
115  sqlite3 ${D}${prefix}/dbspace/.appsvc.db < data/appsvc_db.sql
116  
117  
118 }
119
120 pkg_postinst_${PN}() {
121     #!/bin/sh -e
122
123     [ "x$D" == "x" ] && ldconfig
124 }
125
126 pkg_postrm_${PN}() {
127     #!/bin/sh -e
128
129     [ "x$D" == "x" ] && ldconfig
130 }
131
132 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
133 PACKAGES += " app-svc "
134 PACKAGES += " app-svc-dev "
135
136 app-svc_files = ""
137 app-svc_files += "%verify(not md5 mtime size) %attr(664,root,users) ${prefix}/dbspace/.appsvc.db"
138 app-svc_files += "%verify(not md5 mtime size) %attr(664,root,users) ${prefix}/dbspace/.appsvc.db-journal"
139 app-svc_files += "${prefix}/bin/appsvc_test"
140 app-svc_files += "${prefix}/lib/libappsvc.so.0"
141 app-svc_files += "${prefix}/lib/libappsvc.so.0.1.0"
142 MANIFESTFILES_${PN} = "app-svc.manifest"
143
144 app-svc-dev_files = ""
145 app-svc-dev_files += "${prefix}/lib/pkgconfig/appsvc.pc"
146 app-svc-dev_files += "${prefix}/lib/libappsvc.so"
147 app-svc-dev_files += "${prefix}/include/appsvc/appsvc.h"
148 MANIFESTFILES_${PN}-dev = "app-svc.manifest"
149
150 FILES_${PN} = "${app-svc_files}"
151 FILES_${PN}-dev = "${app-svc-dev_files}"
152
153 PKG_app-svc= "app-svc"
154 PKG_app-svc-dev= "app-svc-dev"
155
156 require app-svc-extraconf.inc
157