Remove the TIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND build flag
[platform/core/connectivity/wifi-direct-manager.git] / packaging / wifi-direct-manager.spec
1 # Do not provide .so automatically for the extensions.
2 # This if statement is for backward compatibility with GBM/Obsolete build systems
3 %if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
4 %global __provides_exclude_from ^.*\\.(wearable|mobile|tm1|tv|ivi|common)$
5 %endif
6
7 %define upgrade_script_path /usr/share/upgrade/scripts
8
9 Name:           wifi-direct-manager
10 Summary:        Wi-Fi Direct manger
11 Version:        1.2.235
12 Release:        1
13 Group:      Network & Connectivity/Wireless
14 License:    Apache-2.0
15 Source0:        %{name}-%{version}.tar.gz
16 Source1:        dbus-wfd-manager.conf
17 Source2:        net.wifidirect.service
18 Source3:        wifi-direct-manager.service
19 Source4:        500.wifi-direct-manager_upgrade.sh
20 BuildRequires:  pkgconfig(capi-network-wifi-direct)
21 BuildRequires:  pkgconfig(gio-2.0)
22 BuildRequires:  pkgconfig(dlog)
23 BuildRequires:  pkgconfig(vconf)
24 BuildRequires:  pkgconfig(libnl-2.0)
25 BuildRequires:  pkgconfig(dbus-1)
26 BuildRequires:  pkgconfig(aul)
27 BuildRequires:  pkgconfig(capi-system-info)
28
29 BuildRequires:  pkgconfig(capi-appfw-application)
30 BuildRequires:  pkgconfig(libsystemd-login)
31
32 BuildRequires: pkgconfig(libtzplatform-config)
33
34 BuildRequires:  cmake
35 #BuildRequires:  model-build-features
36 Requires:       net-tools
37 #Requires:      sys-assert
38 #Requires:      tizen-coreutils
39 Requires:       %{name}-compat = %{version}-%{release}
40 Recommends:     %{name}-profile_common = %{version}-%{release}
41
42 Requires: toybox-symlinks-dhcpd
43 Requires: toybox-symlinks-dhcp
44
45 %description
46 Manager for handling wifi-direct functionalities
47
48 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
49 # if common || ivi || "undefined"
50 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
51 %package profile_common
52 Summary:        Wi-Fi Direct manger for common/ivi
53 Provides:       %{name}-compat = %{version}-%{release}
54 Provides:       %{name}-profile_ivi = %{version}-%{release}
55 Conflicts:      %{name}-profile_mobile
56 Conflicts:      %{name}-profile_wearable
57 Conflicts:      %{name}-profile_tv
58 %description profile_common
59 Manager for handling wifi-direct functionalities for common/ivi
60 %endif
61
62 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
63 # if mobile || "undefined"
64 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
65 %package profile_mobile
66 Summary:        Wi-Fi Direct manger for mobile
67 Provides:       %{name}-compat = %{version}-%{release}
68 Conflicts:      %{name}-profile_common
69 Conflicts:      %{name}-profile_wearable
70 Conflicts:      %{name}-profile_tv
71 %description profile_mobile
72 Manager for handling wifi-direct functionalities for mobile
73
74 %ifarch %{arm}
75 %package extension-TM1
76 Summary:        Extension for mobile TM1
77 Requires:       %{name}-profile_mobile = %{version}-%{release}
78 %description extension-TM1
79 Manager for handling wifi-direct functionalities for mobile TM1
80 %endif
81 %endif
82
83 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
84 # if wearable || "undefined"
85 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
86 %package profile_wearable
87 Summary:        Wi-Fi Direct manger for wearable
88 Provides:       %{name}-compat = %{version}-%{release}
89 Conflicts:      %{name}-profile_common
90 Conflicts:      %{name}-profile_mobile
91 Conflicts:      %{name}-profile_tv
92 %description profile_wearable
93 Manager for handling wifi-direct functionalities for wearable
94 %endif
95
96 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
97 # if tv || "undefined"
98 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
99 %package profile_tv
100 Summary:        Wi-Fi Direct manger for tv
101 Provides:       %{name}-compat = %{version}-%{release}
102 Conflicts:      %{name}-profile_common
103 Conflicts:      %{name}-profile_mobile
104 Conflicts:      %{name}-profile_wearable
105 %description profile_tv
106 Manager for handling wifi-direct functionalities for tv
107 %endif
108
109 %package -n wifi-direct-plugin-wpasupplicant
110 Summary:    Wifi direct plugin for wpa supplicant
111 Group:      Network & Connectivity/Wireless
112 Requires:   %{name} = %{version}-%{release}
113 %description -n wifi-direct-plugin-wpasupplicant
114 Wi-Fi direct manager plugin to abstract wpa_supplicant
115
116 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
117 # if common || ivi || "undefined"
118 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
119 %package -n wifi-direct-plugin-wpasupplicant-profile_common
120 Summary:    Wifi direct plugin for wpa supplicant for common/ivi
121 Group:      Network & Connectivity/Wireless
122 Requires:   wifi-direct-plugin-wpasupplicant = %{version}-%{release}
123 %description -n wifi-direct-plugin-wpasupplicant-profile_common
124 Wi-Fi direct manager plugin to abstract wpa_supplicant for common/ivi
125 %endif
126
127 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
128 # if mobile || "undefined"
129 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
130 %package -n wifi-direct-plugin-wpasupplicant-profile_mobile
131 Summary:    Wifi direct plugin for wpa supplicant for mobile
132 Group:      Network & Connectivity/Wireless
133 Requires:   wifi-direct-plugin-wpasupplicant = %{version}-%{release}
134 %description -n wifi-direct-plugin-wpasupplicant-profile_mobile
135 Wi-Fi direct manager plugin to abstract wpa_supplicant for mobile
136
137 %ifarch %{arm}
138 %package -n wifi-direct-plugin-wpasupplicant-extension-TM1
139 Summary:    Wifi direct plugin for wpa supplicant for mobile TM1
140 Group:      Network & Connectivity/Wireless
141 Requires:   wifi-direct-plugin-wpasupplicant-profile_mobile = %{version}-%{release}
142 %description -n wifi-direct-plugin-wpasupplicant-extension-TM1
143 Wi-Fi direct manager plugin to abstract wpa_supplicant for mobile TM1
144 %endif
145 %endif
146
147 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
148 # if wearable || "undefined"
149 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
150 %package -n wifi-direct-plugin-wpasupplicant-profile_wearable
151 Summary:    Wifi direct plugin for wpa supplicant for wearable
152 Group:      Network & Connectivity/Wireless
153 Requires:   wifi-direct-plugin-wpasupplicant = %{version}-%{release}
154 %description -n wifi-direct-plugin-wpasupplicant-profile_wearable
155 Wi-Fi direct manager plugin to abstract wpa_supplicant for wearable
156 %endif
157
158 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
159 # if tv || "undefined"
160 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
161 %package -n wifi-direct-plugin-wpasupplicant-profile_tv
162 Summary:    Wifi direct plugin for wpa supplicant for tv
163 Group:      Network & Connectivity/Wireless
164 Requires:   wifi-direct-plugin-wpasupplicant = %{version}-%{release}
165 %description -n wifi-direct-plugin-wpasupplicant-profile_tv
166 Wi-Fi direct manager plugin to abstract wpa_supplicant for tv
167 %endif
168
169 #%package -n wifi-direct-prd-plugin-wpasupplicant
170 #Summary:    Wifi direct prd plugin for wpa supplicant
171 #Group:      Network & Connectivity/Wireless
172 #Requires:   %{name} = %{version}-%{release}
173 #%description -n wifi-direct-prd-plugin-wpasupplicant
174 #Wi-Fi direct manager prd plugin to abstract wpa_supplicant
175
176 %prep
177 %setup -q
178 chmod 644 %{SOURCE0}
179 chmod 644 %{SOURCE1}
180 chmod 644 %{SOURCE2}
181 chmod 644 %{SOURCE3}
182 chmod 755 %{SOURCE4}
183 cp -a %{SOURCE1} ./wfd-manager.conf
184 cp -a %{SOURCE2} .
185 cp -a %{SOURCE3} .
186 cp -a %{SOURCE4} .
187
188 %build
189
190 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
191 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
192 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
193
194 %ifarch %{arm}
195 export ARCH=arm
196 %else
197
198 %if 0%{?simulator}
199 export ARCH=emul
200 %else
201 export ARCH=i586
202 %endif
203
204 %endif
205
206 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
207 # if mobile || "undefined"
208 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
209 mkdir -p build_mobile
210 pushd build_mobile
211 cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=$ARCH \
212         -DTIZEN_ENABLE_PRD=0 \
213 %if ! 0%{?model_build_feature_network_tethering_disable}
214         -DTIZEN_TETHERING_ENABLE=0 \
215 %endif
216         -DTIZEN_FEATURE_IP_OVER_EAPOL=1 \
217         -DTIZEN_DEBUG_DBUS_VALUE=1 \
218         -DTIZEN_PROFILE_MOBILE=1 \
219 %if "%{?_lib}" == "lib64"
220         -DTIZEN_ARCH_64=1 \
221 %endif
222         -DLIB_DIR=%{_libdir} \
223         -DBIN_DIR=%{_bindir} \
224         -DSBIN_DIR=%{_sbindir} \
225         -DTZ_SYS_RO_ETC=%{TZ_SYS_RO_ETC} \
226         -DTZ_SYS_VAR=%{TZ_SYS_VAR} \
227         -DTZ_SYS_ETC=%{TZ_SYS_ETC} \
228         -DTZ_SYS_RUN=%{TZ_SYS_RUN}
229
230 make %{?_smp_mflags}
231 popd
232
233 %ifarch %{arm}
234 mkdir -p build_tm1
235 pushd build_tm1
236 cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=$ARCH \
237         -DTIZEN_ENABLE_PRD=0 \
238 %if ! 0%{?model_build_feature_network_tethering_disable}
239         -DTIZEN_TETHERING_ENABLE=0 \
240 %endif
241         -DTIZEN_WLAN_BOARD_SPRD=1 \
242         -DTIZEN_FEATURE_IP_OVER_EAPOL=1 \
243         -DTIZEN_DEBUG_DBUS_VALUE=1 \
244         -DTIZEN_PROFILE_MOBILE=1 \
245 %if "%{?_lib}" == "lib64"
246         -DTIZEN_ARCH_64=1 \
247 %endif
248         -DLIB_DIR=%{_libdir} \
249         -DBIN_DIR=%{_bindir} \
250         -DSBIN_DIR=%{_sbindir} \
251         -DTZ_SYS_RO_ETC=%{TZ_SYS_RO_ETC} \
252         -DTZ_SYS_VAR=%{TZ_SYS_VAR} \
253         -DTZ_SYS_ETC=%{TZ_SYS_ETC} \
254         -DTZ_SYS_RUN=%{TZ_SYS_RUN}
255
256 make %{?_smp_mflags}
257 popd
258 %endif
259 %endif
260
261 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
262 # if wearable || "undefined"
263 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
264 mkdir -p build_wearable
265 pushd build_wearable
266 cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=$ARCH \
267         -DTIZEN_ENABLE_PRD=0 \
268 %if ! 0%{?model_build_feature_network_tethering_disable}
269         -DTIZEN_TETHERING_ENABLE=0 \
270 %endif
271         -DTIZEN_FEATURE_IP_OVER_EAPOL=1 \
272         -DTIZEN_DEBUG_DBUS_VALUE=1 \
273         -DTIZEN_PROFILE_COMMON=1 \
274 %if "%{?_lib}" == "lib64"
275         -DTIZEN_ARCH_64=1 \
276 %endif
277         -DLIB_DIR=%{_libdir} \
278         -DBIN_DIR=%{_bindir} \
279         -DSBIN_DIR=%{_sbindir} \
280         -DTZ_SYS_RO_ETC=%{TZ_SYS_RO_ETC} \
281         -DTZ_SYS_VAR=%{TZ_SYS_VAR} \
282         -DTZ_SYS_ETC=%{TZ_SYS_ETC} \
283         -DTZ_SYS_RUN=%{TZ_SYS_RUN}
284
285 make %{?_smp_mflags}
286 popd
287 %endif
288
289 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
290 # if tv || "undefined"
291 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
292 mkdir -p build_tv
293 pushd build_tv
294 cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=$ARCH \
295         -DTIZEN_ENABLE_PRD=0 \
296 %if ! 0%{?model_build_feature_network_tethering_disable}
297         -DTIZEN_TETHERING_ENABLE=0 \
298 %endif
299         -DTIZEN_FEATURE_IP_OVER_EAPOL=1 \
300         -DTIZEN_DEBUG_DBUS_VALUE=1 \
301         -DTIZEN_PROFILE_TV=1 \
302 %if "%{?_lib}" == "lib64"
303         -DTIZEN_ARCH_64=1 \
304 %endif
305         -DLIB_DIR=%{_libdir} \
306         -DBIN_DIR=%{_bindir} \
307         -DSBIN_DIR=%{_sbindir} \
308         -DTZ_SYS_RO_ETC=%{TZ_SYS_RO_ETC} \
309         -DTZ_SYS_VAR=%{TZ_SYS_VAR} \
310         -DTZ_SYS_ETC=%{TZ_SYS_ETC} \
311         -DTZ_SYS_RUN=%{TZ_SYS_RUN}
312
313 make %{?_smp_mflags}
314 popd
315 %endif
316
317 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
318 # if common || ivi || "undefined"
319 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
320 # common
321 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=$ARCH \
322         -DTIZEN_ENABLE_PRD=0 \
323 %if ! 0%{?model_build_feature_network_tethering_disable}
324         -DTIZEN_TETHERING_ENABLE=0 \
325 %endif
326         -DTIZEN_FEATURE_IP_OVER_EAPOL=1 \
327         -DTIZEN_DEBUG_DBUS_VALUE=1 \
328         -DTIZEN_PROFILE_COMMON=1 \
329 %if "%{?_lib}" == "lib64"
330         -DTIZEN_ARCH_64=1 \
331 %endif
332 -DLIB_DIR=%{_libdir} \
333 -DBIN_DIR=%{_bindir} \
334 -DSBIN_DIR=%{_sbindir} \
335 -DTZ_SYS_RO_ETC=%{TZ_SYS_RO_ETC} \
336 -DTZ_SYS_VAR=%{TZ_SYS_VAR} \
337 -DTZ_SYS_ETC=%{TZ_SYS_ETC} \
338 -DTZ_SYS_RUN=%{TZ_SYS_RUN}
339
340 make %{?_smp_mflags}
341 %endif
342
343
344 %install
345 rm -rf %{buildroot}
346
347 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
348 # if mobile || "undefined"
349 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
350 pushd build_mobile
351 %make_install
352 mv %{buildroot}%{_bindir}/wfd-manager %{buildroot}%{_bindir}/wfd-manager.mobile
353 mv %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so.mobile
354 popd
355
356 %ifarch %{arm}
357 pushd build_tm1
358 %make_install
359 mv %{buildroot}%{_bindir}/wfd-manager %{buildroot}%{_bindir}/wfd-manager.tm1
360 mv %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so.tm1
361 popd
362 %endif
363 %endif
364
365 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
366 # if wearable || "undefined"
367 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
368 pushd build_wearable
369 %make_install
370 mv %{buildroot}%{_bindir}/wfd-manager %{buildroot}%{_bindir}/wfd-manager.wearable
371 mv %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so.wearable
372 popd
373 %endif
374
375 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
376 # if tv || "undefined"
377 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
378 pushd build_tv
379 %make_install
380 mv %{buildroot}%{_bindir}/wfd-manager %{buildroot}%{_bindir}/wfd-manager.tv
381 mv %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so.tv
382 popd
383 %endif
384
385 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
386 # if common || ivi || "undefined"
387 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
388 %make_install
389 %endif
390
391 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
392 cp wfd-manager.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/wfd-manager.conf
393 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
394 cp net.wifidirect.service %{buildroot}%{_datadir}/dbus-1/system-services/net.wifidirect.service
395 mkdir -p %{buildroot}%{_libdir}/systemd/system/
396 cp wifi-direct-manager.service %{buildroot}%{_libdir}/systemd/system/wifi-direct-manager.service
397 %if "%{?_lib}" == "lib64"
398 mkdir -p %{buildroot}%{_unitdir}
399 cp wifi-direct-manager.service %{buildroot}%{_unitdir}/wifi-direct-manager.service
400 %endif
401 mkdir -p %{buildroot}%{upgrade_script_path}
402 cp -f 500.wifi-direct-manager_upgrade.sh %{buildroot}%{upgrade_script_path}
403
404 %post
405 chmod 644 %{TZ_SYS_RO_ETC}/wifi-direct/dhcpd.conf
406 chmod 644 %{TZ_SYS_RO_ETC}/wifi-direct/wifi-direct-manager.conf
407 chmod 755 %{_bindir}/dhcpd-notify.sh
408 chmod 755 %{TZ_SYS_RO_ETC}/wifi-direct/udhcp_script.non-autoip
409 chmod 755 %{_bindir}/wifi-direct-server.sh
410 chmod 755 %{_bindir}/wifi-direct-dhcp.sh
411 chmod 755 %{_sbindir}/p2p_supp.sh
412
413 if [ ! -d %{TZ_SYS_VAR}/lib/misc ]; then
414         mkdir -p %{TZ_SYS_VAR}/lib/misc
415 fi
416
417 touch %{TZ_SYS_VAR}/lib/misc/dhcpd.leases
418 chmod 666 %{TZ_SYS_VAR}/lib/misc/dhcpd.leases
419
420 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
421 # if mobile || "undefined"
422 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
423 %post profile_mobile
424 pushd %{_bindir}
425 ln -sf wfd-manager.mobile wfd-manager
426 popd
427 %preun profile_mobile
428 case "$1" in
429   0)
430     # This is an un-installation.
431         rm %{_bindir}/wfd-manager
432   ;;
433   1)
434     # This is an upgrade.
435     # Do nothing.
436     :
437   ;;
438 esac
439
440 %post -n wifi-direct-plugin-wpasupplicant-profile_mobile
441 pushd %{_libdir}
442 ln -sf wifi-direct-plugin-wpasupplicant.so.mobile wifi-direct-plugin-wpasupplicant.so
443 popd
444 /sbin/ldconfig
445
446 %preun -n wifi-direct-plugin-wpasupplicant-profile_mobile
447 case "$1" in
448   0)
449     # This is an un-installation.
450         rm %{_libdir}/wifi-direct-plugin-wpasupplicant.so
451         /sbin/ldconfig
452   ;;
453   1)
454     # This is an upgrade.
455     # Do nothing.
456     :
457   ;;
458 esac
459
460 %ifarch %{arm}
461 %post extension-TM1
462 pushd %{_bindir}
463 ln -sf wfd-manager.tm1 wfd-manager
464 popd
465 %preun extension-TM1
466 case "$1" in
467   0)
468     # This is an un-installation.
469         rm %{_bindir}/wfd-manager
470   ;;
471   1)
472     # This is an upgrade.
473     # Do nothing.
474     :
475   ;;
476 esac
477
478 %post -n wifi-direct-plugin-wpasupplicant-extension-TM1
479 pushd %{_libdir}
480 ln -sf wifi-direct-plugin-wpasupplicant.so.tm1 wifi-direct-plugin-wpasupplicant.so
481 popd
482 /sbin/ldconfig
483
484 %preun -n wifi-direct-plugin-wpasupplicant-extension-TM1
485 case "$1" in
486   0)
487     # This is an un-installation.
488         pushd %{_libdir}
489         rm wifi-direct-plugin-wpasupplicant.so
490         popd
491   ;;
492   1)
493     # This is an upgrade.
494     # Do nothing.
495     :
496   ;;
497 esac
498
499 %endif
500 %endif //mobile
501
502 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
503 # if wearable || "undefined"
504 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
505 %post profile_wearable
506 pushd %{_bindir}
507 ln -sf wfd-manager.wearable wfd-manager
508 popd
509 %preun profile_wearable
510 case "$1" in
511   0)
512     # This is an un-installation.
513         rm %{_bindir}/wfd-manager
514   ;;
515   1)
516     # This is an upgrade.
517     # Do nothing.
518     :
519   ;;
520 esac
521
522 %post -n wifi-direct-plugin-wpasupplicant-profile_wearable
523 pushd %{_libdir}
524 ln -sf wifi-direct-plugin-wpasupplicant.so.wearable wifi-direct-plugin-wpasupplicant.so
525 popd
526 /sbin/ldconfig
527
528 %preun -n wifi-direct-plugin-wpasupplicant-profile_wearable
529 case "$1" in
530   0)
531     # This is an un-installation.
532         rm %{_libdir}/wifi-direct-plugin-wpasupplicant.so
533         /sbin/ldconfig
534   ;;
535   1)
536     # This is an upgrade.
537     # Do nothing.
538     :
539   ;;
540 esac
541 %endif
542
543 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
544 # if tv || "undefined"
545 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
546 %post profile_tv
547 pushd %{_bindir}
548 ln -sf wfd-manager.tv wfd-manager
549 popd
550 %preun profile_tv
551 case "$1" in
552   0)
553     # This is an un-installation.
554         rm %{_bindir}/wfd-manager
555   ;;
556   1)
557     # This is an upgrade.
558     # Do nothing.
559     :
560   ;;
561 esac
562
563 %post -n wifi-direct-plugin-wpasupplicant-profile_tv
564 pushd %{_libdir}
565 ln -sf wifi-direct-plugin-wpasupplicant.so.tv wifi-direct-plugin-wpasupplicant.so
566 popd
567 /sbin/ldconfig
568
569 %preun -n wifi-direct-plugin-wpasupplicant-profile_tv
570 case "$1" in
571   0)
572     # This is an un-installation.
573         rm %{_libdir}/wifi-direct-plugin-wpasupplicant.so
574         /sbin/ldconfig
575   ;;
576   1)
577     # This is an upgrade.
578     # Do nothing.
579     :
580   ;;
581 esac
582 %endif
583
584 %files
585 %manifest wifi-direct-manager.manifest
586 %license LICENSE
587 %defattr(-,network_fw,network_fw,-)
588 %config %{TZ_SYS_RO_ETC}/wifi-direct/ccode.conf
589 %config %{TZ_SYS_RO_ETC}/wifi-direct/dhcpd.conf
590 %config %{TZ_SYS_RO_ETC}/wifi-direct/wifi-direct-manager.conf
591 %config %{TZ_SYS_RO_ETC}/wifi-direct/p2p_supp.conf
592 %config %{_sysconfdir}/dbus-1/system.d/wfd-manager.conf
593 %attr(644,-,-) %{TZ_SYS_ETC}/p2p_supp.conf
594 %attr(755,-,-) %{_bindir}/dhcpd-notify.sh
595 %attr(755,-,-) %{_bindir}/wifi-direct-server.sh
596 %attr(755,-,-) %{_bindir}/wifi-direct-dhcp.sh
597 %attr(755,-,-) %{TZ_SYS_RO_ETC}/wifi-direct/udhcp_script.non-autoip
598 %attr(644,network_fw,network_fw) %{_datadir}/dbus-1/system-services/*
599 %attr(644,network_fw,network_fw) %{_libdir}/systemd/system/*
600 %if "%{?_lib}" == "lib64"
601 %{_unitdir}/wifi-direct-manager.service
602 %endif
603 %attr(755,-,-) %{_sbindir}/p2p_supp.sh
604 %{upgrade_script_path}/500.wifi-direct-manager_upgrade.sh
605
606 %files -n wifi-direct-plugin-wpasupplicant
607 %manifest wifi-direct-plugin-wpasupplicant.manifest
608 %license LICENSE
609 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
610 # if common || ivi || "undefined"
611 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
612 %defattr(-,network_fw,network_fw,-)
613 %{_libdir}/wifi-direct-plugin-wpasupplicant.so
614 %endif
615
616 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
617 # if common || ivi || "undefined"
618 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
619 %files profile_common
620 %defattr(-,network_fw,network_fw,-)
621 %{_bindir}/wfd-manager
622
623 %files -n wifi-direct-plugin-wpasupplicant-profile_common
624 # default .so files are housed in the main pkg.
625 %endif
626
627 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
628 # if mobile || "undefined"
629 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
630 %files profile_mobile
631 %defattr(-,network_fw,network_fw,-)
632 %{_bindir}/wfd-manager.mobile
633
634 %files -n wifi-direct-plugin-wpasupplicant-profile_mobile
635 %manifest wifi-direct-plugin-wpasupplicant.manifest
636 %defattr(-,network_fw,network_fw,-)
637 %{_libdir}/wifi-direct-plugin-wpasupplicant.so.mobile
638
639 %ifarch %{arm}
640 %files extension-TM1
641 %defattr(-,network_fw,network_fw,-)
642 %{_bindir}/wfd-manager.tm1
643
644 %files -n wifi-direct-plugin-wpasupplicant-extension-TM1
645 %manifest wifi-direct-plugin-wpasupplicant.manifest
646 %defattr(-,network_fw,network_fw,-)
647 %{_libdir}/wifi-direct-plugin-wpasupplicant.so.tm1
648 %endif
649 %endif
650
651 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
652 # if wearable || "undefined"
653 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
654 %files profile_wearable
655 %defattr(-,network_fw,network_fw,-)
656 %{_bindir}/wfd-manager.wearable
657
658 %files -n wifi-direct-plugin-wpasupplicant-profile_wearable
659 %manifest wifi-direct-plugin-wpasupplicant.manifest
660 %defattr(-,network_fw,network_fw,-)
661 %{_libdir}/wifi-direct-plugin-wpasupplicant.so.wearable
662 %endif
663
664 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
665 # if tv || "undefined"
666 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
667 %files profile_tv
668 %defattr(-,network_fw,network_fw,-)
669 %{_bindir}/wfd-manager.tv
670
671 %files -n wifi-direct-plugin-wpasupplicant-profile_tv
672 %manifest wifi-direct-plugin-wpasupplicant.manifest
673 %defattr(-,network_fw,network_fw,-)
674 %{_libdir}/wifi-direct-plugin-wpasupplicant.so.tv
675 %endif
676
677 #%files -n wifi-direct-prd-plugin-wpasupplicant
678 #%manifest wifi-direct-prd-plugin-wpasupplicant.manifest
679 #%license LICENSE
680 #%defattr(-,network_fw,network_fw,-)
681 #%{_libdir}/wifi-direct-prd-plugin-wpasupplicant.so