]>
Commit | Line | Data |
---|---|---|
3b11dff3 JR |
1 | %define ver 2.0.10 |
2 | %define vermin 4 | |
642984f6 | 3 | Summary: Ethernet Bridge Tables |
c15a9ec1 | 4 | Summary(pl.UTF-8): Ethernet Bridge Tables - filtrowanie i translacja adresów dla Ethernetu |
642984f6 | 5 | Name: ebtables |
3b11dff3 | 6 | Version: %{ver}.%{vermin} |
d02f79f9 | 7 | Release: 2 |
642984f6 | 8 | License: GPL |
9 | Group: Networking/Daemons | |
3b11dff3 | 10 | Source0: http://downloads.sourceforge.net/ebtables/%{name}-v%{ver}-%{vermin}.tar.gz |
b702bff0 | 11 | # Source0-md5: 506742a3d44b9925955425a659c1a8d0 |
3b11dff3 JR |
12 | Source1: %{name}.init |
13 | Source2: %{name}-config | |
14 | Patch0: ebtables-audit.patch | |
15 | Patch1: ebtables-linkfix.patch | |
16 | Patch2: ebtables-norootinst.patch | |
b7afe0f5 | 17 | URL: http://ebtables.sourceforge.net/ |
7dfef2e8 ER |
18 | BuildRequires: rpmbuild(macros) >= 1.268 |
19 | Requires(post,preun): /sbin/chkconfig | |
20 | Requires: rc-scripts | |
642984f6 | 21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %description | |
24 | The ebtables project is the Linux 2.5.x (and above) Link Layer | |
25 | firewalling subsystem, a patch for 2.4.x is maintained too. It | |
26 | delivers for Linux the functionality of Ethernet frame filtering, all | |
27 | kinds of frame NAT (Network Address Translation) and frame matching. | |
28 | The ebtables infrastructure is a part of the standard Linux 2.5.x (and | |
29 | above) kernels. | |
30 | ||
ecac19ab JR |
31 | %description -l pl.UTF-8 |
32 | Projekt ebtables to podsystem firewallingu na poziomie łącza dla | |
33 | Linuksa w wersjach 2.5.x i nowszych (dostępna jest też łata do 2.4.x). | |
34 | Dostarcza dla Linuksa funkcjonalność filtrowania ramek ethernetowych, | |
35 | wszystkie rodzaje translacji adresów (NAT) dla ramek oraz | |
36 | dopasowywanie ramek. Infrastruktura ebtables jest częścią | |
37 | standardowych jąder Linuksa w wersjach 2.5.x i nowszych. | |
b7afe0f5 | 38 | |
642984f6 | 39 | %prep |
3b11dff3 JR |
40 | %setup -q -n %{name}-v%{ver}-%{vermin} |
41 | %patch0 -p1 | |
42 | %patch1 -p1 | |
43 | %patch2 -p1 | |
642984f6 | 44 | |
45 | %build | |
7dfef2e8 | 46 | %{__make} \ |
3b11dff3 | 47 | CC="%{__cc}" \ |
f46b9647 | 48 | CFLAGS="%{rpmcflags}" \ |
3b11dff3 JR |
49 | LIBDIR="%{_libdir}/ebtables" \ |
50 | BINDIR="%{_sbindir}" \ | |
51 | MANDIR="%{_mandir}" | |
642984f6 | 52 | |
53 | %install | |
54 | rm -rf $RPM_BUILD_ROOT | |
91ae9d30 | 55 | |
3b11dff3 JR |
56 | install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d,%{_sysconfdir}} \ |
57 | $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/ebtables,%{_mandir}/man8} | |
91ae9d30 | 58 | |
f46b9647 | 59 | install ebtables{,-restore} $RPM_BUILD_ROOT%{_sbindir} |
91ae9d30 | 60 | install ethertypes $RPM_BUILD_ROOT%{_sysconfdir} |
61 | install ebtables.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
3b11dff3 JR |
62 | install extensions/*.so *.so $RPM_BUILD_ROOT%{_libdir}/ebtables |
63 | install ebtables-save $RPM_BUILD_ROOT%{_sbindir} | |
64 | %{__sed} -i -e "s|__EXEC_PATH__|%{_sbindir}|g" $RPM_BUILD_ROOT%{_sbindir}/ebtables-save | |
91ae9d30 | 65 | |
3b11dff3 JR |
66 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ebtables |
67 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ebtables-config | |
642984f6 | 68 | |
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
91ae9d30 | 72 | %post |
73 | /sbin/chkconfig --add ebtables | |
74 | ||
75 | %preun | |
76 | if [ $1 -eq 0 ]; then | |
7dfef2e8 | 77 | %service ebtables stop |
91ae9d30 | 78 | /sbin/chkconfig --del ebtables |
79 | fi | |
80 | ||
642984f6 | 81 | %files |
82 | %defattr(644,root,root,755) | |
ee927896 JB |
83 | %doc ChangeLog INSTALL THANKS |
84 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ethertypes | |
85 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ebtables-config | |
b8bbfb8b | 86 | %attr(754,root,root) /etc/rc.d/init.d/ebtables |
f46b9647 | 87 | %attr(755,root,root) %{_sbindir}/ebtables* |
d02f79f9 | 88 | %dir %{_libdir}/ebtables |
3b11dff3 | 89 | %attr(755,root,root) %{_libdir}/ebtables/libebt*.so |
ee927896 | 90 | %{_mandir}/man8/ebtables.8* |