Name: net-config
Summary: TIZEN Network Configuration service
-Version: 1.1.114
-Release: 2
+Version: 1.1.135
+Release: 3
Group: System/Network
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(key-manager)
+BuildRequires: pkgconfig(libnl-2.0)
Requires: vconf
Requires: connman
Requires: systemd
+Requires: security-config
+Requires: iproute2
+Requires: iptables
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Provides: %{name}-profile_wearable = %{version}-%{release}
Provides: %{name}-profile_ivi = %{version}-%{release}
-%define upgrade_script_path /usr/share/upgrade/scripts
-
%description
TIZEN Network Configuration service
%description profile_tv
TIZEN Network Configuration service extension for Tizen TV profile.
+%package profile_wearable
+Summary: net-config extension for wearable profile
+Requires: %{name} = %{version}-%{release}
+%description profile_wearable
+TIZEN Network Configuration service extension for Tizen wearable profile.
+
%package plugin-headed
Summary: net-config extension for headed profile
BuildRequires: pkgconfig(bundle)
%description plugin-telephony
TIZEN Network Configuration service extension for telephony FW.
+%package haltests
+Summary: net-config extension for HAL test
+BuildRequires: pkgconfig(gmock)
+BuildRequires: pkgconfig(capi-network-wifi-manager)
+BuildRequires: pkgconfig(capi-network-wifi-direct)
+BuildRequires: pkgconfig(capi-network-softap)
+Requires: %{name} = %{version}-%{release}
+%description haltests
+TIZEN Network Configuration service extension for HAL test.
+
%prep
%setup -q
-# NOTE: the following macros are undefined.
-# PLEASE DO NOT USE model_build_features in the future with Tizen 4.0+.
-#{?model_build_feature_wlan_concurrent_mode}
-#{?model_build_feature_wlan_p2p_disable}
-#{?model_build_feature_network_tethering_disable}
-#{?model_build_feature_wlan_wearable}
-# In case, we have commercializing team using such unwelcomed
-# macros in their productin build, we are keeping those.
-# However, it is recommended to remove all if/endif with model_build_feature
-
-# NOTE: Are we really going to make "mobile" == "SPRD"?
-
%build
+# Build for wearable
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DTIZEN_WLAN_PASSPOINT=1 \
-DTIZEN_WLAN_USE_P2P_INTERFACE=1 \
-%if 0%{?model_build_feature_wlan_concurrent_mode}
- -DWLAN_CONCURRENT_MODE=1 \
-%endif
-%if ! 0%{?model_build_feature_wlan_p2p_disable}
- -DTIZEN_P2P_ENABLE=1 \
-%endif
-%if ! 0%{?model_build_feature_network_tethering_disable}
- -DTIZEN_TETHERING_ENABLE=1 \
-%endif
-%if 0%{?model_build_feature_wlan_wearable} == 1
+ -DTIZEN_DEBUG_ENABLE=1 \
-DTIZEN_WEARABLE=1 \
-DTIZEN_CAPTIVE_PORTAL=1 \
-%endif
- -DLIB_PATH=%{_lib} \
+ -DLIB_PATH=%{_lib} \
+ -DBIN_DIR=%{_bindir} \
+ -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
+ -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} \
+ .
+
+%make_install
+mv %{buildroot}%{_bindir}/net-config %{_builddir}/%{name}-%{version}/net-config.wearable
+
+make %{?_smp_mflags}
+
+
+# Build for common packages
+cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DTIZEN_WLAN_PASSPOINT=1 \
+ -DTIZEN_WLAN_USE_P2P_INTERFACE=1 \
+ -DTIZEN_DEBUG_ENABLE=1 \
+ -DTIZEN_WEARABLE=0 \
+ -DTIZEN_CAPTIVE_PORTAL=0 \
+ -DLIB_PATH=%{_lib} \
+ -DBIN_DIR=%{_bindir} \
+ -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
+ -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} \
.
make %{?_smp_mflags}
mkdir -p %{buildroot}%{TZ_SYS_ETC}
cp resources/etc/resolv.conf %{buildroot}%{TZ_SYS_ETC}/resolv.conf
-mkdir -p %{buildroot}/usr/share/upgrade/data/
-cp resources/etc/resolv.conf %{buildroot}/usr/share/upgrade/data/resolv.conf
mkdir -p %{buildroot}%{_sysconfdir}
ln -s %{TZ_SYS_ETC}/resolv.conf %{buildroot}%{_sysconfdir}/resolv.conf
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
-%if 0%{?model_build_feature_wlan_wearable} == 1
+#log dump
+mkdir -p %{buildroot}/opt/etc/dump.d/module.d/
+cp resources/opt/etc/dump.d/module.d/network_dump.sh %{buildroot}/opt/etc/dump.d/module.d/network_dump.sh
+mkdir -p %{buildroot}/opt/var/lib/net-config/
+cp resources/opt/etc/dump.d/module.d/network_dump.sh %{buildroot}/opt/var/lib/net-config/network_dump.sh
+
#softreset scripts
mkdir -p %{buildroot}/usr/system/RestoreDir/softreset
cp resources/usr/system/RestoreDir/softreset/network_softreset.sh %{buildroot}/usr/system/RestoreDir/softreset/network_softreset.sh
-%endif
-#OS Upgrade
-mkdir -p %{buildroot}%{upgrade_script_path}
-cp -f scripts/500.netconfig_upgrade.sh %{buildroot}%{upgrade_script_path}
+mv %{_builddir}/%{name}-%{version}/net-config.wearable %{buildroot}%{_bindir}
%post
chsmack -a 'System::Shared' %{_sysconfdir}/resolv.conf
%files
%manifest net-config.manifest
%attr(500,network_fw,network_fw) %{_bindir}/*
+%exclude %{_bindir}/net-config.wearable
%attr(644,network_fw,network_fw) %{_sysconfdir}/resolv.conf
%attr(644,network_fw,network_fw) %{TZ_SYS_ETC}/resolv.conf
-%attr(644,network_fw,network_fw) /usr/share/upgrade/data/resolv.conf
-%attr(644,network_fw,network_fw) %{_datadir}/dbus-1/system-services/*
+%attr(644,root,root) %{_datadir}/dbus-1/system-services/*
#DBus DAC
-%attr(644,network_fw,network_fw) %{_sysconfdir}/dbus-1/system.d/*
-%attr(644,network_fw,network_fw) %{_libdir}/systemd/system/net-config.service
-%attr(644,network_fw,network_fw) %{_libdir}/systemd/system/multi-user.target.wants/net-config.service
-%attr(644,network_fw,network_fw) /usr/lib/tmpfiles.d/security-network-config.conf
+%attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/*
+%attr(644,root,root) %{_libdir}/systemd/system/net-config.service
+%attr(644,root,root) %{_libdir}/systemd/system/multi-user.target.wants/net-config.service
+%attr(644,root,root) /usr/lib/tmpfiles.d/security-network-config.conf
%if "%{?_lib}" == "lib64"
-%attr(644,network_fw,network_fw) %{_unitdir}/net-config.service
-%attr(644,network_fw,network_fw) %{_unitdir}/multi-user.target.wants/net-config.service
+%attr(644,root,root) %{_unitdir}/net-config.service
+%attr(644,root,root) %{_unitdir}/multi-user.target.wants/net-config.service
%endif
%license LICENSE
-%if 0%{?model_build_feature_wlan_wearable} == 1
-%attr(700,network_fw,network_fw) /usr/system/RestoreDir/softreset/network_softreset.sh
-%endif
-%{upgrade_script_path}/500.netconfig_upgrade.sh
+%attr(500,root,root) /opt/etc/dump.d/module.d/network_dump.sh
+%attr(500,network_fw,network_fw) /opt/var/lib/net-config/network_dump.sh
+#### tv profile ####
%post profile_tv
mv %{_libdir}/systemd/system/net-config.service.tv %{_libdir}/systemd/system/net-config.service
%if "%{?_lib}" == "lib64"
mv %{_unitdir}/net-config.service.tv %{_unitdir}/net-config.service
%endif
+
%files profile_tv
%attr(644,network_fw,network_fw) %{_libdir}/udev/rules.d/99-wifiusb-dev.rules
-%attr(644,network_fw,network_fw) %{_libdir}/systemd/system/net-config.service.tv
+%attr(644,root,root) %{_libdir}/systemd/system/net-config.service.tv
%if "%{?_lib}" == "lib64"
-%attr(644,network_fw,network_fw) %{_unitdir}/net-config.service.tv
+%attr(644,root,root) %{_unitdir}/net-config.service.tv
%endif
+#### wearable profile ####
+%preun profile_wearable
+rm %{_bindir}/net-config
+
+%post profile_wearable
+pushd %{_bindir}
+mv net-config.wearable net-config
+
+%files profile_wearable
+%attr(500,network_fw,network_fw) %{_bindir}/net-config.wearable
+%attr(644,network_fw,network_fw) /usr/system/RestoreDir/softreset/network_softreset.sh
+
+#### plugin ####
%files plugin-headed
%manifest net-config.manifest
%attr(500,network_fw,network_fw) %{_libdir}/net-config-plugin-headed.so
%files plugin-telephony
%manifest net-config.manifest
%attr(500,network_fw,network_fw) %{_libdir}/net-config-plugin-telephony.so
+
+%files haltests
+%manifest net-config.manifest
+%{_bindir}/*hal_tc
+