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