2 Summary: TIZEN Network Configuration service
7 Source0: %{name}-%{version}.tar.gz
8 BuildRequires: pkgconfig(dlog)
9 BuildRequires: pkgconfig(vconf)
10 BuildRequires: pkgconfig(gio-2.0)
11 BuildRequires: pkgconfig(glib-2.0)
12 BuildRequires: pkgconfig(capi-system-info)
13 BuildRequires: pkgconfig(capi-vpnsvc)
15 BuildRequires: pkgconfig(sqlite3)
16 BuildRequires: pkgconfig(libtzplatform-config)
17 BuildRequires: pkgconfig(libnl-2.0)
21 Requires: security-config
22 Requires(post): systemd
23 Requires(preun): systemd
24 Requires(postun): systemd
25 Provides: %{name}-profile_common = %{version}-%{release}
26 Provides: %{name}-profile_mobile = %{version}-%{release}
27 Provides: %{name}-profile_wearable = %{version}-%{release}
28 Provides: %{name}-profile_ivi = %{version}-%{release}
31 TIZEN Network Configuration service
34 Summary: net-config extension for TV profile
35 Requires: %{name} = %{version}-%{release}
36 %description profile_tv
37 TIZEN Network Configuration service extension for Tizen TV profile.
39 %package plugin-headed
40 Summary: net-config extension for headed profile
41 BuildRequires: pkgconfig(bundle)
42 BuildRequires: pkgconfig(eventsystem)
43 BuildRequires: pkgconfig(alarm-service)
44 BuildRequires: pkgconfig(syspopup-caller)
45 BuildRequires: pkgconfig(capi-appfw-application)
46 Requires: %{name} = %{version}-%{release}
47 %description plugin-headed
48 TIZEN Network Configuration service extension for headed profile.
50 %package plugin-telephony
51 Summary: net-config extension for telephony FW
52 BuildRequires: pkgconfig(tapi)
53 Requires: %{name} = %{version}-%{release}
54 %description plugin-telephony
55 TIZEN Network Configuration service extension for telephony FW.
60 # NOTE: the following macros are undefined.
61 # PLEASE DO NOT USE model_build_features in the future with Tizen 4.0+.
62 #{?model_build_feature_wlan_concurrent_mode}
63 #{?model_build_feature_wlan_p2p_disable}
64 #{?model_build_feature_network_tethering_disable}
65 #{?model_build_feature_wlan_wearable}
66 # In case, we have commercializing team using such unwelcomed
67 # macros in their productin build, we are keeping those.
68 # However, it is recommended to remove all if/endif with model_build_feature
70 # NOTE: Are we really going to make "mobile" == "SPRD"?
73 cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
74 -DTIZEN_WLAN_PASSPOINT=1 \
75 -DTIZEN_WLAN_USE_P2P_INTERFACE=1 \
76 %if 0%{?model_build_feature_wlan_concurrent_mode}
77 -DWLAN_CONCURRENT_MODE=1 \
79 %if ! 0%{?model_build_feature_wlan_p2p_disable}
80 -DTIZEN_P2P_ENABLE=1 \
82 %if ! 0%{?model_build_feature_network_tethering_disable}
83 -DTIZEN_TETHERING_ENABLE=1 \
85 %if 0%{?model_build_feature_wlan_wearable} == 1
87 -DTIZEN_CAPTIVE_PORTAL=1 \
99 mkdir -p %{buildroot}%{_libdir}/systemd/system/
100 %if "%{?_lib}" == "lib64"
101 mkdir -p %{buildroot}%{_unitdir}
104 cp resources/usr/lib/systemd/system/net-config_tv.service %{buildroot}%{_libdir}/systemd/system/net-config.service.tv
105 mkdir -p %{buildroot}%{_libdir}/udev/rules.d/
106 cp resources/usr/lib/udev/rules.d/99-wifiusb-dev.rules %{buildroot}%{_libdir}/udev/rules.d/99-wifiusb-dev.rules
107 %if "%{?_lib}" == "lib64"
108 cp resources/usr/lib/systemd/system/net-config_tv.service %{buildroot}%{_unitdir}/net-config.service.tv
110 cp resources/usr/lib/systemd/system/net-config.service %{buildroot}%{_libdir}/systemd/system/net-config.service
111 %if "%{?_lib}" == "lib64"
112 cp resources/usr/lib/systemd/system/net-config.service %{buildroot}%{_unitdir}/net-config.service
115 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
116 ln -s ../net-config.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/net-config.service
117 %if "%{?_lib}" == "lib64"
118 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants/
119 ln -s ../net-config.service %{buildroot}%{_unitdir}/multi-user.target.wants/net-config.service
122 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
123 cp resources/usr/share/dbus-1/system-services/net.netconfig.service %{buildroot}%{_datadir}/dbus-1/system-services/net.netconfig.service
125 mkdir -p %{buildroot}%{TZ_SYS_ETC}
126 cp resources/etc/resolv.conf %{buildroot}%{TZ_SYS_ETC}/resolv.conf
128 mkdir -p %{buildroot}%{_sysconfdir}
129 ln -s %{TZ_SYS_ETC}/resolv.conf %{buildroot}%{_sysconfdir}/resolv.conf
131 #DBus DAC (net-config.manifest enables DBus SMACK)
132 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
133 cp resources/etc/dbus-1/system.d/net-config.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/net-config.conf
135 %if 0%{?model_build_feature_wlan_wearable} == 1
137 mkdir -p %{buildroot}/usr/system/RestoreDir/softreset
138 cp resources/usr/system/RestoreDir/softreset/network_softreset.sh %{buildroot}/usr/system/RestoreDir/softreset/network_softreset.sh
142 chsmack -a 'System::Shared' %{_sysconfdir}/resolv.conf
143 chsmack -a 'System::Shared' %{TZ_SYS_ETC}/resolv.conf
146 mkdir -p /opt/usr/data/network
147 chmod 755 /opt/usr/data/network
148 chown network_fw:network_fw /opt/usr/data/network
149 #chsmack -a 'System' /opt/usr/data/network
151 #Add net-config.service to systemd extra default dependency ignore list
152 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
153 ln -sf %{_libdir}/systemd/system/net-config.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
154 %if "%{?_lib}" == "lib64"
155 ln -sf %{_unitdir}/net-config.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
158 #systemctl daemon-reload
159 #systemctl restart net-config.service
162 #systemctl stop net-config.service
165 #systemctl daemon-reload
169 %manifest net-config.manifest
170 %attr(500,network_fw,network_fw) %{_bindir}/*
171 %attr(644,network_fw,network_fw) %{_sysconfdir}/resolv.conf
172 %attr(644,network_fw,network_fw) %{TZ_SYS_ETC}/resolv.conf
173 %attr(644,root,root) %{_datadir}/dbus-1/system-services/*
175 %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/*
176 %attr(644,root,root) %{_libdir}/systemd/system/net-config.service
177 %attr(644,root,root) %{_libdir}/systemd/system/multi-user.target.wants/net-config.service
178 %attr(644,network_fw,network_fw) /usr/lib/tmpfiles.d/security-network-config.conf
179 %if "%{?_lib}" == "lib64"
180 %attr(644,root,root) %{_unitdir}/net-config.service
181 %attr(644,root,root) %{_unitdir}/multi-user.target.wants/net-config.service
184 %if 0%{?model_build_feature_wlan_wearable} == 1
185 %attr(700,network_fw,network_fw) /usr/system/RestoreDir/softreset/network_softreset.sh
189 mv %{_libdir}/systemd/system/net-config.service.tv %{_libdir}/systemd/system/net-config.service
190 %if "%{?_lib}" == "lib64"
191 mv %{_unitdir}/net-config.service.tv %{_unitdir}/net-config.service
194 %attr(644,network_fw,network_fw) %{_libdir}/udev/rules.d/99-wifiusb-dev.rules
195 %attr(644,root,root) %{_libdir}/systemd/system/net-config.service.tv
196 %if "%{?_lib}" == "lib64"
197 %attr(644,root,root) %{_unitdir}/net-config.service.tv
201 %manifest net-config.manifest
202 %attr(500,network_fw,network_fw) %{_libdir}/net-config-plugin-headed.so
204 %files plugin-telephony
205 %manifest net-config.manifest
206 %attr(500,network_fw,network_fw) %{_libdir}/net-config-plugin-telephony.so