ebtables/ebtables.spec

94 lines
2.6 KiB
RPMSpec

Name: ebtables
Version: 2.0.6
Release: 5%{?dist}
Summary: Ethernet Bridge frame table administration tool
License: GPL
Group: System Environment/Base
URL: http://ebtables.sourceforge.net/
Source0: http://dl.sf.net/ebtables/ebtables-v%{version}.tar.gz
Source1: ebtables.sysv
Patch0: ebtables-2.0.6-gcc34.patch
Patch1: ebtables-2.0.6-gcc4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
PreReq: /sbin/chkconfig
PreReq: /sbin/service
%description
Ethernet bridge tables is a firewalling tool to transparently filter network
traffic passing a bridge. The filtering possibilities are limited to link
layer filtering and some basic filtering on higher network layers.
This tool is the userspace control for the bridge and ebtables kernel
components (built by default in Fedora Core kernels).
The ebtables tool can be used together with the other Linux filtering tools,
like iptables. There are no known incompatibility issues.
%prep
%setup -n ebtables-v%{version}
%patch0 -p1
%patch1 -p1
%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
%install
rm -rf $RPM_BUILD_ROOT
install -D -m0755 ebtables $RPM_BUILD_ROOT/sbin/ebtables
install -D -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/ebtables
install -D -m0644 ethertypes $RPM_BUILD_ROOT%{_sysconfdir}/ethertypes
install -D -m0644 ebtables.8 $RPM_BUILD_ROOT%{_mandir}/man8/ebtables.8
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add ebtables
%preun
if [ $1 -eq 0 ]; then
/sbin/service ebtables stop &>/dev/null || :
/sbin/chkconfig --del ebtables
fi
%postun
if [ $1 -ge 1 ]
/sbin/service ebtables condrestart &> /dev/null || :
fi
%files
%defattr(-, root, root, 0755)
%doc ChangeLog COPYING THANKS
%doc %{_mandir}/man8/ebtables.8*
%config(noreplace) %{_sysconfdir}/ethertypes
%{_initrddir}/ebtables
/sbin/ebtables
%ghost %{_sysconfdir}/ebtables.filter
%ghost %{_sysconfdir}/ebtables.nat
%ghost %{_sysconfdir}/ebtables.broute
%changelog
* Fri Jul 1 2005 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.6-5
- fix sysv file
* Fri Jul 1 2005 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.6-4
- remove INSTALL file
- add some text to description, correct typos
- fix %postun
- add PreReqs
- add %ghost config files
* Tue May 31 2005 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.6-3
- reworked for Fedora Extras
- add gcc4 fix
- move init file into SOURCE1
* Thu Dec 02 2004 Dag Wieers <dag@wieers.com> - 2.0.6-2
- Added patch for gcc 3.4. (Nigel Smith)
* Tue Apr 27 2004 Dag Wieers <dag@wieers.com> - 2.0.6-2
- Cosmetic changes.
* Tue Apr 27 2004 Dag Wieers <dag@wieers.com> - 2.0.6-1
- Initial package. (using DAR)