]>
Commit | Line | Data |
---|---|---|
91ae9d30 | 1 | # |
2 | # TODO: | |
3 | # - initscripts stuff - move save/restore dumps to /etc/sysconfig & more | |
4 | # - review llh patch | |
5 | # | |
7dfef2e8 ER |
6 | %define _rel 1 |
7 | %define _pre rc3 | |
642984f6 | 8 | Summary: Ethernet Bridge Tables |
ecac19ab | 9 | Summary(pl.UTF-8): Ethernet Bridge Tables - filtrowanie i translacja adresów dla Ethernetu |
642984f6 | 10 | Name: ebtables |
91ae9d30 | 11 | Version: 2.0.8 |
7dfef2e8 | 12 | Release: 0.%{_pre}.%{_rel} |
642984f6 | 13 | License: GPL |
14 | Group: Networking/Daemons | |
7dfef2e8 | 15 | Source0: http://dl.sourceforge.net/ebtables/%{name}-v%{version}-%{_pre}.tar.gz |
d4913872 | 16 | # Source0-md5: 92f0dd5107b92a744e104f50f9b2dd2d |
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 |
9f11835a | 40 | %setup -q -n %{name}-v%{version}-%{_pre} |
642984f6 | 41 | |
42 | %build | |
7dfef2e8 ER |
43 | %{__make} \ |
44 | CC="%{__cc}" | |
642984f6 | 45 | |
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
91ae9d30 | 48 | |
49 | install -d $RPM_BUILD_ROOT%{_sbindir} | |
50 | install -d $RPM_BUILD_ROOT%{_sysconfdir} | |
ee927896 | 51 | install -d $RPM_BUILD_ROOT/etc/sysconfig |
91ae9d30 | 52 | install -d $RPM_BUILD_ROOT%{_mandir}/man8 |
53 | install -d $RPM_BUILD_ROOT%{_libdir}/ebtables | |
ee927896 | 54 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
91ae9d30 | 55 | |
56 | install ebtables $RPM_BUILD_ROOT%{_sbindir} | |
57 | install ebtables-restore $RPM_BUILD_ROOT%{_sbindir} | |
58 | install ethertypes $RPM_BUILD_ROOT%{_sysconfdir} | |
59 | install ebtables.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
60 | install extensions/*.so $RPM_BUILD_ROOT%{_libdir}/ebtables | |
61 | install *.so $RPM_BUILD_ROOT%{_libdir}/ebtables | |
62 | ||
63 | export __iets=`printf %{_sbindir} | sed 's/\\//\\\\\\//g'` | |
64 | export __iets2=`printf %{_mysysconfdir} | sed 's/\\//\\\\\\//g'` | |
65 | sed -i "s/__EXEC_PATH__/$__iets/g" ebtables-save | |
66 | install ebtables-save $RPM_BUILD_ROOT%{_sbindir} | |
67 | sed -i "s/__EXEC_PATH__/$__iets/g" ebtables.sysv; sed -i "s/__SYSCONFIG__/$__iets2/g" ebtables.sysv | |
ee927896 | 68 | install ebtables.sysv $RPM_BUILD_ROOT/etc/rc.d/init.d/ebtables |
91ae9d30 | 69 | sed -i "s/__SYSCONFIG__/$__iets2/g" ebtables-config |
ee927896 | 70 | install ebtables-config $RPM_BUILD_ROOT/etc/sysconfig |
642984f6 | 71 | |
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
91ae9d30 | 75 | %post |
76 | /sbin/chkconfig --add ebtables | |
77 | ||
78 | %preun | |
79 | if [ $1 -eq 0 ]; then | |
7dfef2e8 | 80 | %service ebtables stop |
91ae9d30 | 81 | /sbin/chkconfig --del ebtables |
82 | fi | |
83 | ||
642984f6 | 84 | %files |
85 | %defattr(644,root,root,755) | |
ee927896 JB |
86 | %doc ChangeLog INSTALL THANKS |
87 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ethertypes | |
88 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ebtables-config | |
b8bbfb8b | 89 | %attr(754,root,root) /etc/rc.d/init.d/ebtables |
642984f6 | 90 | %attr(755,root,root) %{_sbindir}/* |
ee927896 JB |
91 | %dir %{_libdir}/ebtables |
92 | %attr(755,root,root) %{_libdir}/ebtables/*.so | |
93 | %{_mandir}/man8/ebtables.8* |