Name: net-config
Summary: TIZEN Network Configuration service
-Version: 1.1.61
+Version: 1.1.93
Release: 2
Group: System/Network
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
-BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(tapi)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-network-wifi-direct)
+BuildRequires: pkgconfig(capi-vpnsvc)
BuildRequires: cmake
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(libtzplatform-config)
Requires(preun): systemd
Requires(postun): systemd
+%define upgrade_script_path /usr/share/upgrade/scripts
+
%description
TIZEN Network Configuration service
%if ! 0%{?model_build_feature_network_tethering_disable}
-DTIZEN_TETHERING_ENABLE=1 \
%endif
+%if "%{profile}" == "mobile"
+ -DTIZEN_TELEPHONY_ENABLE=1 \
+ -DTIZEN_WLAN_BOARD_SPRD=1 \
+%else
%if "%{profile}" == "tv"
-DTIZEN_TV=1 \
%endif
+%endif
%if 0%{?model_build_feature_wlan_wearable} == 1
-DTIZEN_WEARABLE=1 \
-DTIZEN_CAPTIVE_PORTAL=1 \
mkdir -p %{buildroot}%{_sysconfdir}/
cp resources/etc/resolv.conf %{buildroot}%{_sysconfdir}/resolv.conf
-mkdir -p %{buildroot}%{_sbindir}/
-cp resources/usr/sbin/net-config.service %{buildroot}%{_sbindir}/net-config.service
-
-mkdir -p %{buildroot}%{TZ_SYS_DB}
-sqlite3 %{buildroot}%{TZ_SYS_DB}/.wifi_offload.db < resources/usr/share/wifi_offloading.sql
-
#DBus DAC (net-config.manifest enables DBus SMACK)
mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
cp resources/etc/dbus-1/system.d/net-config.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/net-config.conf
-#log dump
-mkdir -p %{buildroot}%{TZ_SYS_ETC}/dump.d/module.d/
-cp resources/opt/etc/dump.d/module.d/network_log_dump.sh %{buildroot}%{TZ_SYS_ETC}/dump.d/module.d/network_log_dump.sh
-mkdir -p %{buildroot}%{TZ_SYS_VAR}/lib/net-config/
-cp resources/opt/etc/dump.d/module.d/network_log_dump.sh %{buildroot}%{TZ_SYS_VAR}/lib/net-config/network_log_dump.sh
-cp resources/opt/etc/dump.d/module.d/network_dump.sh %{buildroot}%{TZ_SYS_VAR}/lib/net-config/network_dump.sh
-
%if 0%{?model_build_feature_wlan_wearable} == 1
#softreset scripts
mkdir -p %{buildroot}/usr/system/RestoreDir/softreset
mkdir -p %{buildroot}%{_datadir}/license
cp LICENSE %{buildroot}%{_datadir}/license/net-config
+#OS Upgrade
+mkdir -p %{buildroot}%{upgrade_script_path}
+cp -f scripts/netconfig_upgrade.sh %{buildroot}%{upgrade_script_path}
+
%post
+chsmack -a 'System::Shared' %{_sysconfdir}/resolv.conf
#Network logs
-mkdir -p /opt/usr/data/network
-chmod 755 /opt/usr/data/network
-chsmack -a net-config::logging /opt/usr/data/network
+#mkdir -p /opt/usr/data/network
+#chmod 755 /opt/usr/data/network
+#chsmack -a 'System' /opt/usr/data/network
#Add net-config.service to systemd extra default dependency ignore list
mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
%attr(644,root,root) %{_unitdir}/multi-user.target.wants/net-config.service
%endif
%{_datadir}/license/net-config
-%attr(660,root,root) %{TZ_SYS_DB}/.wifi_offload.db
-%attr(664,root,root) %{TZ_SYS_DB}/.wifi_offload.db-journal
-%attr(500,root,root) %{TZ_SYS_ETC}/dump.d/module.d/network_log_dump.sh
-%attr(500,root,root) %{TZ_SYS_VAR}/lib/net-config/network_log_dump.sh
-%attr(500,root,root) %{TZ_SYS_VAR}/lib/net-config/network_dump.sh
%if "%{profile}" == "tv"
%attr(644,root,root) %{_libdir}/udev/rules.d/99-wifiusb-dev.rules
%endif
%if 0%{?model_build_feature_wlan_wearable} == 1
%attr(700,root,root) /usr/system/RestoreDir/softreset/network_softreset.sh
-
%endif
+%{upgrade_script_path}/netconfig_upgrade.sh
+