Update recipes generation.
[scm/bb/meta-tizen.git] / recipes-tizen / 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
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 inherit autotools-brokensep
11
12 BBCLASSEXTEND += ""
13 PROVIDES = ""
14
15 #PROVIDES by app-svc 
16
17
18 #PROVIDES by app-svc-dev 
19
20
21 RDEPENDS = ""
22 #RDEPENDS of app-svc (${PN})
23 RDEPENDS_${PN} += "eglibc"
24
25 #RDEPENDS of app-svc-dev (${PN}-dev)
26 RDEPENDS_${PN}-dev += "app-svc"
27
28
29 DEPENDS = ""
30 #DEPENDS of app-svc 
31 DEPENDS += "pkgmgr-info"
32 DEPENDS += "aul-1"
33 DEPENDS_append_class-native = " cmake-native"
34 DEPENDS_append_class-target = " cmake-native"
35 DEPENDS += "iniparser"
36 DEPENDS += "dbus"
37 DEPENDS += "bundle"
38 DEPENDS += "glib-2.0"
39 DEPENDS += "xdgmime"
40 DEPENDS += "ail"
41 DEPENDS += "dlog"
42 DEPENDS += "libsoup-2.4"
43 DEPENDS += "sqlite3"
44 DEPENDS += "ecore"
45 DEPENDS += "libprivilege-control"
46
47 do_prep() {
48  cd ${S}
49  chmod -Rf a+rX,u+w,g-w,o-w ${S}
50  #setup -q
51  cp ${S}/packaging/app-svc.manifest .
52  
53  
54 }
55 do_patch_append() {
56     bb.build.exec_func('do_prep', d)
57 }
58
59 do_configure() {
60 }
61
62 do_compile() {
63  cd ${S}
64  LANG=C
65  export LANG
66  unset DISPLAY
67  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
68  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
69  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
70  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
71  
72  
73    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
74    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
75    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ; 
76    cmake \
77          -DCMAKE_VERBOSE_MAKEFILE=ON \
78          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
79          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
80          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
81          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
82          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
83          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
84          -DCMAKE_SKIP_RPATH:BOOL=ON \
85          -DBUILD_SHARED_LIBS:BOOL=ON . \
86  -Dwith_wayland=TRUE
87  
88  make -j16
89  
90  
91  
92 }
93
94 do_install() {
95  echo 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}/opt/dbspace
115  sqlite3 ${D}/opt/dbspace/.appsvc.db < data/appsvc_db.sql
116  
117  mkdir -p ${D}/usr/share/license
118  cp LICENSE ${D}/usr/share/license/app-svc
119  
120  
121 }
122
123
124 app-svc_files = ""
125 app-svc_files += "app-svc.manifest"
126 app-svc_files += "%verify(not md5 mtime size) %attr(664,root,app) /opt/dbspace/.appsvc.db"
127 app-svc_files += "%verify(not md5 mtime size) %attr(664,root,app) /opt/dbspace/.appsvc.db-journal"
128 app-svc_files += "/usr/bin/appsvc_test"
129 app-svc_files += "${prefix}/lib/libappsvc.so.0"
130 app-svc_files += "${prefix}/lib/libappsvc.so.0.1.0"
131 app-svc_files += "/usr/share/license/app-svc"
132
133 app-svc-dev_files = ""
134 app-svc-dev_files += "app-svc.manifest"
135 app-svc-dev_files += "${prefix}/lib/pkgconfig/appsvc.pc"
136 app-svc-dev_files += "${prefix}/lib/libappsvc.so"
137 app-svc-dev_files += "${prefix}/include/appsvc/appsvc.h"
138
139 FILES_${PN} = "${app-svc_files}"
140 FILES_${PN}-dev = "${app-svc-dev_files}"
141
142 PKG_app-svc= "app-svc"
143 PKG_app-svc-dev= "app-svc-dev"
144
145 require app-svc-extraconf.inc
146