]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without systemd # systemd integration | |
4 | # | |
5 | Summary: The userspace connection tracking table administration program | |
6 | Summary(pl.UTF-8): Program przestrzeni użytkownika do zarządzania tablicą śledzenia połączeń | |
7 | Name: conntrack-tools | |
8 | Version: 1.4.8 | |
9 | Release: 1 | |
10 | License: GPL v2 | |
11 | Group: Applications/Networking | |
12 | Source0: https://netfilter.org/projects/conntrack-tools/files/%{name}-%{version}.tar.xz | |
13 | # Source0-md5: 47662cc3622fa91b5205054a393163a5 | |
14 | Source1: %{name}.init | |
15 | Source2: %{name}.sysconfig | |
16 | Source3: %{name}.conf | |
17 | Source4: conntrackd.service | |
18 | URL: http://conntrack-tools.netfilter.org/ | |
19 | BuildRequires: autoconf >= 2.50 | |
20 | BuildRequires: automake >= 1.6 | |
21 | BuildRequires: bison | |
22 | BuildRequires: flex >= 2.5.33 | |
23 | BuildRequires: libmnl-devel >= 1.0.3 | |
24 | BuildRequires: libnetfilter_conntrack-devel >= 1.0.9 | |
25 | BuildRequires: libnetfilter_cthelper-devel >= 1.0.0 | |
26 | BuildRequires: libnetfilter_cttimeout-devel >= 1.0.0 | |
27 | BuildRequires: libnetfilter_queue-devel >= 1.0.2 | |
28 | BuildRequires: libnfnetlink-devel >= 1.0.1 | |
29 | BuildRequires: libtirpc-devel | |
30 | BuildRequires: libtool >= 2:2 | |
31 | BuildRequires: pkgconfig | |
32 | BuildRequires: rpmbuild(macros) >= 1.644 | |
33 | %{?with_systemd:BuildRequires: systemd-devel >= 1:227} | |
34 | BuildRequires: tar >= 1:1.22 | |
35 | BuildRequires: xz | |
36 | Requires(post,preun): /sbin/chkconfig | |
37 | Requires: libmnl >= 1.0.3 | |
38 | Requires: libnetfilter_conntrack >= 1.0.9 | |
39 | Requires: libnetfilter_cthelper >= 1.0.0 | |
40 | Requires: libnetfilter_cttimeout >= 1.0.0 | |
41 | Requires: libnetfilter_queue >= 1.0.2 | |
42 | Requires: libnfnetlink >= 1.0.1 | |
43 | %{?with_systemd:Requires: systemd-libs >= 1:227} | |
44 | Obsoletes: conntrack < 1.00-1 | |
45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
46 | ||
47 | %description | |
48 | The conntrack-tools are a set of tools targeted at system | |
49 | administrators. They are conntrack, the userspace command line | |
50 | interface, and conntrackd, the userspace daemon. The tool conntrack | |
51 | provides a full featured interface that is intended to replace the old | |
52 | /proc/net/ip_conntrack interface. Using conntrack, you can view and | |
53 | manage the in-kernel connection tracking state table from userspace. | |
54 | On the other hand, conntrackd covers the specific aspects of stateful | |
55 | firewalls to enable highly available scenarios, and can be used as | |
56 | statistics collector as well. | |
57 | ||
58 | %description -l pl.UTF-8 | |
59 | conntrack-tools to zbiór narzędzi przeznaczonych dla administratorów | |
60 | systemów. Są to conntrack (interfejs przestrzeni użytkownika | |
61 | obsługiwany z linii poleceń) i conntrackd (demon przestrzeni | |
62 | użytkownika). Narzędzie conntrack udostępnia pełny interfejs mający za | |
63 | zadanie zastąpić stary interfejs /proc/net/ip_conntrack. Przy użyciu | |
64 | conntracka można oglądać i zarządzać z przestrzeni użytkownika tablicą | |
65 | stanów śledzienia połączeń w jądrze. Z drugiej strony conntrackd | |
66 | pokrywa specyficzne aspekty firewalli stanowych udostępniając | |
67 | scenariusze wysokiej dostępności; może także służyć do zbierania | |
68 | statystyk. | |
69 | ||
70 | %prep | |
71 | %setup -q | |
72 | ||
73 | %build | |
74 | %{__libtoolize} | |
75 | %{__aclocal} | |
76 | %{__autoconf} | |
77 | %{__automake} | |
78 | %configure \ | |
79 | --disable-silent-rules \ | |
80 | %{?with_systemd:--enable-systemd} | |
81 | %{__make} | |
82 | ||
83 | %install | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
86 | %{__make} install \ | |
87 | DESTDIR=$RPM_BUILD_ROOT | |
88 | ||
89 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/conntrackd | |
90 | install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/conntrackd | |
91 | install -D %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/conntrackd/conntrackd.conf | |
92 | %if %{with systemd} | |
93 | install -D %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/conntrackd.service | |
94 | %endif | |
95 | ||
96 | # dlopened modules | |
97 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/conntrack-tools/*.la | |
98 | ||
99 | %clean | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %post | |
103 | /sbin/chkconfig --add conntrackd | |
104 | %service conntrackd restart | |
105 | %{?with_systemd:%systemd_post conntrackd.service} | |
106 | ||
107 | %preun | |
108 | if [ "$1" = "0" ]; then | |
109 | %service -q conntrackd stop | |
110 | /sbin/chkconfig --del conntrackd | |
111 | fi | |
112 | %{?with_systemd:%systemd_preun conntrackd.service} | |
113 | ||
114 | %postun | |
115 | %{?with_systemd:%systemd_reload} | |
116 | ||
117 | %triggerpostun -- conntrack-tools < 1.4.6-2 | |
118 | %{?with_systemd:%systemd_trigger conntrackd.service} | |
119 | ||
120 | %files | |
121 | %defattr(644,root,root,755) | |
122 | %doc AUTHORS TODO doc/helper doc/stats doc/sync | |
123 | %attr(755,root,root) %{_sbindir}/conntrack | |
124 | %attr(755,root,root) %{_sbindir}/conntrackd | |
125 | %attr(755,root,root) %{_sbindir}/nfct | |
126 | %dir %{_libdir}/conntrack-tools | |
127 | %attr(755,root,root) %{_libdir}/conntrack-tools/ct_helper_amanda.so | |
128 | %attr(755,root,root) %{_libdir}/conntrack-tools/ct_helper_dhcpv6.so | |
129 | %attr(755,root,root) %{_libdir}/conntrack-tools/ct_helper_ftp.so | |
130 | %attr(755,root,root) %{_libdir}/conntrack-tools/ct_helper_mdns.so | |
131 | %attr(755,root,root) %{_libdir}/conntrack-tools/ct_helper_rpc.so | |
132 | %attr(755,root,root) %{_libdir}/conntrack-tools/ct_helper_sane.so | |
133 | %attr(755,root,root) %{_libdir}/conntrack-tools/ct_helper_slp.so | |
134 | %attr(755,root,root) %{_libdir}/conntrack-tools/ct_helper_ssdp.so | |
135 | %attr(755,root,root) %{_libdir}/conntrack-tools/ct_helper_tftp.so | |
136 | %attr(755,root,root) %{_libdir}/conntrack-tools/ct_helper_tns.so | |
137 | %dir %{_sysconfdir}/conntrackd | |
138 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conntrackd/conntrackd.conf | |
139 | %attr(754,root,root) /etc/rc.d/init.d/conntrackd | |
140 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/conntrackd | |
141 | %{_mandir}/man5/conntrackd.conf.5* | |
142 | %{_mandir}/man8/conntrack.8* | |
143 | %{_mandir}/man8/conntrackd.8* | |
144 | %{_mandir}/man8/nfct.8* | |
145 | %{?with_systemd:%{systemdunitdir}/conntrackd.service} |