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