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(key-manager)
18 BuildRequires: pkgconfig(libnl-2.0)
22 Requires: security-config
23 Requires(post): systemd
24 Requires(preun): systemd
25 Requires(postun): systemd
26 Provides: %{name}-profile_common = %{version}-%{release}
27 Provides: %{name}-profile_mobile = %{version}-%{release}
28 Provides: %{name}-profile_wearable = %{version}-%{release}
29 Provides: %{name}-profile_ivi = %{version}-%{release}
32 TIZEN Network Configuration service
35 Summary: net-config extension for TV profile
36 Requires: %{name} = %{version}-%{release}
37 %description profile_tv
38 TIZEN Network Configuration service extension for Tizen TV profile.
40 %package profile_wearable
41 Summary: net-config extension for wearable profile
42 Requires: %{name} = %{version}-%{release}
43 %description profile_wearable
44 TIZEN Network Configuration service extension for Tizen wearable profile.
46 %package plugin-headed
47 Summary: net-config extension for headed profile
48 BuildRequires: pkgconfig(bundle)
49 BuildRequires: pkgconfig(eventsystem)
50 BuildRequires: pkgconfig(alarm-service)
51 BuildRequires: pkgconfig(syspopup-caller)
52 BuildRequires: pkgconfig(capi-appfw-application)
53 Requires: %{name} = %{version}-%{release}
54 %description plugin-headed
55 TIZEN Network Configuration service extension for headed profile.
57 %package plugin-telephony
58 Summary: net-config extension for telephony FW
59 BuildRequires: pkgconfig(tapi)
60 Requires: %{name} = %{version}-%{release}
61 %description plugin-telephony
62 TIZEN Network Configuration service extension for telephony FW.
69 cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
70 -DTIZEN_WLAN_PASSPOINT=1 \
71 -DTIZEN_WLAN_USE_P2P_INTERFACE=1 \
72 -DTIZEN_DEBUG_ENABLE=1 \
74 -DTIZEN_CAPTIVE_PORTAL=1 \
79 mv %{buildroot}%{_bindir}/net-config %{_builddir}/%{name}-%{version}/net-config.wearable
84 # Build for common packages
85 cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
86 -DTIZEN_WLAN_PASSPOINT=1 \
87 -DTIZEN_WLAN_USE_P2P_INTERFACE=1 \
88 -DTIZEN_DEBUG_ENABLE=1 \
90 -DTIZEN_CAPTIVE_PORTAL=0 \
100 #Systemd service file
101 mkdir -p %{buildroot}%{_libdir}/systemd/system/
102 %if "%{?_lib}" == "lib64"
103 mkdir -p %{buildroot}%{_unitdir}
106 cp resources/usr/lib/systemd/system/net-config_tv.service %{buildroot}%{_libdir}/systemd/system/net-config.service.tv
107 mkdir -p %{buildroot}%{_libdir}/udev/rules.d/
108 cp resources/usr/lib/udev/rules.d/99-wifiusb-dev.rules %{buildroot}%{_libdir}/udev/rules.d/99-wifiusb-dev.rules
109 %if "%{?_lib}" == "lib64"
110 cp resources/usr/lib/systemd/system/net-config_tv.service %{buildroot}%{_unitdir}/net-config.service.tv
112 cp resources/usr/lib/systemd/system/net-config.service %{buildroot}%{_libdir}/systemd/system/net-config.service
113 %if "%{?_lib}" == "lib64"
114 cp resources/usr/lib/systemd/system/net-config.service %{buildroot}%{_unitdir}/net-config.service
117 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
118 ln -s ../net-config.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/net-config.service
119 %if "%{?_lib}" == "lib64"
120 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants/
121 ln -s ../net-config.service %{buildroot}%{_unitdir}/multi-user.target.wants/net-config.service
124 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
125 cp resources/usr/share/dbus-1/system-services/net.netconfig.service %{buildroot}%{_datadir}/dbus-1/system-services/net.netconfig.service
127 mkdir -p %{buildroot}%{TZ_SYS_ETC}
128 cp resources/etc/resolv.conf %{buildroot}%{TZ_SYS_ETC}/resolv.conf
130 mkdir -p %{buildroot}%{_sysconfdir}
131 ln -s %{TZ_SYS_ETC}/resolv.conf %{buildroot}%{_sysconfdir}/resolv.conf
133 #DBus DAC (net-config.manifest enables DBus SMACK)
134 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
135 cp resources/etc/dbus-1/system.d/net-config.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/net-config.conf
138 mkdir -p %{buildroot}/opt/etc/dump.d/module.d/
139 cp resources/opt/etc/dump.d/module.d/network_dump.sh %{buildroot}/opt/etc/dump.d/module.d/network_dump.sh
140 mkdir -p %{buildroot}/opt/var/lib/net-config/
141 cp resources/opt/etc/dump.d/module.d/network_dump.sh %{buildroot}/opt/var/lib/net-config/network_dump.sh
144 mkdir -p %{buildroot}/usr/system/RestoreDir/softreset
145 cp resources/usr/system/RestoreDir/softreset/network_softreset.sh %{buildroot}/usr/system/RestoreDir/softreset/network_softreset.sh
147 mv %{_builddir}/%{name}-%{version}/net-config.wearable %{buildroot}%{_bindir}
150 chsmack -a 'System::Shared' %{_sysconfdir}/resolv.conf
151 chsmack -a 'System::Shared' %{TZ_SYS_ETC}/resolv.conf
154 mkdir -p /opt/usr/data/network
155 chmod 755 /opt/usr/data/network
156 chown network_fw:network_fw /opt/usr/data/network
157 #chsmack -a 'System' /opt/usr/data/network
159 #Add net-config.service to systemd extra default dependency ignore list
160 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
161 ln -sf %{_libdir}/systemd/system/net-config.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
162 %if "%{?_lib}" == "lib64"
163 ln -sf %{_unitdir}/net-config.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
166 #systemctl daemon-reload
167 #systemctl restart net-config.service
170 #systemctl stop net-config.service
173 #systemctl daemon-reload
177 %manifest net-config.manifest
178 %attr(500,network_fw,network_fw) %{_bindir}/*
179 %attr(644,network_fw,network_fw) %{_sysconfdir}/resolv.conf
180 %attr(644,network_fw,network_fw) %{TZ_SYS_ETC}/resolv.conf
181 %attr(644,root,root) %{_datadir}/dbus-1/system-services/*
183 %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/*
184 %attr(644,root,root) %{_libdir}/systemd/system/net-config.service
185 %attr(644,root,root) %{_libdir}/systemd/system/multi-user.target.wants/net-config.service
186 %attr(644,network_fw,network_fw) /usr/lib/tmpfiles.d/security-network-config.conf
187 %if "%{?_lib}" == "lib64"
188 %attr(644,root,root) %{_unitdir}/net-config.service
189 %attr(644,root,root) %{_unitdir}/multi-user.target.wants/net-config.service
192 %attr(500,root,root) /opt/etc/dump.d/module.d/network_dump.sh
193 %attr(500,network_fw,network_fw) /opt/var/lib/net-config/network_dump.sh
197 mv %{_libdir}/systemd/system/net-config.service.tv %{_libdir}/systemd/system/net-config.service
198 %if "%{?_lib}" == "lib64"
199 mv %{_unitdir}/net-config.service.tv %{_unitdir}/net-config.service
203 %attr(644,network_fw,network_fw) %{_libdir}/udev/rules.d/99-wifiusb-dev.rules
204 %attr(644,root,root) %{_libdir}/systemd/system/net-config.service.tv
205 %if "%{?_lib}" == "lib64"
206 %attr(644,root,root) %{_unitdir}/net-config.service.tv
209 #### wearable profile ####
210 %preun profile_wearable
211 rm %{_bindir}/net-config
213 %post profile_wearable
215 mv net-config.wearable net-config
217 %files profile_wearable
218 %attr(644,root,root) %{_bindir}/net-config.wearable
219 %attr(644,network_fw,network_fw) /usr/system/RestoreDir/softreset/network_softreset.sh
223 %manifest net-config.manifest
224 %attr(500,network_fw,network_fw) %{_libdir}/net-config-plugin-headed.so
226 %files plugin-telephony
227 %manifest net-config.manifest
228 %attr(500,network_fw,network_fw) %{_libdir}/net-config-plugin-telephony.so