2 Summary: STC(Smart Traffic Control) iptables
5 Group: Network & Connectivity/Other
7 Source0: %{name}-%{version}.tar.gz
10 BuildRequires: pkgconfig(glib-2.0)
11 BuildRequires: pkgconfig(gio-2.0)
12 BuildRequires: pkgconfig(gio-unix-2.0)
13 BuildRequires: pkgconfig(libiptc)
14 BuildRequires: pkgconfig(libip6tc)
17 BuildRequires: pkgconfig(dlog)
18 BuildRequires: pkgconfig(gmock)
22 A smart traffic control iptables to manage iptables rules using libiptc
25 Summary: STC iptables test binaries
28 Test Application for STC Iptables
36 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE -D_GNU_SOURCE"
37 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE -D_GNU_SOURCE"
38 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
40 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
41 -DBIN_DIR=%{_bindir} \
43 -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
44 -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
53 #Systemd iptables service file
54 mkdir -p %{buildroot}%{_libdir}/systemd/system/
55 cp resources/systemd/stc-iptables.service %{buildroot}%{_libdir}/systemd/system/stc-iptables.service
57 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
58 ln -s ../stc-iptables.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/stc-iptables.service
60 #DBus DAC (stc-iptables.manifest enables DBus SMACK)
61 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
62 cp resources/dbus/stc-iptables.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/stc-iptables.conf
66 mkdir -p /opt/usr/data/network
67 chmod 755 /opt/usr/data/network
68 chown network_fw:network_fw /opt/usr/data/network
71 %manifest %{name}.manifest
74 %defattr(-,root,root,-)
75 %attr(500,root,root) %{_bindir}/stc-iptables
77 %attr(644,root,root) %{_libdir}/systemd/system/stc-iptables.service
78 %attr(644,root,root) %{_libdir}/systemd/system/multi-user.target.wants/stc-iptables.service
81 %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/stc-iptables.conf
84 %{_bindir}/stc_ipt_test
85 %attr(755,root,root) %{_bindir}/stc_ipt_test