first commit
[scm/bb/meta-tizen.git] / recipes-tizen / 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
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by oma-ds-agent 
13 PROVIDES += "oma-ds-agent"
14 RPROVIDES_oma-ds-agent += "oma-ds-agent"
15
16 #PROVIDES by ds-public-plugins 
17 PROVIDES += "ds-public-plugins"
18 RPROVIDES_ds-public-plugins += "ds-public-plugins"
19
20 RDEPENDS = ""
21 #RDEPENDS of oma-ds-agent (${PN})
22 RDEPENDS_${PN} += "/sbin/ldconfig"
23
24
25 DEPENDS = ""
26 #DEPENDS of oma-ds-agent 
27 DEPENDS += "cmake"
28 DEPENDS += "libslp-memo"
29 DEPENDS += "pkgconfig(aul)"
30 DEPENDS += "expat"
31 DEPENDS += "pkgconfig(check)"
32 DEPENDS += "dlog"
33 DEPENDS += "pkgconfig(sync-agent)"
34 DEPENDS += "contacts-service"
35 DEPENDS += "pkgconfig(sqlite3)"
36 DEPENDS += "pkgconfig(vconf)"
37 DEPENDS += "pkgconfig(libsoup-2.4)"
38 DEPENDS += "pkgconfig(glib-2.0)"
39 DEPENDS += "dbus-glib"
40
41 do_patch() {
42  chmod -Rf a+rX,u+w,g-w,o-w ${S}
43  #setup -q
44  
45  
46  
47 }
48
49 do_configure() {
50 }
51
52 do_compile() {
53  LANG=C
54  export LANG
55  unset DISPLAY
56  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
57  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
58  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
59  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
60  
61  cmake . -DCMAKE_INSTALL_PREFIX=/usr
62  make -j16
63  
64  
65  
66  
67 }
68
69 do_install() {
70  echo export RPM_BUILD_ROOT=${D}
71  LANG=C
72  export LANG
73  unset DISPLAY
74  rm -rf ${D} 
75  mkdir -p ${D} 
76  
77  rm -rf ${D}
78  
79  if [ ! -d ${D}/opt/dbspace ]
80  then
81         mkdir -p ${D}/opt/dbspace
82  fi
83  
84  sqlite3 ${D}/opt/dbspace/.omasyncagent.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
85  
86  
87    oe_runmake \
88          DESTDIR=${D} \
89          INSTALL_ROOT=${D} \
90          BINDIR=/usr/bin \
91    install  
92    rm -f ${D}/usr/share/info/dir 
93    find ${D} -regex ".*\.la$" | xargs rm -f -- 
94    find ${D} -regex ".*\.a$" | xargs rm -f --
95  
96  
97 }
98
99 PACKAGES = ""
100 PACKAGES += "oma-ds-agent"
101 PACKAGES += "ds-public-plugins"
102
103 oma-ds-agent_files = ""
104 oma-ds-agent_files += "oma-ds-agent.manifest"
105 oma-ds-agent_files += "/usr/share/dbus-1/system-services/com.samsung.omadsagent.service"
106 oma-ds-agent_files += "/usr/bin/oma-ds-agent"
107 oma-ds-agent_files += "/usr/share/oma-ds-cfg/*"
108 oma-ds-agent_files += "/usr/lib/systemd/system/oma-ds-agent.service"
109 oma-ds-agent_files += "/usr/lib/systemd/system/graphical.target.wants/oma-ds-agent.service"
110 oma-ds-agent_files += "/etc/dbus-1/system.d/com.samsung.omadsagent.conf"
111
112 ds-public-plugins_files = ""
113 ds-public-plugins_files += "ds-public-plugins.manifest"
114 ds-public-plugins_files += "/usr/lib/sync-agent/ds-public/*"
115
116 FILES_${PN} = "${oma-ds-agent_files}"
117 FILES_ds-public-plugins = "${ds-public-plugins_files}"
118
119 PKG_oma-ds-agent= "oma-ds-agent"
120 PKG_ds-public-plugins= "ds-public-plugins"
121
122 require oma-ds-agent-extraconf.inc