Ludwig Nussel
457b329702
* don't use /var/lock/subsys * read /etc/sysconfig/ebtables for setting and restore state from /etc/ebtables where the script actually saved the state to. OBS-URL: https://build.opensuse.org/package/show/security:netfilter/ebtables?expand=0&rev=4
117 lines
3.3 KiB
RPMSpec
117 lines
3.3 KiB
RPMSpec
#
|
|
# spec file for package ebtables (Version v2.0.9)
|
|
#
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: ebtables
|
|
License: GPLv2+
|
|
Group: Productivity/Networking/Security
|
|
Version: v2.0.9
|
|
Release: 3
|
|
Summary: Ethernet Bridge Tables
|
|
Source: %{name}-%{version}-1.tar.bz2
|
|
Patch0: %{name}-v2.0.8-makefile.diff
|
|
Patch1: %{name}-v2.0.8-initscript.diff
|
|
Url: http://ebtables.sourceforge.net/
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
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. The ebtables tool
|
|
can be used together with the other Linux filtering tools, like
|
|
iptables. There are no incompatibility issues.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Bart De Schuymer <bdschuym@pandora.be>
|
|
Nick Fedchik <nick@fedchik.org.ua>
|
|
Grzegorz Borowiak <grzes@gnu.univ.gda.pl>
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}-1
|
|
%patch0
|
|
%patch1
|
|
|
|
%build
|
|
# The way ebtables is built requires ASNEEDED=0 forever [bnc#567267]
|
|
export SUSE_ASNEEDED=0
|
|
# delete all kernel headers, but keep ebt_ip6.h and ebt_nflog.h
|
|
mv include/linux/netfilter_bridge/ebt_ip6.{h,h.save}
|
|
mv include/linux/netfilter_bridge/ebt_nflog.{h,h.save}
|
|
rm -f include/linux/*.h
|
|
rm -f include/linux/netfilter_bridge/*.h
|
|
mv include/linux/netfilter_bridge/ebt_ip6.{h.save,h}
|
|
mv include/linux/netfilter_bridge/ebt_nflog.{h.save,h}
|
|
make \
|
|
CFLAGS="$RPM_OPT_FLAGS" \
|
|
CXXFLAGS="$RPM_OPT_FLAGS" \
|
|
LIBDIR=%{_libdir}/%{name} \
|
|
MANDIR=%{_mandir} \
|
|
BINDIR=%{_sbindir} \
|
|
ETCDIR=%{_sysconfdir} \
|
|
INITDIR=%{_sysconfdir}/init.d \
|
|
SYSCONFIGDIR=%{_sysconfdir}
|
|
|
|
%install
|
|
# The way ebtables is built requires ASNEEDED=0 forever [bnc#567267]
|
|
export SUSE_ASNEEDED=0
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_sbindir}
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/init.d
|
|
make \
|
|
DESTDIR=$RPM_BUILD_ROOT \
|
|
LIBDIR=%{_libdir}/%{name} \
|
|
MANDIR=%{_mandir} \
|
|
BINDIR=%{_sbindir} \
|
|
ETCDIR=%{_sysconfdir} \
|
|
INITDIR=%{_sysconfdir}/init.d \
|
|
SYSCONFIGDIR=%{_sysconfdir} \
|
|
install
|
|
ln -sf %{_sysconfdir}/init.d/ebtables $RPM_BUILD_ROOT%{_sbindir}/rcebtables
|
|
# not used
|
|
rm -f $RPM_BUILD_ROOT/etc/ebtables-config
|
|
|
|
%post
|
|
%fillup_and_insserv ebtables
|
|
|
|
%preun
|
|
%stop_on_removal ebtables
|
|
|
|
%postun
|
|
%restart_on_update ebtables
|
|
%insserv_cleanup
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc %{_mandir}/man8/ebtables.8*
|
|
%config(noreplace) %{_sysconfdir}/ethertypes
|
|
%{_sysconfdir}/init.d/ebtables
|
|
%dir %{_libdir}/%{name}
|
|
%{_libdir}/%{name}/*.so
|
|
%{_sbindir}/ebtables
|
|
%{_sbindir}/ebtables-restore
|
|
%{_sbindir}/ebtables-save
|
|
%{_sbindir}/rcebtables
|
|
|
|
%changelog
|