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 meshd do dhcp instead of connman
25 Requires: toybox-symlinks-dhcp
28 Manager for handling Wi-Fi mesh network
36 %if %{CHECK_WMESH_PRIVILEGE} == "True"
37 cp -a %{SOURCE1} ./wmeshd.conf
43 CFLAGS=$(echo $CFLAGS | sed 's/-O2/-O0/' | sed 's/-O1/-O0/' | sed 's/-Wp,-D_FORTIFY_SOURCE=2//')
44 CXXFLAGS=$(echo $CXXFLAGS | sed 's/-O2/-O0/' | sed 's/-O1/-O0/' | sed 's/-Wp,-D_FORTIFY_SOURCE=2//')
46 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
47 -DTIZEN_FEATURE_MESH_ON_DEMAND=1 \
48 -DLIB_DIR=%{_libdir} \
49 -DBIN_DIR=%{_bindir} \
50 -DSBIN_DIR=%{_sbindir}
59 %if %{CHECK_WMESH_PRIVILEGE} == "True"
60 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
61 cp wmeshd.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/wmeshd.conf
63 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
64 cp net.wmesh.service %{buildroot}%{_datadir}/dbus-1/system-services/net.wmesh.service
65 mkdir -p %{buildroot}%{_unitdir}
66 cp wmeshd.service %{buildroot}%{_unitdir}/wmeshd.service
69 chmod 755 %{_sbindir}/wmesh.sh
72 %manifest wmeshd.manifest
74 %defattr(-,root,root,-)
75 %caps(cap_net_raw,cap_net_admin=ei) %attr(750,network_fw,network_fw) %{_bindir}/wmeshd
76 %if %{CHECK_WMESH_PRIVILEGE} == "True"
77 %config %{_sysconfdir}/dbus-1/system.d/wmeshd.conf
79 %attr(644,root,root) %{_datadir}/dbus-1/system-services/*
80 %attr(644,root,root) %{_unitdir}/wmeshd.service
81 %attr(750,root,root) %{_sbindir}/wmesh.sh