Tizen recipes : Fix tizen common build and get little more closer to current Tizen...
[scm/bb/meta-tizen.git] / meta-tizen-ivi / meta-tizen-common-share / recipes-connectivity / ofono / ofono.inc
1 DESCRIPTION = "Open Source Telephony"
2 HOMEPAGE = "http://ofono.org"
3 SECTION = "Telephony/Cellular"
4 LICENSE = "GPL-2.0"
5 PV = "1.15"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by ofono-docs
17 PROVIDES += "ofono-docs "
18
19
20 #PROVIDES by ofono-test
21 PROVIDES += "ofono-test"
22
23
24 #PROVIDES by ofono-dev
25 PROVIDES += "ofono-dev"
26
27
28 #PROVIDES by ofono
29
30
31 RDEPENDS = ""
32 #RDEPENDS of ofono-test (${PN}-test)
33 RDEPENDS_${PN}-test += "python-xml"
34 RDEPENDS_${PN}-test += "python-pygobject"
35 RDEPENDS_${PN}-test += "dbus-python"
36 RDEPENDS_${PN}-test += "ofono"
37
38 #RDEPENDS of ofono-dev (${PN}-dev)
39 RDEPENDS_${PN}-dev += "ofono"
40
41 #RDEPENDS of ofono (${PN})
42 RDEPENDS_${PN} += "dbus"
43 RDEPENDS_${PN} += "systemd"
44
45
46 DEPENDS = ""
47 #DEPENDS of ofono
48 DEPENDS += "mobile-broadband-provider-info"
49 DEPENDS += "dbus"
50 DEPENDS += "glib-2.0"
51 inherit pkgconfig
52 DEPENDS += "udev"
53 DEPENDS_append_class-native = " automake-native"
54 DEPENDS_append_class-target = " automake-native"
55 DEPENDS += "bluez5"
56 DEPENDS_append_class-native = " libtool"
57 DEPENDS_append_class-target = " libtool-cross"
58 DEPENDS_append_class-native = " autoconf-native"
59 DEPENDS_append_class-target = " autoconf-native"
60
61 do_prep() {
62  cd ${S}
63  chmod -Rf a+rX,u+w,g-w,o-w ${S}
64  #setup -q
65  
66  cp ${S}/packaging/ofono.manifest .
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   autoreconf --force --install
85   
86   
87   autotools_do_configure
88   
89   make -j16
90   
91   
92   
93 }
94 EXTRA_OECONF += " --disable-static --enable-test --disable-bluez4 --with-systemdunitdir=${systemd_unitdir}/system"
95
96 do_install() {
97  export RPM_BUILD_ROOT=${D}
98  cd ${S}
99  LANG=C
100  export LANG
101  unset DISPLAY
102  rm -rf ${D}
103  mkdir -p ${D}
104  
105  
106    oe_runmake \
107          DESTDIR=${D} \
108          INSTALL_ROOT=${D} \
109          BINDIR=${prefix}/bin \
110    install  
111    rm -f ${D}${infodir}/dir 
112    find ${D} -regex ".*\.la$" | xargs rm -f -- 
113    find ${D} -regex ".*\.a$" | xargs rm -f --
114  
115  mkdir -p ${D}${prefix}/lib/systemd/system/network.target.wants
116  ln -s ../ofono.service ${D}${prefix}/lib/systemd/system/network.target.wants/ofono.service
117  
118  
119  mkdir -p ${D}/${systemd_unitdir}/system/multi-user.target.wants 
120  ln -s ../ofono.service  ${D}/${systemd_unitdir}/system/multi-user.target.wants/ofono.service  
121  
122  
123  
124 }
125
126 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
127 PACKAGES += " ofono-test "
128 PACKAGES += " ofono-docs "
129 PACKAGES += " ofono-dev "
130 PACKAGES += " ofono "
131
132 ofono-test_files = ""
133 ofono-test_files += "${prefix}/lib/ofono/test/*"
134 MANIFESTFILES_${PN}-test = "ofono.manifest"
135
136 ofono-docs_files = ""
137
138 ofono-dev_files = ""
139 ofono-dev_files += "${prefix}/include/ofono/*.h"
140 ofono-dev_files += "${prefix}/lib/pkgconfig/ofono.pc"
141 MANIFESTFILES_${PN}-dev = "ofono.manifest"
142
143 ofono_files = ""
144 ofono_files += "${sysconfdir}/dbus-1/system.d/*.conf"
145 ofono_files += "${prefix}/sbin/*"
146 ofono_files += "${systemd_unitdir}/system/network.target.wants/ofono.service"
147 ofono_files += "${systemd_unitdir}/system/ofono.service"
148 ofono_files += "${systemd_unitdir}/system/multi-user.target.wants/ofono.service"
149 ofono_files += "${sysconfdir}/ofono/phonesim.conf"
150 CONFFILES_${PN} = ""
151 CONFFILES_${PN} += "${sysconfdir}/dbus-1/system.d/*.conf"
152 CONFFILES_${PN} += "${sysconfdir}/ofono/phonesim.conf"
153
154 FILES_${PN}-test = "${ofono-test_files}"
155 FILES_${PN}-docs = "${ofono-docs_files}"
156 FILES_${PN}-dev = "${ofono-dev_files}"
157 FILES_${PN} = "${ofono_files}"
158
159 PKG_ofono-test= "ofono-test"
160 PKG_ofono-docs= "ofono-docs"
161 PKG_ofono-dev= "ofono-dev"
162 PKG_ofono= "ofono"
163
164 require ofono-extraconf.inc
165