1 DESCRIPTION = "TIZEN Network Configuration Module"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "System/Network"
10 inherit autotools-brokensep
15 #PROVIDES by net-config
19 #RDEPENDS of net-config (${PN})
20 RDEPENDS_${PN} += "systemd"
21 RDEPENDS_${PN} += "vconf"
25 #DEPENDS of net-config
26 DEPENDS += "libwifi-direct"
35 DEPENDS += "dbus-glib"
39 chmod -Rf a+rX,u+w,g-w,o-w ${S}
41 cp ${S}/packaging/net-config.manifest .
47 bb.build.exec_func('do_prep', d)
58 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
62 -DCMAKE_VERBOSE_MAKEFILE=ON \
63 -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
64 -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
65 -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
66 -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
67 -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
68 -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
69 -DCMAKE_SKIP_RPATH:BOOL=ON \
70 -DBUILD_SHARED_LIBS:BOOL=ON \
71 -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
72 ${EXTRA_OECMAKE} . -DCMAKE_INSTALL_PREFIX=${prefix}
82 export RPM_BUILD_ROOT=${D}
94 BINDIR=${prefix}/bin \
96 rm -f ${D}${infodir}/dir
97 find ${D} -regex ".*\.la$" | xargs rm -f --
98 find ${D} -regex ".*\.a$" | xargs rm -f --
100 mkdir -p ${D}${prefix}/share/dbus-1/system-services
101 cp resources/usr/share/dbus-1/services/net.netconfig.service ${D}${prefix}/share/dbus-1/system-services/net.netconfig.service
102 mkdir -p ${D}${sysconfdir}/dbus-1/system.d
103 cp resources/etc/dbus-1/system.d/net-config.conf ${D}${sysconfdir}/dbus-1/system.d/net-config.conf
105 # Systemd service file
106 mkdir -p ${D}${systemd_unitdir}/system
107 cp resources/usr/lib/systemd/system/net-config.service ${D}${systemd_unitdir}/system/net-config.service
108 mkdir -p ${D}${systemd_unitdir}/system/multi-user.target.wants/
109 ln -s ../net-config.service ${D}${systemd_unitdir}/system/multi-user.target.wants/net-config.service
112 mkdir -p ${D}${prefix}/share/license
113 cp LICENSE.APLv2 ${D}${prefix}/share/license/net-config
118 pkg_postinst_${PN}() {
121 vconftool set -t int memory/dnet/state 0 -i
122 vconftool set -t int memory/wifi/state 0 -i
123 vconftool set -t int memory/wifi/transfer_state 0 -i
124 vconftool set -t int memory/wifi/strength 0 -i
125 vconftool set -t int memory/wifi/bgscan_mode 0 -i
126 vconftool set -t int memory/dnet/wifi 0 -i
127 vconftool set -t int memory/dnet/network_config 0 -i
128 vconftool set -t int memory/dnet/status 0 -i
129 vconftool set -t string memory/dnet/ip "" -i
130 vconftool set -t string memory/dnet/proxy "" -i
131 vconftool set -t string memory/wifi/connected_ap_name "" -i
132 vconftool set -t string db/wifi/bssid_address ""
133 #Default Call Statistics
134 vconftool set -t int db/dnet/statistics/cellular/totalsnt "0"
135 vconftool set -t int db/dnet/statistics/cellular/totalrcv "0"
136 vconftool set -t int db/dnet/statistics/cellular/lastsnt "0"
137 vconftool set -t int db/dnet/statistics/cellular/lastrcv "0"
138 vconftool set -t int db/dnet/statistics/wifi/totalsnt "0"
139 vconftool set -t int db/dnet/statistics/wifi/totalrcv "0"
140 vconftool set -t int db/dnet/statistics/wifi/lastsnt "0"
141 vconftool set -t int db/dnet/statistics/wifi/lastrcv "0"
142 vconftool set -t int file/private/wifi/last_power_state "0"
143 systemctl daemon-reload
144 if [ "$1" == "1" ]; then
145 systemctl restart net-config.service
153 if [ "$1" == "0" ]; then
154 systemctl stop net-config.service
162 systemctl daemon-reload
163 if [ "$1" == "1" ]; then
164 systemctl restart net-config.service
169 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
170 PACKAGES += " net-config "
172 net-config_files = ""
173 net-config_files += "${prefix}/sbin/*"
174 net-config_files += "${prefix}/share/dbus-1/system-services/*"
175 net-config_files += "${sysconfdir}/dbus-1/system.d/*"
176 net-config_files += "${systemd_unitdir}/system/net-config.service"
177 net-config_files += "${systemd_unitdir}/system/multi-user.target.wants/net-config.service"
178 net-config_files += "${prefix}/share/license/net-config"
179 MANIFESTFILES_${PN} = "net-config.manifest"
181 FILES_${PN} = "${net-config_files}"
183 PKG_net-config= "net-config"
185 require net-config-extraconf.inc