From 3900c8e23d336c85cf5dfbb9be2a2a9f468e2916d71a61c089df759dc653b178 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 23 Sep 2014 15:29:08 +0000 Subject: [PATCH] Remove BuildRequires for old distros OBS-URL: https://build.opensuse.org/package/show/security:netfilter/ebtables?expand=0&rev=31 --- ebtables.changes | 6 ++++++ ebtables.spec | 53 +++++++++++++++++------------------------------- 2 files changed, 25 insertions(+), 34 deletions(-) diff --git a/ebtables.changes b/ebtables.changes index 0900a1e..1ec62d3 100644 --- a/ebtables.changes +++ b/ebtables.changes @@ -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 diff --git a/ebtables.spec b/ebtables.spec index cafa049..8088248 100644 --- a/ebtables.spec +++ b/ebtables.spec @@ -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