Corrected comments in helper-ip6tables.h
[platform/core/connectivity/stc-iptables.git] / packaging / stc-iptables.spec
1 Name:       stc-iptables
2 Summary:    STC(Smart Traffic Control) iptables
3 Version:    0.0.5
4 Release:    0
5 Group:      Network & Connectivity/Other
6 License:    GPL-2.0+
7 Source0:    %{name}-%{version}.tar.gz
8
9 BuildRequires:  cmake
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)
15
16 %description
17 A smart traffic control iptables to manage iptables rules using libiptc
18
19 %package test
20 Summary:   STC iptables test binaries
21
22 %description test
23 Test Application for STC Iptables
24
25 %prep
26 %setup -q
27 chmod 644 %{SOURCE0}
28
29 %build
30
31 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE -D_GNU_SOURCE"
32 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE -D_GNU_SOURCE"
33 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
34
35 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
36         -DBIN_DIR=%{_bindir} \
37         -DLIB_PATH=%{_lib} \
38
39 make %{?_smp_mflags}
40
41 %install
42 rm -rf %{buildroot}
43
44 %make_install
45
46 #Systemd iptables service file
47 mkdir -p %{buildroot}%{_libdir}/systemd/system/
48 cp resources/systemd/stc-iptables.service %{buildroot}%{_libdir}/systemd/system/stc-iptables.service
49
50 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
51 ln -s ../stc-iptables.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/stc-iptables.service
52
53 #DBus DAC (stc-iptables.manifest enables DBus SMACK)
54 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
55 cp resources/dbus/stc-iptables.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/stc-iptables.conf
56
57 %post
58 #Logs
59 mkdir -p /opt/usr/data/network
60 chmod 755 /opt/usr/data/network
61 chown network_fw:network_fw /opt/usr/data/network
62
63 %files
64 %manifest %{name}.manifest
65 %license LICENSE
66 %license COPYING
67 %defattr(-,root,root,-)
68 %attr(500,root,root) %{_bindir}/stc-iptables
69
70 %attr(644,root,root) %{_libdir}/systemd/system/stc-iptables.service
71 %attr(644,root,root) %{_libdir}/systemd/system/multi-user.target.wants/stc-iptables.service
72
73 #DBus DAC
74 %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/stc-iptables.conf
75
76 #Test
77 %{_bindir}/stc_ipt_test
78 %attr(755,root,root) %{_bindir}/stc_ipt_test