1 %define CHECK_WMESH_PRIVILEGE False
3 Name: wifi-mesh-manager
4 Summary: Wi-Fi mesh network daemon
7 Group: Network & Connectivity/Wireless
9 Source0: %{name}-%{version}.tar.gz
10 Source1: dbus-wmeshd.conf
11 Source2: net.wmesh.service
12 Source3: wmeshd.service
13 BuildRequires: pkgconfig(glib-2.0)
14 BuildRequires: pkgconfig(gio-2.0)
15 BuildRequires: pkgconfig(gio-unix-2.0)
16 BuildRequires: pkgconfig(dlog)
17 BuildRequires: pkgconfig(libnl-3.0)
18 BuildRequires: pkgconfig(dbus-1)
19 BuildRequires: pkgconfig(libcrypto)
20 BuildRequires: pkgconfig(libtzplatform-config)
21 BuildRequires: pkgconfig(capi-network-wifi-manager)
23 # if wmeshd do dhcp instead of connman
25 Requires: toybox-symlinks-dhcp
26 # if image creater dose not know network_fw
27 Requires: security-config
30 Manager for handling Wi-Fi mesh network
38 %if %{CHECK_WMESH_PRIVILEGE} == "True"
39 cp -a %{SOURCE1} ./wmeshd.conf
45 CFLAGS=$(echo $CFLAGS | sed 's/-O2/-O0/' | sed 's/-O1/-O0/' | sed 's/-Wp,-D_FORTIFY_SOURCE=2//')
46 CXXFLAGS=$(echo $CXXFLAGS | sed 's/-O2/-O0/' | sed 's/-O1/-O0/' | sed 's/-Wp,-D_FORTIFY_SOURCE=2//')
48 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
49 -DTIZEN_FEATURE_MESH_ON_DEMAND=1 \
50 -DLIB_DIR=%{_libdir} \
51 -DBIN_DIR=%{_bindir} \
52 -DSBIN_DIR=%{_sbindir}
61 %if %{CHECK_WMESH_PRIVILEGE} == "True"
62 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
63 cp wmeshd.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/wmeshd.conf
65 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
66 cp net.wmesh.service %{buildroot}%{_datadir}/dbus-1/system-services/net.wmesh.service
67 mkdir -p %{buildroot}%{_unitdir}
68 cp wmeshd.service %{buildroot}%{_unitdir}/wmeshd.service
71 chmod 755 %{_sbindir}/wmesh.sh
74 %manifest wmeshd.manifest
76 %defattr(-,root,root,-)
77 %attr(750,network_fw,network_fw) %{_bindir}/wmeshd
78 %if %{CHECK_WMESH_PRIVILEGE} == "True"
79 %config %{_sysconfdir}/dbus-1/system.d/wmeshd.conf
81 %attr(644,root,root) %{_datadir}/dbus-1/system-services/*
82 %attr(644,root,root) %{_unitdir}/wmeshd.service
83 %attr(750,root,root) %{_sbindir}/wmesh.sh