5c4ed0ad7cd44a5821db0a5cb857d8b85d73902c
[apps/native/ug-wifi-efl.git] / packaging / wifi-efl-ug.spec
1 Name:           wifi-efl-ug
2 Summary:        Wi-Fi UI Gadget for TIZEN
3 Version:        1.0.228
4 Release:        1
5 Group:          Applications/Network
6 License:        Flora-1.1
7 Source0:        %{name}-%{version}.tar.gz
8
9 BuildRequires:  pkgconfig(ecore)
10 BuildRequires:  pkgconfig(ecore-imf)
11 BuildRequires:  pkgconfig(ecore-input)
12 BuildRequires:  pkgconfig(appcore-efl)
13 BuildRequires:  pkgconfig(elementary)
14 BuildRequires:  pkgconfig(glib-2.0)
15 BuildRequires:  pkgconfig(openssl)
16 BuildRequires:  pkgconfig(cert-svc-vcore)
17 BuildRequires:  pkgconfig(ui-gadget-1)
18 BuildRequires:  pkgconfig(sensor)
19 BuildRequires:  pkgconfig(capi-network-wifi)
20 BuildRequires:  pkgconfig(capi-network-connection)
21 # For backward compatibility. Not needed (always true) in unified environment.
22 %if "%{?profile}" != "wearable"
23 BuildRequires:  pkgconfig(capi-network-tethering)
24 %endif
25 BuildRequires:  pkgconfig(capi-ui-efl-util)
26 BuildRequires:  pkgconfig(network)
27 BuildRequires:  pkgconfig(feedback)
28 BuildRequires:  pkgconfig(efl-extension)
29 BuildRequires:  pkgconfig(aul)
30 #BuildRequires:  pkgconfig(setting-common-internal)
31 #BuildRequires:  pkgconfig(setting-lite-common-internal)
32 BuildRequires:  cmake
33 BuildRequires:  gettext-tools
34 BuildRequires:  edje-tools
35 Requires(post):         /sbin/ldconfig
36 requires(postun):       /sbin/ldconfig
37 Requires:       %{name}-compat = %{version}-%{release}
38 # For backward compatibility. Not needed (always true) in unified environment.
39 # common, tv, ivi, or unified (undefined)
40 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
41 Recommends:     %{name}-profile_common
42 %endif
43
44 %description
45 Wi-Fi UI Gadget
46
47 # For backward compatibility. Not needed (always true) in unified environment.
48 # mobile, common, or unified (undefined)
49 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
50 %package -n net.wifi-qs
51 Summary:    Wi-Fi System popup
52 Requires:   %{name} = %{version}
53
54 %description -n net.wifi-qs
55 Wi-Fi System popup for TIZEN
56 %endif
57
58 # For backward compatibility. Not needed (always true) in unified environment.
59 # wearable, or unified (undefined) (add common after refactoring efl-ext)
60 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
61 %package -n org.tizen.w-wifi
62 Summary:    Wi-Fi UI Gadget for wearable
63
64 %description -n org.tizen.w-wifi
65 Wi-Fi UI Gadget for wearable
66 %endif
67
68 # For backward compatibility. Not needed (always true) in unified environment.
69 # common, or unified (undefined)
70 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
71 %package profile_common
72 Summary:    Wifi-efl-ug binary for common profile (tv/ivi included)
73 Provides:   %{name}-compat = %{version}-%{release}
74 Provides:   %{name}-profile_tv = %{version}-%{release}
75 Provides:   %{name}-profile_ivi = %{version}-%{release}
76 Conflicts:  %{name}-profile_mobile
77 Conflicts:  %{name}-profile_wearable
78 %description profile_common
79 Wi-Fi UI Gadget binary for common profile (not mobile & not wearable)
80 %endif
81
82 # For backward compatibility. Not needed (always true) in unified environment.
83 # mobile, common, or unified (undefined)
84 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
85 %package profile_mobile
86 Summary:    Wifi-efl-ug binary for mobile
87 Provides:   %{name}-compat = %{version}-%{release}
88 Conflicts:  %{name}-profile_common
89 Conflicts:  %{name}-profile_wearable
90 %description profile_mobile
91 Wi-Fi UI Gadget binary for mobile profile
92 %endif
93
94 # For backward compatibility. Not needed (always true) in unified environment.
95 # wearable, or unified (undefined) (add common after refactoring efl-ext)
96 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
97 %package profile_wearable
98 Summary:    Wifi-efl-ug binary for wearable
99 Provides:   %{name}-compat = %{version}-%{release}
100 Conflicts:  %{name}-profile_common
101 Conflicts:  %{name}-profile_mobile
102 %description profile_wearable
103 Wi-Fi UI Gadget binary for wearable profile
104 %endif
105
106 %prep
107 %setup -q
108
109 %define PREFIX /usr/
110
111 %build
112 #LDFLAGS+="-Wl,--rpath=%{PREFIX}/lib -Wl,--as-needed"
113
114 # For backward compatibility. Not needed (always true) in unified environment.
115 # mobile, common, or unified (undefined)
116 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
117 mkdir -p build_mobile
118 pushd build_mobile
119 cmake -DCMAKE_INSTALL_PREFIX=%{PREFIX} \
120         -DTIZEN_TETHERING_ENABLE=1 \
121         -DMODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE=1 \
122         -DTIZEN_MOBILE=1 \
123 %if "%{?_with_emulator}" == "1"
124         -DTIZEN_EMULATOR=1 \
125 %endif
126         ..
127
128 make %{?_smp_mflags}
129 popd
130 %endif
131
132
133 # For backward compatibility. Not needed (always true) in unified environment.
134 # wearable, or unified (undefined) (add common after refactoring efl-ext)
135 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
136 mkdir -p build_wearable
137 pushd build_wearable
138 cmake -DCMAKE_INSTALL_PREFIX=%{PREFIX} \
139         -DMODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE=1 \
140         -DTIZEN_WEARABLE=1 \
141 %if "%{?_with_emulator}" == "1"
142         -DTIZEN_EMULATOR=1 \
143 %endif
144         ..
145
146 make %{?_smp_mflags}
147 popd
148 %endif
149
150 # For backward compatibility. Not needed (always true) in unified environment.
151 # common, or unified (undefined)
152 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
153 cmake -DCMAKE_INSTALL_PREFIX=%{PREFIX} \
154         -DTIZEN_TETHERING_ENABLE=1 \
155         -DMODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE=1 \
156 %if "%{?_with_emulator}" == "1"
157         -DTIZEN_EMULATOR=1 \
158 %endif
159         .
160
161 make %{?_smp_mflags}
162 %endif
163
164
165 %install
166 # For backward compatibility. Not needed (always true) in unified environment.
167 # mobile, common, or unified (undefined)
168 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
169 pushd build_mobile
170 %make_install
171 popd
172 pushd %{buildroot}%{PREFIX}/ug/lib
173 for FILE in *.so*; do mv "${FILE}" "${FILE}.mobile"; done
174 popd
175 %endif
176
177 # For backward compatibility. Not needed (always true) in unified environment.
178 # wearable, or unified (undefined) (add common after refactoring efl-ext)
179 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
180 pushd build_wearable
181 %make_install
182 popd
183 pushd %{buildroot}%{PREFIX}/ug/lib
184 for FILE in *.so*; do if [[ $FILE =~ .*mobile$ ]]; then echo skip "${FILE}"; else mv "${FILE}" "${FILE}.wearable"; fi; done
185 popd
186 %endif
187
188 # For backward compatibility. Not needed (always true) in unified environment.
189 # common, or unified (undefined)
190 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
191 %make_install
192 %endif
193
194 #License
195 mkdir -p %{buildroot}%{_datadir}/license
196 cp LICENSE %{buildroot}%{_datadir}/license/wifi-efl-ug
197 # For backward compatibility. Not needed (always true) in unified environment.
198 # mobile, common, or unified (undefined)
199 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
200 cp LICENSE %{buildroot}%{_datadir}/license/net.wifi-qs
201 %endif
202 # For backward compatibility. Not needed (always true) in unified environment.
203 # wearable, or unified (undefined) (add common after refactoring efl-ext)
204 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
205 cp LICENSE %{buildroot}%{_datadir}/license/org.tizen.w-wifi
206 %endif
207
208 %post
209 /sbin/ldconfig
210
211 mkdir -p %{PREFIX}/bin/
212 mkdir -p /usr/apps/wifi-efl-ug/bin/ -m 777
213
214 %postun -p /sbin/ldconfig
215
216 %files
217 %manifest wifi-efl-ug.manifest
218 %{PREFIX}/apps/wifi-efl-ug/res/edje/*.edj
219 %{_datadir}/license/wifi-efl-ug
220 %{_datadir}/packages/wifi-efl-ug.xml
221 /usr/apps/wifi-efl-ug/shared/res/tables/ug-wifi-efl_ChangeableColorTable.xml
222 /usr/apps/wifi-efl-ug/shared/res/tables/ug-wifi-efl_FontInfoTable.xml
223
224 # For backward compatibility. Not needed (always true) in unified environment.
225 # common, or unified (undefined)
226 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
227 %post profile_common -p /sbin/ldconfig
228 %postun profile_common -p /sbin/ldconfig
229 %files profile_common
230 %exclude %{PREFIX}/ug/lib/*.mobile
231 %exclude %{PREFIX}/ug/lib/*.wearable
232 %attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so
233 %attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so.*
234 %endif
235
236 # For backward compatibility. Not needed (always true) in unified environment.
237 # mobile, common, or unified (undefined)
238 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
239 %post profile_mobile
240 pushd %{PREFIX}/ug/lib/
241 for FILE in libug-wifi-efl*.mobile; do mv "${FILE}" "${FILE%.mobile}"; done
242 popd
243 /sbin/ldconfig
244 %preun profile_mobile
245 pushd %{PREFIX}/ug/lib/
246 for FILE in libug-wifi-efl*.so; do mv "${FILE}" "${FILE}.mobile"; done
247 for FILE in libug-wifi-efl*.so.*; do mv "${FILE}" "${FILE}.mobile"; done
248 popd
249 %postun profile_mobile -p /sbin/ldconfig
250 %files profile_mobile
251 %attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so.mobile
252 %attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so.*.mobile
253 %{_datadir}/locale/*/LC_MESSAGES/*.mo
254 %{_datadir}/icons/*.png
255 %endif
256
257 # For backward compatibility. Not needed (always true) in unified environment.
258 # wearable, or unified (undefined) (add common after refactoring efl-ext)
259 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
260 %post profile_wearable
261 pushd %{PREFIX}/ug/lib/
262 for FILE in libug-wifi-efl*.wearable; do mv "${FILE}" "${FILE%.wearable}"; done
263 popd
264 /sbin/ldconfig
265 %preun profile_wearable
266 pushd %{PREFIX}/ug/lib/
267 for FILE in libug-wifi-efl*.so; do mv "${FILE}" "${FILE}.wearable"; done
268 for FILE in libug-wifi-efl*.so.*; do mv "${FILE}" "${FILE}.wearable"; done
269 popd
270 %postun profile_wearable -p /sbin/ldconfig
271 %files profile_wearable
272 %attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so.wearable
273 %attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so.*.wearable
274 %endif
275
276 # For backward compatibility. Not needed (always true) in unified environment.
277 # mobile, common, or unified (undefined)
278 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
279 %files -n net.wifi-qs
280 %manifest net.wifi-qs.manifest
281 %{_bindir}/wifi-qs
282 %{_datadir}/packages/net.wifi-qs.xml
283 %{_datadir}/icons/*.png
284 %{PREFIX}/apps/net.wifi-qs/res/edje/*.edj
285 %{_datadir}/license/net.wifi-qs
286 %endif
287
288 # For backward compatibility. Not needed (always true) in unified environment.
289 # wearable, or unified (undefined) (add common after refactoring efl-ext)
290 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
291 %files -n org.tizen.w-wifi
292 %manifest org.tizen.w-wifi.manifest
293 /usr/shared/res/tables/color_table.xml
294 /usr/shared/res/tables/font_table.xml
295 %defattr(-,root,root,-)
296 %attr(-,inhouse,inhouse)
297 %{PREFIX}/apps/org.tizen.w-wifi/bin/*
298 %{PREFIX}/apps/org.tizen.w-wifi/res/images/*.png
299 %{PREFIX}/apps/org.tizen.w-wifi/res/locale/*/LC_MESSAGES/*.mo
300 %{PREFIX}/apps/org.tizen.w-wifi/res/edje/*
301 %{_datadir}/packages/org.tizen.w-wifi.xml
302 %{_datadir}/license/org.tizen.w-wifi
303 %endif