1 %define CHECK_MESH_PRIVILEGE False
4 Summary: mesh network daemon
7 Group: Network & Connectivity/Wireless
9 Source0: %{name}-%{version}.tar.gz
10 Source1: dbus-meshd.conf
11 Source2: net.mesh.service
12 Source3: meshd.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)
22 # if meshd do dhcp instead of connman
24 Requires: toybox-symlinks-dhcp
27 Manager for handling mesh network
35 %if %{CHECK_MESH_PRIVILEGE} == "True"
36 cp -a %{SOURCE1} ./meshd.conf
42 CFLAGS=$(echo $CFLAGS | sed 's/-O2/-O0/' | sed 's/-O1/-O0/' | sed 's/-Wp,-D_FORTIFY_SOURCE=2//')
43 CXXFLAGS=$(echo $CXXFLAGS | sed 's/-O2/-O0/' | sed 's/-O1/-O0/' | sed 's/-Wp,-D_FORTIFY_SOURCE=2//')
45 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
46 -DTIZEN_FEATURE_MESH_ON_DEMAND=1 \
47 -DLIB_DIR=%{_libdir} \
48 -DBIN_DIR=%{_bindir} \
49 -DSBIN_DIR=%{_sbindir}
58 %if %{CHECK_MESH_PRIVILEGE} == "True"
59 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
60 cp meshd.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/meshd.conf
62 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
63 cp net.mesh.service %{buildroot}%{_datadir}/dbus-1/system-services/net.mesh.service
64 mkdir -p %{buildroot}%{_unitdir}
65 cp meshd.service %{buildroot}%{_unitdir}/meshd.service
68 chmod 755 %{_sbindir}/mesh.sh
71 %manifest meshd.manifest
73 %defattr(-,root,root,-)
74 %caps(cap_net_raw,cap_net_admin=eip) %attr(750,system,system) %{_bindir}/meshd
75 %if %{CHECK_MESH_PRIVILEGE} == "True"
76 %config %{_sysconfdir}/dbus-1/system.d/meshd.conf
78 %attr(644,root,root) %{_datadir}/dbus-1/system-services/*
79 %attr(644,root,root) %{_unitdir}/meshd.service
80 %attr(750,root,root) %{_sbindir}/mesh.sh