+%define CHECK_MESH_PRIVILEGE False
+
Name: meshd
Summary: mesh network daemon
Version: 0.0.1
chmod 644 %{SOURCE1}
chmod 644 %{SOURCE2}
chmod 644 %{SOURCE3}
+%if %{CHECK_MESH_PRIVILEGE} == "True"
cp -a %{SOURCE1} ./meshd.conf
+%endif
cp -a %{SOURCE2} .
cp -a %{SOURCE3} .
%make_install
+%if %{CHECK_MESH_PRIVILEGE} == "True"
mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
cp meshd.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/meshd.conf
+%endif
mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
cp net.mesh.service %{buildroot}%{_datadir}/dbus-1/system-services/net.mesh.service
mkdir -p %{buildroot}%{_unitdir}
%license LICENSE
%defattr(-,root,root,-)
%caps(cap_net_raw,cap_net_admin=eip) %attr(750,system,system) %{_bindir}/meshd
+%if %{CHECK_MESH_PRIVILEGE} == "True"
%config %{_sysconfdir}/dbus-1/system.d/meshd.conf
+%endif
%attr(644,root,root) %{_datadir}/dbus-1/system-services/*
%attr(644,root,root) %{_unitdir}/meshd.service
%attr(750,root,root) %{_sbindir}/mesh.sh