Remove TIZEN_WIFI_MODULE_BUNDLE & TIZEN_WLAN_CONCURRENT_ENABLE
[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.229
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_WIFI_DIRECT_ON_DEMAND=1 \
217         -DTIZEN_FEATURE_SERVICE_DISCOVERY=1 \
218         -DTIZEN_FEATURE_DEFAULT_CONNECTION_AGENT=1 \
219         -DTIZEN_FEATURE_IP_OVER_EAPOL=1 \
220         -DTIZEN_DEBUG_DBUS_VALUE=1 \
221         -DTIZEN_PROFILE_MOBILE=1 \
222         -DTIZEN_FEATURE_ASP=1 \
223 %if "%{?_lib}" == "lib64"
224         -DTIZEN_ARCH_64=1 \
225 %endif
226         -DLIB_DIR=%{_libdir} \
227         -DBIN_DIR=%{_bindir} \
228         -DSBIN_DIR=%{_sbindir} \
229         -DTZ_SYS_RO_ETC=%{TZ_SYS_RO_ETC} \
230         -DTZ_SYS_VAR=%{TZ_SYS_VAR} \
231         -DTZ_SYS_ETC=%{TZ_SYS_ETC} \
232         -DTZ_SYS_RUN=%{TZ_SYS_RUN}
233
234 make %{?_smp_mflags}
235 popd
236
237 %ifarch %{arm}
238 mkdir -p build_tm1
239 pushd build_tm1
240 cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=$ARCH \
241         -DTIZEN_ENABLE_PRD=0 \
242 %if ! 0%{?model_build_feature_network_tethering_disable}
243         -DTIZEN_TETHERING_ENABLE=0 \
244 %endif
245         -DTIZEN_WLAN_BOARD_SPRD=1 \
246         -DTIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND=1 \
247         -DTIZEN_FEATURE_SERVICE_DISCOVERY=1 \
248         -DTIZEN_FEATURE_WIFI_DISPLAY=1 \
249         -DTIZEN_FEATURE_DEFAULT_CONNECTION_AGENT=1 \
250         -DTIZEN_FEATURE_IP_OVER_EAPOL=1 \
251         -DTIZEN_DEBUG_DBUS_VALUE=1 \
252         -DTIZEN_PROFILE_MOBILE=1 \
253         -DTIZEN_FEATURE_ASP=1 \
254 %if "%{?_lib}" == "lib64"
255         -DTIZEN_ARCH_64=1 \
256 %endif
257         -DLIB_DIR=%{_libdir} \
258         -DBIN_DIR=%{_bindir} \
259         -DSBIN_DIR=%{_sbindir} \
260         -DTZ_SYS_RO_ETC=%{TZ_SYS_RO_ETC} \
261         -DTZ_SYS_VAR=%{TZ_SYS_VAR} \
262         -DTZ_SYS_ETC=%{TZ_SYS_ETC} \
263         -DTZ_SYS_RUN=%{TZ_SYS_RUN}
264
265 make %{?_smp_mflags}
266 popd
267 %endif
268 %endif
269
270 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
271 # if wearable || "undefined"
272 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
273 mkdir -p build_wearable
274 pushd build_wearable
275 cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=$ARCH \
276         -DTIZEN_ENABLE_PRD=0 \
277 %if ! 0%{?model_build_feature_network_tethering_disable}
278         -DTIZEN_TETHERING_ENABLE=0 \
279 %endif
280         -DTIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND=1 \
281         -DTIZEN_FEATURE_SERVICE_DISCOVERY=1 \
282         -DTIZEN_FEATURE_WIFI_DISPLAY=1 \
283         -DTIZEN_FEATURE_IP_OVER_EAPOL=1 \
284         -DTIZEN_DEBUG_DBUS_VALUE=1 \
285         -DTIZEN_PROFILE_COMMON=1 \
286 %if "%{?_lib}" == "lib64"
287         -DTIZEN_ARCH_64=1 \
288 %endif
289         -DLIB_DIR=%{_libdir} \
290         -DBIN_DIR=%{_bindir} \
291         -DSBIN_DIR=%{_sbindir} \
292         -DTZ_SYS_RO_ETC=%{TZ_SYS_RO_ETC} \
293         -DTZ_SYS_VAR=%{TZ_SYS_VAR} \
294         -DTZ_SYS_ETC=%{TZ_SYS_ETC} \
295         -DTZ_SYS_RUN=%{TZ_SYS_RUN}
296
297 make %{?_smp_mflags}
298 popd
299 %endif
300
301 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
302 # if tv || "undefined"
303 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
304 mkdir -p build_tv
305 pushd build_tv
306 cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=$ARCH \
307         -DTIZEN_ENABLE_PRD=0 \
308 %if ! 0%{?model_build_feature_network_tethering_disable}
309         -DTIZEN_TETHERING_ENABLE=0 \
310 %endif
311         -DTIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND=1 \
312         -DTIZEN_FEATURE_SERVICE_DISCOVERY=1 \
313         -DTIZEN_FEATURE_WIFI_DISPLAY=1 \
314         -DTIZEN_FEATURE_IP_OVER_EAPOL=1 \
315         -DTIZEN_DEBUG_DBUS_VALUE=1 \
316         -DTIZEN_PROFILE_TV=1 \
317 %if "%{?_lib}" == "lib64"
318         -DTIZEN_ARCH_64=1 \
319 %endif
320         -DLIB_DIR=%{_libdir} \
321         -DBIN_DIR=%{_bindir} \
322         -DSBIN_DIR=%{_sbindir} \
323         -DTZ_SYS_RO_ETC=%{TZ_SYS_RO_ETC} \
324         -DTZ_SYS_VAR=%{TZ_SYS_VAR} \
325         -DTZ_SYS_ETC=%{TZ_SYS_ETC} \
326         -DTZ_SYS_RUN=%{TZ_SYS_RUN}
327
328 make %{?_smp_mflags}
329 popd
330 %endif
331
332 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
333 # if common || ivi || "undefined"
334 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
335 # common
336 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=$ARCH \
337         -DTIZEN_ENABLE_PRD=0 \
338 %if ! 0%{?model_build_feature_network_tethering_disable}
339         -DTIZEN_TETHERING_ENABLE=0 \
340 %endif
341         -DTIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND=1 \
342         -DTIZEN_FEATURE_SERVICE_DISCOVERY=1 \
343         -DTIZEN_FEATURE_WIFI_DISPLAY=1 \
344         -DTIZEN_FEATURE_IP_OVER_EAPOL=1 \
345         -DTIZEN_DEBUG_DBUS_VALUE=1 \
346         -DTIZEN_PROFILE_COMMON=1 \
347 %if "%{?_lib}" == "lib64"
348         -DTIZEN_ARCH_64=1 \
349 %endif
350 -DLIB_DIR=%{_libdir} \
351 -DBIN_DIR=%{_bindir} \
352 -DSBIN_DIR=%{_sbindir} \
353 -DTZ_SYS_RO_ETC=%{TZ_SYS_RO_ETC} \
354 -DTZ_SYS_VAR=%{TZ_SYS_VAR} \
355 -DTZ_SYS_ETC=%{TZ_SYS_ETC} \
356 -DTZ_SYS_RUN=%{TZ_SYS_RUN}
357
358 make %{?_smp_mflags}
359 %endif
360
361
362 %install
363 rm -rf %{buildroot}
364
365 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
366 # if mobile || "undefined"
367 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
368 pushd build_mobile
369 %make_install
370 mv %{buildroot}%{_bindir}/wfd-manager %{buildroot}%{_bindir}/wfd-manager.mobile
371 mv %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so.mobile
372 popd
373
374 %ifarch %{arm}
375 pushd build_tm1
376 %make_install
377 mv %{buildroot}%{_bindir}/wfd-manager %{buildroot}%{_bindir}/wfd-manager.tm1
378 mv %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so.tm1
379 popd
380 %endif
381 %endif
382
383 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
384 # if wearable || "undefined"
385 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
386 pushd build_wearable
387 %make_install
388 mv %{buildroot}%{_bindir}/wfd-manager %{buildroot}%{_bindir}/wfd-manager.wearable
389 mv %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so.wearable
390 popd
391 %endif
392
393 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
394 # if tv || "undefined"
395 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
396 pushd build_tv
397 %make_install
398 mv %{buildroot}%{_bindir}/wfd-manager %{buildroot}%{_bindir}/wfd-manager.tv
399 mv %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so %{buildroot}%{_libdir}/wifi-direct-plugin-wpasupplicant.so.tv
400 popd
401 %endif
402
403 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
404 # if common || ivi || "undefined"
405 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
406 %make_install
407 %endif
408
409 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
410 cp wfd-manager.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/wfd-manager.conf
411 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
412 cp net.wifidirect.service %{buildroot}%{_datadir}/dbus-1/system-services/net.wifidirect.service
413 mkdir -p %{buildroot}%{_libdir}/systemd/system/
414 cp wifi-direct-manager.service %{buildroot}%{_libdir}/systemd/system/wifi-direct-manager.service
415 %if "%{?_lib}" == "lib64"
416 mkdir -p %{buildroot}%{_unitdir}
417 cp wifi-direct-manager.service %{buildroot}%{_unitdir}/wifi-direct-manager.service
418 %endif
419 mkdir -p %{buildroot}%{upgrade_script_path}
420 cp -f 500.wifi-direct-manager_upgrade.sh %{buildroot}%{upgrade_script_path}
421
422 %post
423 chmod 644 %{TZ_SYS_RO_ETC}/wifi-direct/dhcpd.conf
424 chmod 755 %{_bindir}/dhcpd-notify.sh
425 chmod 755 %{TZ_SYS_RO_ETC}/wifi-direct/udhcp_script.non-autoip
426 chmod 755 %{_bindir}/wifi-direct-server.sh
427 chmod 755 %{_bindir}/wifi-direct-dhcp.sh
428 chmod 755 %{_sbindir}/p2p_supp.sh
429
430 if [ ! -d %{TZ_SYS_VAR}/lib/misc ]; then
431         mkdir -p %{TZ_SYS_VAR}/lib/misc
432 fi
433
434 touch %{TZ_SYS_VAR}/lib/misc/dhcpd.leases
435 chmod 666 %{TZ_SYS_VAR}/lib/misc/dhcpd.leases
436
437 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
438 # if mobile || "undefined"
439 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
440 %post profile_mobile
441 pushd %{_bindir}
442 ln -sf wfd-manager.mobile wfd-manager
443 popd
444 %preun profile_mobile
445 case "$1" in
446   0)
447     # This is an un-installation.
448         rm %{_bindir}/wfd-manager
449   ;;
450   1)
451     # This is an upgrade.
452     # Do nothing.
453     :
454   ;;
455 esac
456
457 %post -n wifi-direct-plugin-wpasupplicant-profile_mobile
458 pushd %{_libdir}
459 ln -sf wifi-direct-plugin-wpasupplicant.so.mobile wifi-direct-plugin-wpasupplicant.so
460 popd
461 /sbin/ldconfig
462
463 %preun -n wifi-direct-plugin-wpasupplicant-profile_mobile
464 case "$1" in
465   0)
466     # This is an un-installation.
467         rm %{_libdir}/wifi-direct-plugin-wpasupplicant.so
468         /sbin/ldconfig
469   ;;
470   1)
471     # This is an upgrade.
472     # Do nothing.
473     :
474   ;;
475 esac
476
477 %ifarch %{arm}
478 %post extension-TM1
479 pushd %{_bindir}
480 ln -sf wfd-manager.tm1 wfd-manager
481 popd
482 %preun extension-TM1
483 case "$1" in
484   0)
485     # This is an un-installation.
486         rm %{_bindir}/wfd-manager
487   ;;
488   1)
489     # This is an upgrade.
490     # Do nothing.
491     :
492   ;;
493 esac
494
495 %post -n wifi-direct-plugin-wpasupplicant-extension-TM1
496 pushd %{_libdir}
497 ln -sf wifi-direct-plugin-wpasupplicant.so.tm1 wifi-direct-plugin-wpasupplicant.so
498 popd
499 /sbin/ldconfig
500
501 %preun -n wifi-direct-plugin-wpasupplicant-extension-TM1
502 case "$1" in
503   0)
504     # This is an un-installation.
505         pushd %{_libdir}
506         rm wifi-direct-plugin-wpasupplicant.so
507         popd
508   ;;
509   1)
510     # This is an upgrade.
511     # Do nothing.
512     :
513   ;;
514 esac
515
516 %endif
517 %endif //mobile
518
519 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
520 # if wearable || "undefined"
521 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
522 %post profile_wearable
523 pushd %{_bindir}
524 ln -sf wfd-manager.wearable wfd-manager
525 popd
526 %preun profile_wearable
527 case "$1" in
528   0)
529     # This is an un-installation.
530         rm %{_bindir}/wfd-manager
531   ;;
532   1)
533     # This is an upgrade.
534     # Do nothing.
535     :
536   ;;
537 esac
538
539 %post -n wifi-direct-plugin-wpasupplicant-profile_wearable
540 pushd %{_libdir}
541 ln -sf wifi-direct-plugin-wpasupplicant.so.wearable wifi-direct-plugin-wpasupplicant.so
542 popd
543 /sbin/ldconfig
544
545 %preun -n wifi-direct-plugin-wpasupplicant-profile_wearable
546 case "$1" in
547   0)
548     # This is an un-installation.
549         rm %{_libdir}/wifi-direct-plugin-wpasupplicant.so
550         /sbin/ldconfig
551   ;;
552   1)
553     # This is an upgrade.
554     # Do nothing.
555     :
556   ;;
557 esac
558 %endif
559
560 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
561 # if tv || "undefined"
562 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
563 %post profile_tv
564 pushd %{_bindir}
565 ln -sf wfd-manager.tv wfd-manager
566 popd
567 %preun profile_tv
568 case "$1" in
569   0)
570     # This is an un-installation.
571         rm %{_bindir}/wfd-manager
572   ;;
573   1)
574     # This is an upgrade.
575     # Do nothing.
576     :
577   ;;
578 esac
579
580 %post -n wifi-direct-plugin-wpasupplicant-profile_tv
581 pushd %{_libdir}
582 ln -sf wifi-direct-plugin-wpasupplicant.so.tv wifi-direct-plugin-wpasupplicant.so
583 popd
584 /sbin/ldconfig
585
586 %preun -n wifi-direct-plugin-wpasupplicant-profile_tv
587 case "$1" in
588   0)
589     # This is an un-installation.
590         rm %{_libdir}/wifi-direct-plugin-wpasupplicant.so
591         /sbin/ldconfig
592   ;;
593   1)
594     # This is an upgrade.
595     # Do nothing.
596     :
597   ;;
598 esac
599 %endif
600
601 %files
602 %manifest wifi-direct-manager.manifest
603 %license LICENSE
604 %defattr(-,network_fw,network_fw,-)
605 %config %{TZ_SYS_RO_ETC}/wifi-direct/ccode.conf
606 %config %{TZ_SYS_RO_ETC}/wifi-direct/dhcpd.conf
607 %config %{TZ_SYS_RO_ETC}/wifi-direct/p2p_supp.conf
608 %config %{_sysconfdir}/dbus-1/system.d/wfd-manager.conf
609 %attr(644,-,-) %{TZ_SYS_ETC}/p2p_supp.conf
610 %attr(755,-,-) %{_bindir}/dhcpd-notify.sh
611 %attr(755,-,-) %{_bindir}/wifi-direct-server.sh
612 %attr(755,-,-) %{_bindir}/wifi-direct-dhcp.sh
613 %attr(755,-,-) %{TZ_SYS_RO_ETC}/wifi-direct/udhcp_script.non-autoip
614 %attr(644,network_fw,network_fw) %{_datadir}/dbus-1/system-services/*
615 %attr(644,network_fw,network_fw) %{_libdir}/systemd/system/*
616 %if "%{?_lib}" == "lib64"
617 %{_unitdir}/wifi-direct-manager.service
618 %endif
619 %attr(755,-,-) %{_sbindir}/p2p_supp.sh
620 %{upgrade_script_path}/500.wifi-direct-manager_upgrade.sh
621
622 %files -n wifi-direct-plugin-wpasupplicant
623 %manifest wifi-direct-plugin-wpasupplicant.manifest
624 %license LICENSE
625 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
626 # if common || ivi || "undefined"
627 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
628 %defattr(-,network_fw,network_fw,-)
629 %{_libdir}/wifi-direct-plugin-wpasupplicant.so
630 %endif
631
632 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
633 # if common || ivi || "undefined"
634 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "mobile"
635 %files profile_common
636 %defattr(-,network_fw,network_fw,-)
637 %{_bindir}/wfd-manager
638
639 %files -n wifi-direct-plugin-wpasupplicant-profile_common
640 # default .so files are housed in the main pkg.
641 %endif
642
643 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
644 # if mobile || "undefined"
645 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
646 %files profile_mobile
647 %defattr(-,network_fw,network_fw,-)
648 %{_bindir}/wfd-manager.mobile
649
650 %files -n wifi-direct-plugin-wpasupplicant-profile_mobile
651 %manifest wifi-direct-plugin-wpasupplicant.manifest
652 %defattr(-,network_fw,network_fw,-)
653 %{_libdir}/wifi-direct-plugin-wpasupplicant.so.mobile
654
655 %ifarch %{arm}
656 %files extension-TM1
657 %defattr(-,network_fw,network_fw,-)
658 %{_bindir}/wfd-manager.tm1
659
660 %files -n wifi-direct-plugin-wpasupplicant-extension-TM1
661 %manifest wifi-direct-plugin-wpasupplicant.manifest
662 %defattr(-,network_fw,network_fw,-)
663 %{_libdir}/wifi-direct-plugin-wpasupplicant.so.tm1
664 %endif
665 %endif
666
667 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
668 # if wearable || "undefined"
669 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
670 %files profile_wearable
671 %defattr(-,network_fw,network_fw,-)
672 %{_bindir}/wfd-manager.wearable
673
674 %files -n wifi-direct-plugin-wpasupplicant-profile_wearable
675 %manifest wifi-direct-plugin-wpasupplicant.manifest
676 %defattr(-,network_fw,network_fw,-)
677 %{_libdir}/wifi-direct-plugin-wpasupplicant.so.wearable
678 %endif
679
680 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
681 # if tv || "undefined"
682 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
683 %files profile_tv
684 %defattr(-,network_fw,network_fw,-)
685 %{_bindir}/wfd-manager.tv
686
687 %files -n wifi-direct-plugin-wpasupplicant-profile_tv
688 %manifest wifi-direct-plugin-wpasupplicant.manifest
689 %defattr(-,network_fw,network_fw,-)
690 %{_libdir}/wifi-direct-plugin-wpasupplicant.so.tv
691 %endif
692
693 #%files -n wifi-direct-prd-plugin-wpasupplicant
694 #%manifest wifi-direct-prd-plugin-wpasupplicant.manifest
695 #%license LICENSE
696 #%defattr(-,network_fw,network_fw,-)
697 #%{_libdir}/wifi-direct-prd-plugin-wpasupplicant.so