2 Summary: TIZEN Network Configuration service
7 Source0: %{name}-%{version}.tar.gz
8 BuildRequires: pkgconfig(dlog)
9 BuildRequires: pkgconfig(tapi)
10 BuildRequires: pkgconfig(vconf)
11 BuildRequires: pkgconfig(bundle)
12 BuildRequires: pkgconfig(gio-2.0)
13 BuildRequires: pkgconfig(glib-2.0)
14 BuildRequires: pkgconfig(eventsystem)
15 BuildRequires: pkgconfig(alarm-service)
16 BuildRequires: pkgconfig(syspopup-caller)
17 BuildRequires: pkgconfig(capi-system-info)
18 BuildRequires: pkgconfig(capi-appfw-application)
19 BuildRequires: pkgconfig(capi-network-wifi-direct)
21 BuildRequires: pkgconfig(sqlite3)
22 BuildRequires: pkgconfig(libtzplatform-config)
26 Requires(post): systemd
27 Requires(preun): systemd
28 Requires(postun): systemd
31 TIZEN Network Configuration service
37 cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
38 -DTIZEN_WLAN_PASSPOINT=1 \
39 -DTIZEN_WLAN_USE_P2P_INTERFACE=1 \
40 %if 0%{?model_build_feature_wlan_concurrent_mode}
41 -DWLAN_CONCURRENT_MODE=1 \
43 %if ! 0%{?model_build_feature_wlan_p2p_disable}
44 -DTIZEN_P2P_ENABLE=1 \
46 %if ! 0%{?model_build_feature_network_tethering_disable}
47 -DTIZEN_TETHERING_ENABLE=1 \
49 %if "%{profile}" == "mobile"
50 -DTIZEN_TELEPHONY_ENABLE=1 \
51 -DTIZEN_WLAN_BOARD_SPRD=1 \
53 %if "%{profile}" == "tv"
57 %if 0%{?model_build_feature_wlan_wearable} == 1
59 -DTIZEN_CAPTIVE_PORTAL=1 \
70 mkdir -p %{buildroot}%{_libdir}/systemd/system/
71 %if "%{?_lib}" == "lib64"
72 mkdir -p %{buildroot}%{_unitdir}
75 %if "%{profile}" == "tv"
76 cp resources/usr/lib/systemd/system/net-config_tv.service %{buildroot}%{_libdir}/systemd/system/net-config.service
77 mkdir -p %{buildroot}%{_libdir}/udev/rules.d/
78 cp resources/usr/lib/udev/rules.d/99-wifiusb-dev.rules %{buildroot}%{_libdir}/udev/rules.d/99-wifiusb-dev.rules
80 cp resources/usr/lib/systemd/system/net-config.service %{buildroot}%{_libdir}/systemd/system/net-config.service
81 %if "%{?_lib}" == "lib64"
82 cp resources/usr/lib/systemd/system/net-config.service %{buildroot}%{_unitdir}/net-config.service
86 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
87 ln -s ../net-config.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/net-config.service
88 %if "%{?_lib}" == "lib64"
89 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants/
90 ln -s ../net-config.service %{buildroot}%{_unitdir}/multi-user.target.wants/net-config.service
93 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
94 cp resources/usr/share/dbus-1/system-services/net.netconfig.service %{buildroot}%{_datadir}/dbus-1/system-services/net.netconfig.service
96 mkdir -p %{buildroot}%{_sysconfdir}/
97 cp resources/etc/resolv.conf %{buildroot}%{_sysconfdir}/resolv.conf
99 mkdir -p %{buildroot}%{_sbindir}/
100 cp resources/usr/sbin/net-config.service %{buildroot}%{_sbindir}/net-config.service
102 mkdir -p %{buildroot}%{TZ_SYS_DB}
103 sqlite3 %{buildroot}%{TZ_SYS_DB}/.wifi_offload.db < resources/usr/share/wifi_offloading.sql
105 #DBus DAC (net-config.manifest enables DBus SMACK)
106 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
107 cp resources/etc/dbus-1/system.d/net-config.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/net-config.conf
110 mkdir -p %{buildroot}%{TZ_SYS_ETC}/dump.d/module.d/
111 cp resources/opt/etc/dump.d/module.d/network_log_dump.sh %{buildroot}%{TZ_SYS_ETC}/dump.d/module.d/network_log_dump.sh
112 mkdir -p %{buildroot}%{TZ_SYS_VAR}/lib/net-config/
113 cp resources/opt/etc/dump.d/module.d/network_log_dump.sh %{buildroot}%{TZ_SYS_VAR}/lib/net-config/network_log_dump.sh
114 cp resources/opt/etc/dump.d/module.d/network_dump.sh %{buildroot}%{TZ_SYS_VAR}/lib/net-config/network_dump.sh
116 %if 0%{?model_build_feature_wlan_wearable} == 1
118 mkdir -p %{buildroot}/usr/system/RestoreDir/softreset
119 cp resources/usr/system/RestoreDir/softreset/network_softreset.sh %{buildroot}/usr/system/RestoreDir/softreset/network_softreset.sh
123 mkdir -p %{buildroot}%{_datadir}/license
124 cp LICENSE %{buildroot}%{_datadir}/license/net-config
129 mkdir -p /opt/usr/data/network
130 chmod 755 /opt/usr/data/network
131 chsmack -a 'System' /opt/usr/data/network
133 #Add net-config.service to systemd extra default dependency ignore list
134 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
135 ln -sf %{_libdir}/systemd/system/net-config.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
136 %if "%{?_lib}" == "lib64"
137 ln -sf %{_unitdir}/net-config.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
140 #systemctl daemon-reload
141 #systemctl restart net-config.service
144 #systemctl stop net-config.service
147 #systemctl daemon-reload
151 %manifest net-config.manifest
152 %attr(500,root,root) %{_sbindir}/*
153 %attr(644,root,root) %{_sysconfdir}/resolv.conf
154 %attr(644,root,root) %{_datadir}/dbus-1/system-services/*
156 %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/*
157 %attr(644,root,root) %{_libdir}/systemd/system/net-config.service
158 %attr(644,root,root) %{_libdir}/systemd/system/multi-user.target.wants/net-config.service
159 %if "%{?_lib}" == "lib64"
160 %attr(644,root,root) %{_unitdir}/net-config.service
161 %attr(644,root,root) %{_unitdir}/multi-user.target.wants/net-config.service
163 %{_datadir}/license/net-config
164 %attr(660,root,root) %{TZ_SYS_DB}/.wifi_offload.db
165 %attr(664,root,root) %{TZ_SYS_DB}/.wifi_offload.db-journal
166 %attr(500,root,root) %{TZ_SYS_ETC}/dump.d/module.d/network_log_dump.sh
167 %attr(500,root,root) %{TZ_SYS_VAR}/lib/net-config/network_log_dump.sh
168 %attr(500,root,root) %{TZ_SYS_VAR}/lib/net-config/network_dump.sh
169 %if "%{profile}" == "tv"
170 %attr(644,root,root) %{_libdir}/udev/rules.d/99-wifiusb-dev.rules
172 %if 0%{?model_build_feature_wlan_wearable} == 1
173 %attr(700,root,root) /usr/system/RestoreDir/softreset/network_softreset.sh