meta-tizen: Update according to the actual Q1 tizen common release
[scm/bb/tizen-distro.git] / meta-tizen / meta-tizen-common-base / recipes-social / contacts-service / contacts-service.inc
1 DESCRIPTION = "Contacts Service"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Social & Contents/Pim"
4 LICENSE = "Apache-2.0"
5 PV = "0.10.3"
6 PR = "1"
7
8 SRC_URI = ""
9
10 S = "${WORKDIR}/git"
11
12 inherit manifest autotools-brokensep
13
14 BBCLASSEXTEND = ""
15 PROVIDES = ""
16
17 #PROVIDES by contacts-service2
18 PROVIDES += "contacts-service2"
19
20
21 #PROVIDES by contacts-service
22
23
24 #PROVIDES by contacts-service2-dev
25 PROVIDES += "contacts-service2-dev"
26
27
28 RDEPENDS = ""
29 #RDEPENDS of contacts-service2 (${PN}2)
30 RDEPENDS_${PN}2 += "libprivilege-control"
31
32 #RDEPENDS of contacts-service (${PN})
33 RDEPENDS_${PN} += "sqlite3"
34 RDEPENDS_${PN} += "coreutils"
35 RDEPENDS_${PN} += "glibc"
36 RDEPENDS_${PN} += "vconf"
37
38 #RDEPENDS of contacts-service2-dev (${PN}2-dev)
39 RDEPENDS_${PN}2-dev += "contacts-service2"
40
41
42 DEPENDS = ""
43 #DEPENDS of contacts-service
44 DEPENDS += "pims-ipc"
45 DEPENDS += "libaccounts-svc"
46 inherit tizen_cmake
47 DEPENDS += "capi-media-image-util"
48 DEPENDS += "tizen-platform-config"
49 inherit pkgconfig
50 DEPENDS += "dlog"
51 DEPENDS += "glib-2.0"
52 DEPENDS += "libexif"
53 DEPENDS += "smack"
54 DEPENDS += "libtapi"
55 DEPENDS += "security-server"
56 DEPENDS += "sqlite3"
57 DEPENDS += "capi-base-common"
58 DEPENDS += "badge"
59 DEPENDS += "vconf"
60 DEPENDS += "libslp-db-util"
61 DEPENDS += "icu"
62
63 do_prep() {
64  cd ${S}
65  chmod -Rf a+rX,u+w,g-w,o-w ${S}
66  #setup -q
67  cp ${S}/packaging/contacts-service2.manifest .
68  
69  
70  
71 }
72 do_patch_append() {
73     bb.build.exec_func('do_prep', d)
74 }
75
76 do_configure() {
77 }
78
79 do_compile() {
80  cd ${S}
81  LANG=C
82  export LANG
83  unset DISPLAY
84  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
85  
86  
87    cmake \
88          -DCMAKE_VERBOSE_MAKEFILE=ON \
89          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
90          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
91          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
92          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
93          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
94          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
95          -DCMAKE_SKIP_RPATH:BOOL=ON \
96          -DBUILD_SHARED_LIBS:BOOL=ON \
97          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
98          ${EXTRA_OECMAKE} . -DTZ_SYS_ETC=${sysconfdir}
99  oe_runmake
100  
101  
102  
103  
104 }
105
106 do_install() {
107  export RPM_BUILD_ROOT=${D}
108  cd ${S}
109  LANG=C
110  export LANG
111  unset DISPLAY
112  rm -rf ${D}
113  mkdir -p ${D}
114  
115  rm -rf ${D}
116  
117    oe_runmake \
118          DESTDIR=${D} \
119          INSTALL_ROOT=${D} \
120          BINDIR=${prefix}/bin \
121    install  
122    rm -f ${D}${infodir}/dir 
123    find ${D} -regex ".*\.la$" | xargs rm -f -- 
124    find ${D} -regex ".*\.a$" | xargs rm -f --
125  
126  mkdir -p ${D}${prefix}/lib/systemd/user/tizen-middleware.target.wants
127  install -m 0644 ${S}/packaging/contacts-service.service ${D}${prefix}/lib/systemd/user/contacts-service.service
128  ln -s ../contacts-service.service ${D}${prefix}/lib/systemd/user/tizen-middleware.target.wants/contacts-service.service
129  
130  mkdir -p ${D}${prefix}/lib/systemd/user/sockets.target.wants
131  install -m 0644 ${S}/packaging/contacts-service.socket ${D}${prefix}/lib/systemd/user/contacts-service.socket
132  ln -s ../contacts-service.socket ${D}${prefix}/lib/systemd/user/sockets.target.wants/contacts-service.socket
133  
134  
135  
136 }
137
138 pkg_postinst_contacts-service2() {
139     #!/bin/sh -e
140
141     [ "x$D" == "x" ] && ldconfig
142     vconftool set -t int file/private/contacts-service/default_lang 0 -g 6005 -s contacts-service::vconf-private
143     vconftool set -t int db/contacts-svc/name_sorting_order 0 -g 6005 -s contacts-service::vconf
144     vconftool set -t int db/contacts-svc/name_display_order 0 -g 6005 -s contacts-service::vconf
145     vconftool set -t int db/contacts-svc/phonenumber_min_match_digit 8 -g 6005 -s contacts-service::vconf
146
147 }
148
149 pkg_postrm_contacts-service2() {
150     #!/bin/sh -e
151
152     [ "x$D" == "x" ] && ldconfig
153 }
154
155 pkg_postrm_${PN}() {
156     #!/bin/sh -e
157
158     [ "x$D" == "x" ] && ldconfig
159 }
160
161 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
162 PACKAGES += " contacts-service2 "
163 PACKAGES += " contacts-service2-dev "
164
165 contacts-service2_files = ""
166 contacts-service2_files += "${prefix}/lib/libcontacts-service2.so.*"
167 contacts-service2_files += "${prefix}/bin/contacts-service-ipcd*"
168 contacts-service2_files += "${prefix}/lib/systemd/user/contacts-service.service"
169 contacts-service2_files += "${prefix}/lib/systemd/user/tizen-middleware.target.wants/contacts-service.service"
170 contacts-service2_files += "${prefix}/lib/systemd/user/sockets.target.wants/contacts-service.socket"
171 contacts-service2_files += "${prefix}/lib/systemd/user/contacts-service.socket"
172 MANIFESTFILES_${PN}2 = "contacts-service2.manifest"
173
174 contacts-service2-dev_files = ""
175 contacts-service2-dev_files += "${prefix}/lib/libcontacts-service2.so"
176 contacts-service2-dev_files += "${prefix}/lib/pkgconfig/contacts-service2.pc"
177 contacts-service2-dev_files += "${prefix}/include/contacts-svc/contacts.h"
178 contacts-service2-dev_files += "${prefix}/include/contacts-svc/contacts_*.h"
179
180 FILES_${PN}2 = "${contacts-service2_files}"
181 FILES_${PN}2-dev = "${contacts-service2-dev_files}"
182
183 PKG_contacts-service2= "contacts-service2"
184 PKG_contacts-service2-dev= "contacts-service2-dev"
185
186 require contacts-service-extraconf.inc
187