2 Summary: TIZEN Network Configuration Module
6 License: Apache License Version 2.0
7 Source0: %{name}-%{version}.tar.gz
8 Source1001: net-config.manifest
11 BuildRequires: pkgconfig(glib-2.0)
12 BuildRequires: pkgconfig(dbus-glib-1)
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(vconf)
15 BuildRequires: pkgconfig(wifi-direct)
16 BuildRequires: pkgconfig(tapi)
17 BuildRequires: pkgconfig(syspopup-caller)
18 Requires(post): /usr/bin/vconftool
20 Requires(post): systemd
21 Requires(preun): systemd
22 Requires(postun): systemd
25 TIZEN Network Configuration Module
33 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
41 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services
42 cp resources/usr/share/dbus-1/services/net.netconfig.service %{buildroot}%{_datadir}/dbus-1/system-services/net.netconfig.service
43 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
44 cp resources/etc/dbus-1/system.d/net-config.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/net-config.conf
45 mkdir -p %{buildroot}/opt/etc
46 cp resources/opt/etc/resolv.conf %{buildroot}/opt/etc/resolv.conf
47 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
48 cp resources/etc/rc.d/init.d/net-config %{buildroot}%{_sysconfdir}/rc.d/init.d/net-config
49 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d
50 ln -s ../init.d/net-config %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S60net-config
51 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d
52 ln -s ../init.d/net-config %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S60net-config
54 # Systemd service file
55 mkdir -p %{buildroot}%{_libdir}/systemd/system/
56 cp resources/usr/lib/systemd/system/net-config.service %{buildroot}%{_libdir}/systemd/system/net-config.service
57 mkdir -p %{buildroot}%{_libdir}/systemd/system/network.target.wants/
58 ln -s ../net-config.service %{buildroot}%{_libdir}/systemd/system/network.target.wants/net-config.service
61 mkdir -p %{buildroot}%{_datadir}/license
62 cp LICENSE.APLv2 %{buildroot}%{_datadir}/license/net-config
66 vconftool set -t int memory/dnet/state 0 -i
67 vconftool set -t int memory/wifi/state 0 -i
68 vconftool set -t int memory/wifi/strength 0 -i
69 vconftool set -t int memory/wifi/bgscan_mode 0 -i
71 vconftool set -t int memory/dnet/cellular 0 -i
72 vconftool set -t int memory/dnet/wifi 0 -i
73 vconftool set -t int memory/dnet/network_config 0 -i
74 vconftool set -t int memory/dnet/status 0 -i
75 vconftool set -t string memory/dnet/ip "" -i
76 vconftool set -t string memory/dnet/proxy "" -i
78 vconftool set -t string memory/wifi/connected_ap_name "" -i
80 vconftool set -t string db/wifi/bssid_address ""
82 #Default Call Statistics
83 vconftool set -t int db/dnet/statistics/cellular/totalsnt "0"
84 vconftool set -t int db/dnet/statistics/cellular/totalrcv "0"
85 vconftool set -t int db/dnet/statistics/cellular/lastsnt "0"
86 vconftool set -t int db/dnet/statistics/cellular/lastrcv "0"
87 vconftool set -t int db/dnet/statistics/wifi/totalsnt "0"
88 vconftool set -t int db/dnet/statistics/wifi/totalrcv "0"
89 vconftool set -t int db/dnet/statistics/wifi/lastsnt "0"
90 vconftool set -t int db/dnet/statistics/wifi/lastrcv "0"
92 vconftool set -t int file/private/wifi/last_power_state "0"
94 systemctl daemon-reload
95 if [ "$1" == "1" ]; then
96 systemctl restart net-config.service
100 if [ "$1" == "0" ]; then
101 systemctl stop net-config.service
105 systemctl daemon-reload
106 if [ "$1" == "1" ]; then
107 systemctl restart net-config.service
111 %manifest %{name}.manifest
113 %attr(644,root,root) /opt/etc/resolv.conf
114 %{_datadir}/dbus-1/system-services/*
115 %{_sysconfdir}/dbus-1/system.d/*
116 %{_sysconfdir}/rc.d/init.d/net-config
117 %{_sysconfdir}/rc.d/rc3.d/S60net-config
118 %{_sysconfdir}/rc.d/rc5.d/S60net-config
119 %{_libdir}/systemd/system/net-config.service
120 %{_libdir}/systemd/system/network.target.wants/net-config.service
121 %{_datadir}/license/net-config