Remove BuildRequires for old distros

OBS-URL: https://build.opensuse.org/package/show/security:netfilter/ebtables?expand=0&rev=31
This commit is contained in:
Jan Engelhardt 2014-09-23 15:29:08 +00:00 committed by Git OBS Bridge
parent 76f09d3cbf
commit 3900c8e23d
2 changed files with 25 additions and 34 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Sep 23 15:28:21 UTC 2014 - jengelh@inai.de
- Remove support for old distros from specfile
(prjconf can do substitutions instead)
-------------------------------------------------------------------
Fri Feb 28 08:42:42 UTC 2014 - vcizek@suse.com

View File

@ -29,17 +29,9 @@ Source: %name-v2.0.10-4.tar.xz
Patch0: %name-v2.0.8-makefile.diff
Patch1: %name-v2.0.8-initscript.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: linux-glibc-devel >= 2.6.20
BuildRequires: sed
BuildRequires: xz
%if 0%{?suse_version} >= 1140
BuildRequires: linux-glibc-devel >= 2.6.20
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires: linux-kernel-headers >= 2.6.20
%endif
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
BuildRequires: kernel-headers >= 2.6.20
%endif
%description
A firewalling tool to transparently filter network traffic passing a
@ -49,14 +41,8 @@ can be used together with the other Linux filtering tools, like
iptables. There are no incompatibility issues.
%prep
%if 0%{?__xz:1}
%setup -q -n %name-v2.0.10-4
%else
tar -xf "%{S:0}" --use=xz;
%setup -DTqn %name-v2.0.10-4
%endif
%patch0
%patch1
%patch -P 0 -P 1 -p0
%build
# The way ebtables is built requires ASNEEDED=0 forever [bnc#567267]
@ -71,30 +57,29 @@ mv include/linux/netfilter_bridge/ebt_nflog.{h.save,h}
make \
CFLAGS="%optflags" \
CXXFLAGS="%optflags" \
LIBDIR=%_libdir/%name \
MANDIR=%_mandir \
BINDIR=%_sbindir \
ETCDIR=%_sysconfdir \
INITDIR=%_sysconfdir/init.d \
SYSCONFIGDIR=%_sysconfdir
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 %buildroot%_sbindir
install -d -m 755 %buildroot%_sysconfdir/init.d
mkdir -p "%buildroot/%_sysconfdir/init.d"
make \
DESTDIR=%buildroot \
LIBDIR=%_libdir/%name \
MANDIR=%_mandir \
BINDIR=%_sbindir \
ETCDIR=%_sysconfdir \
INITDIR=%_sysconfdir/init.d \
SYSCONFIGDIR=%_sysconfdir \
DESTDIR="%buildroot" \
LIBDIR="%_libdir/%name" \
MANDIR="%_mandir" \
BINDIR="%_sbindir" \
ETCDIR="%_sysconfdir" \
INITDIR="%_sysconfdir/init.d" \
SYSCONFIGDIR="%_sysconfdir" \
install
ln -sf %_sysconfdir/init.d/ebtables %buildroot%_sbindir/rcebtables
ln -sf "%_initddir/ebtables" "%buildroot/%_sbindir/rcebtables"
# not used
rm -f %buildroot%_sysconfdir/ebtables-config
rm -f "%buildroot/%_sysconfdir/ebtables-config"
%post
%fillup_and_insserv ebtables
@ -111,7 +96,7 @@ rm -f %buildroot%_sysconfdir/ebtables-config
%doc COPYING ChangeLog
%doc %_mandir/man8/ebtables.8*
%config(noreplace) %_sysconfdir/ethertypes
%_sysconfdir/init.d/ebtables
%_initddir/ebtables
%dir %_libdir/%name
%_libdir/%name/*.so
%_sbindir/ebtables