91e15c58344b1115305c1ce09d84e69326ff73b7
[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 PROVIDES = ""
13
14 #PROVIDES by app-svc 
15
16
17 #PROVIDES by app-svc-dev 
18
19
20 RDEPENDS = ""
21 #RDEPENDS of app-svc (${PN})
22 RDEPENDS_${PN} += "eglibc"
23
24 #RDEPENDS of app-svc-dev (${PN}-dev)
25 RDEPENDS_${PN}-dev += "app-svc"
26
27
28 DEPENDS = ""
29 #DEPENDS of app-svc 
30 DEPENDS += "pkgmgr-info"
31 DEPENDS += "aul-1"
32 DEPENDS_append_class-native = " cmake-native"
33 DEPENDS_append_class-target = " cmake-native"
34 DEPENDS += "iniparser"
35 DEPENDS += "dbus"
36 DEPENDS += "bundle"
37 DEPENDS += "xdgmime"
38 DEPENDS += "ail"
39 DEPENDS += "dlog"
40 DEPENDS += "libsoup-2.4"
41 DEPENDS += "sqlite3"
42 DEPENDS += "ecore"
43 DEPENDS += "libprivilege-control"
44
45 do_prep() {
46  cd ${S}
47  chmod -Rf a+rX,u+w,g-w,o-w ${S}
48  #setup -q
49  cp ${S}/packaging/app-svc.manifest .
50  
51  
52 }
53 do_patch_append() {
54     bb.build.exec_func('do_prep', d)
55 }
56
57 do_configure() {
58 }
59
60 do_compile() {
61  cd ${S}
62  LANG=C
63  export LANG
64  unset DISPLAY
65  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
66  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
67  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
68  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
69  
70  
71    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
72    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
73    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ; 
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  -Dwith_wayland=TRUE
85  
86  make -j16
87  
88  
89  
90 }
91
92 do_install() {
93  echo export RPM_BUILD_ROOT=${D}
94  cd ${S}
95  LANG=C
96  export LANG
97  unset DISPLAY
98  rm -rf ${D} 
99  mkdir -p ${D} 
100  
101  
102    oe_runmake \
103          DESTDIR=${D} \
104          INSTALL_ROOT=${D} \
105          BINDIR=${prefix}/bin \
106    install  
107    rm -f ${D}${infodir}/dir 
108    find ${D} -regex ".*\.la$" | xargs rm -f -- 
109    find ${D} -regex ".*\.a$" | xargs rm -f --
110  
111  # Create database
112  mkdir -p ${D}/opt/dbspace
113  sqlite3 ${D}/opt/dbspace/.appsvc.db < data/appsvc_db.sql
114  
115  mkdir -p ${D}/usr/share/license
116  cp LICENSE ${D}/usr/share/license/app-svc
117  
118  
119 }
120
121
122 app-svc_files = ""
123 app-svc_files += "app-svc.manifest"
124 app-svc_files += "%verify(not md5 mtime size) %attr(664,root,app) /opt/dbspace/.appsvc.db"
125 app-svc_files += "%verify(not md5 mtime size) %attr(664,root,app) /opt/dbspace/.appsvc.db-journal"
126 app-svc_files += "/usr/bin/appsvc_test"
127 app-svc_files += "${prefix}/lib/libappsvc.so.0"
128 app-svc_files += "${prefix}/lib/libappsvc.so.0.1.0"
129 app-svc_files += "/usr/share/license/app-svc"
130
131 app-svc-dev_files = ""
132 app-svc-dev_files += "app-svc.manifest"
133 app-svc-dev_files += "${prefix}/lib/pkgconfig/appsvc.pc"
134 app-svc-dev_files += "${prefix}/lib/libappsvc.so"
135 app-svc-dev_files += "${prefix}/include/appsvc/appsvc.h"
136
137 FILES_${PN} = "${app-svc_files}"
138 FILES_${PN}-dev = "${app-svc-dev_files}"
139
140 PKG_app-svc= "app-svc"
141 PKG_app-svc-dev= "app-svc-dev"
142
143 require app-svc-extraconf.inc
144