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