Tizen recipes: avoid -j16
[scm/bb/meta-tizen.git] / meta-tizen-common-base / recipes-core / oma-ds-agent / oma-ds-agent.inc
1 DESCRIPTION = "OMA-DS Agent Daemon for Data Synchronization"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Base/Device Management"
4 LICENSE = "Apache-2.0"
5 PV = "0.1.66"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by oma-ds-agent
17
18
19 #PROVIDES by ds-public-plugins
20 PROVIDES += "ds-public-plugins"
21
22
23 RDEPENDS = ""
24 #RDEPENDS of oma-ds-agent (${PN})
25 RDEPENDS_${PN} += "glibc"
26
27
28 DEPENDS = ""
29 #DEPENDS of oma-ds-agent
30 DEPENDS += "libcheck"
31 inherit tizen_cmake
32 DEPENDS += "libslp-memo"
33 DEPENDS += "tizen-platform-config"
34 DEPENDS += "expat"
35 inherit pkgconfig
36 DEPENDS += "dlog"
37 DEPENDS += "glib-2.0"
38 DEPENDS += "libsoup-2.4"
39 DEPENDS += "contacts-service"
40 DEPENDS += "aul"
41 DEPENDS += "sync-agent"
42 DEPENDS += "sqlite3"
43 DEPENDS += "vconf"
44 DEPENDS += "dbus-glib"
45
46 do_prep() {
47  cd ${S}
48  chmod -Rf a+rX,u+w,g-w,o-w ${S}
49  #setup -q
50  
51  
52  
53 }
54 do_patch_append() {
55     bb.build.exec_func('do_prep', d)
56 }
57
58 do_configure() {
59 }
60
61 do_compile() {
62  cd ${S}
63  LANG=C
64  export LANG
65  unset DISPLAY
66  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
67  
68  
69    cmake \
70          -DCMAKE_VERBOSE_MAKEFILE=ON \
71          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
72          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
73          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
74          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
75          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
76          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
77          -DCMAKE_SKIP_RPATH:BOOL=ON \
78          -DBUILD_SHARED_LIBS:BOOL=ON \
79          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
80          ${EXTRA_OECMAKE} . -DCMAKE_INSTALL_PREFIX=${prefix} -DTZ_SYS_DB=${prefix}/dbspace
81  make ${PARALLEL_MAKE}
82  
83  
84  
85  
86 }
87
88 do_install() {
89  export RPM_BUILD_ROOT=${D}
90  cd ${S}
91  LANG=C
92  export LANG
93  unset DISPLAY
94  rm -rf ${D}
95  mkdir -p ${D}
96  
97  rm -rf ${D}
98  
99  if [ ! -d ${D}${prefix}/dbspace ]
100  then
101         mkdir -p ${D}${prefix}/dbspace
102  fi
103  
104  sqlite3 ${D}${prefix}/dbspace/.omasyncagent.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
105  
106  
107    oe_runmake \
108          DESTDIR=${D} \
109          INSTALL_ROOT=${D} \
110          BINDIR=${prefix}/bin \
111    install  
112    rm -f ${D}${infodir}/dir 
113    find ${D} -regex ".*\.la$" | xargs rm -f -- 
114    find ${D} -regex ".*\.a$" | xargs rm -f --
115  
116  
117 }
118
119 pkg_postinst_${PN}() {
120     #!/bin/sh -e
121
122     if [ ! -d $D${prefix}/dbspace ]
123     then
124         mkdir $D${prefix}/dbspace
125     fi
126     if [ ! -d $D${sysconfdir}/rc.d/rc3.d ]
127     then
128         mkdir $D${sysconfdir}/rc.d/rc3.d
129     fi
130     if [ ! -d $D${sysconfdir}/rc.d/rc5.d ]
131     then
132         mkdir $D${sysconfdir}/rc.d/rc5.d
133     fi
134
135 }
136
137 pkg_postrm_${PN}() {
138     #!/bin/sh -e
139
140     rm -f /tmp/agent_fw_event_omads*
141     rm -f /tmp/agent_fw_noti_reply_omads*
142     rm -f $D${sysconfdir}/rc.d/rc3.d/S91oma-ds-agent
143     rm -f $D${sysconfdir}/rc.d/rc5.d/S91oma-ds-agent
144     rm -f $D${prefix}/dbspace/.omasyncagent.db $D${prefix}/dbspace/.omasyncagent.db-journal
145     rm -rf /usr/share/oma-ds-cfg
146
147 }
148
149 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
150 PACKAGES += " oma-ds-agent "
151 PACKAGES += " ds-public-plugins "
152
153 oma-ds-agent_files = ""
154 oma-ds-agent_files += "${prefix}/dbspace/.omasyncagent.db"
155 oma-ds-agent_files += "${prefix}/dbspace/.omasyncagent.db-journal"
156 oma-ds-agent_files += "/usr/share/dbus-1/system-services/com.samsung.omadsagent.service"
157 oma-ds-agent_files += "${prefix}/bin/oma-ds-agent"
158 oma-ds-agent_files += "/usr/share/oma-ds-cfg/*"
159 oma-ds-agent_files += "/usr/lib/systemd/system/oma-ds-agent.service"
160 oma-ds-agent_files += "/usr/lib/systemd/system/graphical.target.wants/oma-ds-agent.service"
161 oma-ds-agent_files += "${sysconfdir}/dbus-1/system.d/com.samsung.omadsagent.conf"
162 MANIFESTFILES_${PN} = "oma-ds-agent.manifest"
163
164 ds-public-plugins_files = ""
165 ds-public-plugins_files += "/usr/lib/sync-agent/ds-public/*"
166 MANIFESTFILES_ds-public-plugins = "ds-public-plugins.manifest"
167
168 FILES_${PN} = "${oma-ds-agent_files}"
169 FILES_ds-public-plugins = "${ds-public-plugins_files}"
170
171 PKG_oma-ds-agent= "oma-ds-agent"
172 PKG_ds-public-plugins= "ds-public-plugins"
173
174 require oma-ds-agent-extraconf.inc
175