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