From a42a72c255cbd08b801efd47684eb4630dbaed75 Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Tue, 2 Jan 2018 13:14:36 +0900 Subject: [PATCH] Create new rpm for wearable profile Change-Id: Id5fa0b44e995a9ab799dfd3d132b07cd3d8dbee5 --- packaging/net-config.spec | 49 +++++++++++++++++++++++++++++++++++---- src/wifi-power.c | 2 +- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/packaging/net-config.spec b/packaging/net-config.spec index a3c24b3..a57b96a 100755 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -1,6 +1,6 @@ Name: net-config Summary: TIZEN Network Configuration service -Version: 1.1.121 +Version: 1.1.122 Release: 2 Group: System/Network License: Apache-2.0 @@ -37,6 +37,12 @@ Requires: %{name} = %{version}-%{release} %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) @@ -71,15 +77,33 @@ TIZEN Network Configuration service extension for telephony FW. # 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 \ -DTIZEN_DEBUG_ENABLE=1 \ -%if 0%{?model_build_feature_wlan_wearable} == 1 -DTIZEN_WEARABLE=1 \ -DTIZEN_CAPTIVE_PORTAL=1 \ + -DLIB_PATH=%{_lib} \ + . + +%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 \ +%if 0%{?model_build_feature_wlan_concurrent_mode} + -DWLAN_CONCURRENT_MODE=1 \ %endif - -DLIB_PATH=%{_lib} \ + -DTIZEN_WEARABLE=0 \ + -DTIZEN_CAPTIVE_PORTAL=0 \ + -DLIB_PATH=%{_lib} \ . make %{?_smp_mflags} @@ -131,11 +155,11 @@ cp resources/opt/etc/dump.d/module.d/network_dump.sh %{buildroot}/opt/etc/dump.d 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 -%if 0%{?model_build_feature_wlan_wearable} == 1 #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 + +mv %{_builddir}/%{name}-%{version}/net-config.wearable %{buildroot}%{_bindir} %post chsmack -a 'System::Shared' %{_sysconfdir}/resolv.conf @@ -186,11 +210,13 @@ ln -sf %{_unitdir}/net-config.service %{_sysconfdir}/systemd/default-extra-depen %attr(700,network_fw,network_fw) /usr/system/RestoreDir/softreset/network_softreset.sh %endif +#### 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,root,root) %{_libdir}/systemd/system/net-config.service.tv @@ -198,6 +224,19 @@ mv %{_unitdir}/net-config.service.tv %{_unitdir}/net-config.service %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(644,root,root) %{_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 diff --git a/src/wifi-power.c b/src/wifi-power.c index 477c089..781eb00 100755 --- a/src/wifi-power.c +++ b/src/wifi-power.c @@ -449,7 +449,7 @@ static void __netconfig_wifi_airplane_mode(keynode_t *node, void *user_data) netconfig_vconf_get_int(VCONF_WIFI_OFF_STATE_BY_AIRPLANE, &wifi_off_by_airplane); #if defined TIZEN_WEARABLE - netconfig_vconf_get_int(VCONF_WIFI_WEARABLE_WIFI_USE, &wifi_state) + netconfig_vconf_get_int(VCONF_WIFI_WEARABLE_WIFI_USE, &wifi_state); #else netconfig_vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_state); #endif -- 2.34.1