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