-%define _unpackaged_files_terminate_build 0
Name: wifi-efl-ug
Summary: Wi-Fi UI Gadget for TIZEN
Version: 1.0.220
Release: 1
-Group: App/Network
+Group: Applications/Network
License: Flora-1.1
Source0: %{name}-%{version}.tar.gz
-%if "%{?profile}" == "tv"
-ExcludeArch: %{arm} %ix86 x86_64
-%endif
-
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(ecore-imf)
BuildRequires: pkgconfig(ecore-input)
BuildRequires: pkgconfig(sensor)
BuildRequires: pkgconfig(capi-network-wifi)
BuildRequires: pkgconfig(capi-network-connection)
+# For backward compatibility. Not needed (always true) in unified environment.
%if "%{?profile}" != "wearable"
BuildRequires: pkgconfig(capi-network-tethering)
%endif
BuildRequires: edje-tools
Requires(post): /sbin/ldconfig
requires(postun): /sbin/ldconfig
+Requires: %{name}-compat = %{version}-%{release}
+# For backward compatibility. Not needed (always true) in unified environment.
+# common, tv, ivi, or unified (undefined)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
+Recommends: %{name}-profile_common
+%endif
%description
Wi-Fi UI Gadget
-%if "%{profile}" == "mobile"
+# For backward compatibility. Not needed (always true) in unified environment.
+# mobile, common, or unified (undefined)
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
%package -n net.wifi-qs
Summary: Wi-Fi System popup
Requires: %{name} = %{version}
Wi-Fi System popup for TIZEN
%endif
-%if "%{profile}" == "wearable"
+# For backward compatibility. Not needed (always true) in unified environment.
+# wearable, or unified (undefined) (add common after refactoring efl-ext)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
%package -n org.tizen.w-wifi
Summary: Wi-Fi UI Gadget for wearable
Wi-Fi UI Gadget for wearable
%endif
+# For backward compatibility. Not needed (always true) in unified environment.
+# common, or unified (undefined)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
+%package profile_common
+Summary: Wifi-efl-ug binary for common profile (tv/ivi included)
+Provides: %{name}-compat = %{version}-%{release}
+Provides: %{name}-profile_tv = %{version}-%{release}
+Provides: %{name}-profile_ivi = %{version}-%{release}
+Conflicts: %{name}-profile_mobile
+Conflicts: %{name}-profile_wearable
+%description profile_common
+Wi-Fi UI Gadget binary for common profile (not mobile & not wearable)
+%endif
+
+# For backward compatibility. Not needed (always true) in unified environment.
+# mobile, common, or unified (undefined)
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
+%package profile_mobile
+Summary: Wifi-efl-ug binary for mobile
+Provides: %{name}-compat = %{version}-%{release}
+Conflicts: %{name}-profile_common
+Conflicts: %{name}-profile_wearable
+%description profile_mobile
+Wi-Fi UI Gadget binary for mobile profile
+%endif
+
+# For backward compatibility. Not needed (always true) in unified environment.
+# wearable, or unified (undefined) (add common after refactoring efl-ext)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%package profile_wearable
+Summary: Wifi-efl-ug binary for wearable
+Provides: %{name}-compat = %{version}-%{release}
+Conflicts: %{name}-profile_common
+Conflicts: %{name}-profile_mobile
+%description profile_wearable
+Wi-Fi UI Gadget binary for wearable profile
+%endif
+
%prep
%setup -q
%build
#LDFLAGS+="-Wl,--rpath=%{PREFIX}/lib -Wl,--as-needed"
+
+# For backward compatibility. Not needed (always true) in unified environment.
+# mobile, common, or unified (undefined)
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
+mkdir -p build_mobile
+pushd build_mobile
cmake -DCMAKE_INSTALL_PREFIX=%{PREFIX} \
-%if "%{profile}" != "wearable"
-DTIZEN_TETHERING_ENABLE=1 \
-%endif
-DMODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE=1 \
-%if "%{profile}" == "mobile"
-DTIZEN_MOBILE=1 \
+%if "%{?_with_emulator}" == "1"
+ -DTIZEN_EMULATOR=1 \
+%endif
+ ..
+
+make %{?_smp_mflags}
+popd
%endif
-%if "%{profile}" == "wearable"
+
+
+# For backward compatibility. Not needed (always true) in unified environment.
+# wearable, or unified (undefined) (add common after refactoring efl-ext)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+mkdir -p build_wearable
+pushd build_wearable
+cmake -DCMAKE_INSTALL_PREFIX=%{PREFIX} \
+ -DMODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE=1 \
-DTIZEN_WEARABLE=1 \
+%if "%{?_with_emulator}" == "1"
+ -DTIZEN_EMULATOR=1 \
+%endif
+ ..
+
+make %{?_smp_mflags}
+popd
%endif
+
+# For backward compatibility. Not needed (always true) in unified environment.
+# common, or unified (undefined)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
+cmake -DCMAKE_INSTALL_PREFIX=%{PREFIX} \
+ -DTIZEN_TETHERING_ENABLE=1 \
+ -DMODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE=1 \
%if "%{?_with_emulator}" == "1"
-DTIZEN_EMULATOR=1 \
%endif
.
make %{?_smp_mflags}
+%endif
%install
+# For backward compatibility. Not needed (always true) in unified environment.
+# mobile, common, or unified (undefined)
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
+pushd build_mobile
+%make_install
+popd
+pushd %{buildroot}%{PREFIX}/ug/lib
+for FILE in *.so*; do mv "${FILE}" "${FILE}.mobile"; done
+popd
+%endif
+
+# For backward compatibility. Not needed (always true) in unified environment.
+# wearable, or unified (undefined) (add common after refactoring efl-ext)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+pushd build_wearable
+%make_install
+popd
+pushd %{buildroot}%{PREFIX}/ug/lib
+for FILE in *.so*; do if [[ $FILE =~ .*mobile$ ]]; then echo skip "${FILE}"; else mv "${FILE}" "${FILE}.wearable"; fi; done
+popd
+%endif
+
+# For backward compatibility. Not needed (always true) in unified environment.
+# common, or unified (undefined)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
%make_install
+%endif
#License
mkdir -p %{buildroot}%{_datadir}/license
cp LICENSE %{buildroot}%{_datadir}/license/wifi-efl-ug
-%if "%{profile}" == "mobile"
+# For backward compatibility. Not needed (always true) in unified environment.
+# mobile, common, or unified (undefined)
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
cp LICENSE %{buildroot}%{_datadir}/license/net.wifi-qs
%endif
-%if "%{profile}" == "wearable"
+# For backward compatibility. Not needed (always true) in unified environment.
+# wearable, or unified (undefined) (add common after refactoring efl-ext)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
cp LICENSE %{buildroot}%{_datadir}/license/org.tizen.w-wifi
%endif
%files
%manifest wifi-efl-ug.manifest
-%{PREFIX}/ug/lib/*
-%attr(644,-,-) %{PREFIX}/ug/lib/*
-%attr(755,-,-) %{PREFIX}/ug/lib/
%{PREFIX}/apps/wifi-efl-ug/res/edje/*.edj
%{_datadir}/license/wifi-efl-ug
%{_datadir}/packages/wifi-efl-ug.xml
-%if "%{profile}" == "mobile"
+/usr/apps/wifi-efl-ug/shared/res/tables/ug-wifi-efl_ChangeableColorTable.xml
+/usr/apps/wifi-efl-ug/shared/res/tables/ug-wifi-efl_FontInfoTable.xml
+
+# For backward compatibility. Not needed (always true) in unified environment.
+# common, or unified (undefined)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable"
+%post profile_common -p /sbin/ldconfig
+%postun profile_common -p /sbin/ldconfig
+%files profile_common
+%exclude %{PREFIX}/ug/lib/*.mobile
+%exclude %{PREFIX}/ug/lib/*.wearable
+%attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so
+%attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so.*
+%endif
+
+# For backward compatibility. Not needed (always true) in unified environment.
+# mobile, common, or unified (undefined)
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
+%post profile_mobile
+pushd %{PREFIX}/ug/lib/
+for FILE in libug-wifi-efl*.mobile; do mv "${FILE}" "${FILE%.mobile}"; done
+popd
+/sbin/ldconfig
+%preun profile_mobile
+pushd %{PREFIX}/ug/lib/
+for FILE in libug-wifi-efl*.so; do mv "${FILE}" "${FILE}.mobile"; done
+for FILE in libug-wifi-efl*.so.*; do mv "${FILE}" "${FILE}.mobile"; done
+popd
+%postun profile_mobile -p /sbin/ldconfig
+%files profile_mobile
+%attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so.mobile
+%attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so.*.mobile
%{_datadir}/locale/*/LC_MESSAGES/*.mo
%{_datadir}/icons/*.png
%endif
-/usr/apps/wifi-efl-ug/shared/res/tables/ug-wifi-efl_ChangeableColorTable.xml
-/usr/apps/wifi-efl-ug/shared/res/tables/ug-wifi-efl_FontInfoTable.xml
-%if "%{profile}" == "mobile"
+# For backward compatibility. Not needed (always true) in unified environment.
+# wearable, or unified (undefined) (add common after refactoring efl-ext)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%post profile_wearable
+pushd %{PREFIX}/ug/lib/
+for FILE in libug-wifi-efl*.wearable; do mv "${FILE}" "${FILE%.wearable}"; done
+popd
+/sbin/ldconfig
+%preun profile_wearable
+pushd %{PREFIX}/ug/lib/
+for FILE in libug-wifi-efl*.so; do mv "${FILE}" "${FILE}.wearable"; done
+for FILE in libug-wifi-efl*.so.*; do mv "${FILE}" "${FILE}.wearable"; done
+popd
+%postun profile_wearable -p /sbin/ldconfig
+%files profile_wearable
+%attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so.wearable
+%attr(755,-,-) %{PREFIX}/ug/lib/libug-wifi-efl*.so.*.wearable
+%endif
+
+# For backward compatibility. Not needed (always true) in unified environment.
+# mobile, common, or unified (undefined)
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
%files -n net.wifi-qs
%manifest net.wifi-qs.manifest
%{_bindir}/wifi-qs
%{_datadir}/license/net.wifi-qs
%endif
-%if "%{profile}" == "wearable"
+# For backward compatibility. Not needed (always true) in unified environment.
+# wearable, or unified (undefined) (add common after refactoring efl-ext)
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
%files -n org.tizen.w-wifi
%manifest org.tizen.w-wifi.manifest
/usr/shared/res/tables/color_table.xml