Remove -j16 from all run_oemake calls
[scm/bb/meta-tizen.git] / meta-tizen-ivi / meta-tizen-common-base / recipes-connectivity / download-provider / download-provider.inc
1 DESCRIPTION = "Download the contents in background"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "System/Libraries"
4 LICENSE = "Apache-2.0"
5 PV = "1.1.6"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by download-provider
17
18
19 #PROVIDES by download-provider-dev
20 PROVIDES += "download-provider-dev"
21
22
23 RDEPENDS = ""
24 #RDEPENDS of download-provider (${PN})
25 RDEPENDS_${PN} += "sqlite3"
26 RDEPENDS_${PN} += "connman"
27 RDEPENDS_${PN} += "glibc"
28 RDEPENDS_${PN} += "vconf"
29 RDEPENDS_${PN} += "net-config"
30
31 #RDEPENDS of download-provider-dev (${PN}-dev)
32 RDEPENDS_${PN}-dev += "download-provider"
33
34
35 DEPENDS = ""
36 #DEPENDS of download-provider
37 DEPENDS += "dlog"
38 DEPENDS += "xdgmime"
39 DEPENDS += "systemd"
40 inherit tizen_cmake
41 DEPENDS += "notification"
42 DEPENDS += "app-svc"
43 inherit pkgconfig
44 #Replace "DEPENDS" on gettext by "inherit gettext"
45 inherit gettext
46 DEPENDS += "glib-2.0"
47 DEPENDS += "libsoup-2.4"
48 DEPENDS += "sqlite3"
49 DEPENDS += "libprivilege-control"
50 DEPENDS += "capi-appfw-app-manager"
51 DEPENDS += "tizen-platform-config"
52 DEPENDS += "bundle"
53 DEPENDS += "smack"
54 DEPENDS += "vconf"
55 DEPENDS += "libwifi-direct"
56 DEPENDS += "capi-network-connection"
57 DEPENDS_append_class-native = " fdupes-native"
58 DEPENDS_append_class-target = " fdupes-native"
59 DEPENDS += "capi-base-common"
60
61 do_prep() {
62  cd ${S}
63  chmod -Rf a+rX,u+w,g-w,o-w ${S}
64  #setup -q
65  
66  
67 }
68 do_patch_append() {
69     bb.build.exec_func('do_prep', d)
70 }
71
72 do_configure() {
73 }
74
75 do_compile() {
76  cd ${S}
77  LANG=C
78  export LANG
79  unset DISPLAY
80  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
81  
82  
83  CFLAGS="${CFLAGS:-$CFLAGS} -fPIC -D_REENTRANT -fvisibility=hidden"; export CFLAGS
84  FFLAGS="${FFLAGS:-$CFLAGS} -fPIC -fvisibility=hidden"; export FFLAGS
85  LDFLAGS="${LDFLAGS} -Wl,--as-needed -Wl,--hash-style=both"; export LDFLAGS
86  
87  
88    cmake \
89          -DCMAKE_VERBOSE_MAKEFILE=ON \
90          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
91          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
92          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
93          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
94          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
95          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
96          -DCMAKE_SKIP_RPATH:BOOL=ON \
97          -DBUILD_SHARED_LIBS:BOOL=ON \
98          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
99          ${EXTRA_OECMAKE} . \
100           -DBIN_INSTALL_DIR:PATH=${prefix}/bin \
101           -DPKG_NAME=download-provider \
102           -DPKG_VERSION=1.1.6 \
103           -DPKG_RELEASE=0 \
104           -DIMAGE_DIR:PATH=${prefix}/share/download-provider/images \
105           -DLOCALE_DIR:PATH=${prefix}/share/locale \
106           -DSYSTEMD_DIR:PATH=${systemd_unitdir}/system \
107           -DDATABASE_SCHEMA_DIR=${prefix}/share/download-provider/sql \
108           -DDATABASE_SCHEMA_FILE=${prefix}/share/download-provider/sql/download-provider-schema.sql \
109           -DSUPPORT_WIFI_DIRECT:BOOL=OFF \
110           -DSUPPORT_LOG_MESSAGE:BOOL=ON \
111           -DSUPPORT_CHECK_IPC:BOOL=ON
112  
113  oe_runmake
114  
115  
116  
117 }
118
119 do_install() {
120  export RPM_BUILD_ROOT=${D}
121  cd ${S}
122  LANG=C
123  export LANG
124  unset DISPLAY
125  rm -rf ${D}
126  mkdir -p ${D}
127  
128  
129    oe_runmake \
130          DESTDIR=${D} \
131          INSTALL_ROOT=${D} \
132          BINDIR=${prefix}/bin \
133    install  
134    rm -f ${D}${infodir}/dir 
135    find ${D} -regex ".*\.la$" | xargs rm -f -- 
136    find ${D} -regex ".*\.a$" | xargs rm -f --
137  mkdir -p ${D}${prefix}/share/download-provider
138  mkdir -p ${D}${systemd_unitdir}/system/default.target.wants
139  mkdir -p ${D}${systemd_unitdir}/system/sockets.target.wants
140  ln -s ../download-provider.service ${D}${systemd_unitdir}/system/default.target.wants/
141  ln -s ../download-provider.socket ${D}${systemd_unitdir}/system/sockets.target.wants/
142  
143  #find_lang download-provider
144  
145  #fdupes ${D}${prefix}/share/locale
146  
147  
148 }
149
150 pkg_postinst_${PN}() {
151     #!/bin/sh -e
152
153     [ "x$D" == "x" ] && ldconfig
154     if [ $1 -eq 1 ] ; then 
155             # Initial installation 
156             /usr/bin/systemctl preset download-provider.service >/dev/null 2>&1 || : 
157     fi 
158     vconftool set -t int db/setting/default_memory/wap 0
159
160 }
161
162 pkg_prerm_${PN}() {
163     #!/bin/sh -e
164
165     if [ $1 -eq 0 ] ; then 
166             # Package removal, not upgrade 
167             /usr/bin/systemctl --no-reload disable download-provider.service > /dev/null 2>&1 || : 
168             /usr/bin/systemctl stop download-provider.service > /dev/null 2>&1 || : 
169     fi 
170
171 }
172
173 pkg_postrm_${PN}() {
174     #!/bin/sh -e
175
176     [ "x$D" == "x" ] && ldconfig
177     /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : 
178
179 }
180
181 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
182 PACKAGES += " download-provider "
183 PACKAGES += " download-provider-dev "
184
185 download-provider_files = ""
186 download-provider_files += "${prefix}/bin/download-provider"
187 download-provider_files += "${prefix}/share/download-provider/images/*.png"
188 download-provider_files += "${prefix}/share/download-provider/images/*.gif"
189 download-provider_files += "${prefix}/lib/libdownloadagent2.so*"
190 download-provider_files += "${prefix}/lib/libdownload-provider-interface.so*"
191 download-provider_files += "${systemd_unitdir}/system/download-provider.service"
192 download-provider_files += "${systemd_unitdir}/system/default.target.wants/download-provider.service"
193 download-provider_files += "${systemd_unitdir}/system/download-provider.socket"
194 download-provider_files += "${systemd_unitdir}/system/sockets.target.wants/download-provider.socket"
195 download-provider_files += "${prefix}/share/download-provider/sql/download-provider-schema.sql"
196 MANIFESTFILES_${PN} = "download-provider.manifest"
197
198 download-provider-dev_files = ""
199 download-provider-dev_files += "${prefix}/lib/libdownloadagent2.so"
200 download-provider-dev_files += "${prefix}/lib/libdownload-provider-interface.so"
201 download-provider-dev_files += "${prefix}/include/download-provider/download-provider-defs.h"
202 download-provider-dev_files += "${prefix}/include/download-provider/download-provider-interface.h"
203 download-provider-dev_files += "${prefix}/lib/pkgconfig/download-provider.pc"
204 download-provider-dev_files += "${prefix}/lib/pkgconfig/download-provider-interface.pc"
205 MANIFESTFILES_${PN}-dev = "download-provider.manifest"
206
207 FILES_${PN} = "${download-provider_files}"
208 FILES_${PN}-dev = "${download-provider-dev_files}"
209
210 PKG_download-provider= "download-provider"
211 PKG_download-provider-dev= "download-provider-dev"
212
213 require download-provider-extraconf.inc
214