Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > media > contrib-updates-src > by-pkgid > aa230dd5017b3b8c36c0c93fc1720d7d > files > 3

ebtables-2.0.9.2-1.2mdv2010.1.src.rpm

%define realver 2.0.9-2
%define version 2.0.9.2

%define _ssp_cflags %nil
%define subrel 2

Summary:	A filtering tool for a bridging firewall
Name:		ebtables
Version:	%{version}
Release:	%mkrel 1
Group:		System/Kernel and hardware
License:	GPL
Source0:	%{name}-v%{realver}.tar.gz
# Add patch0 from fedora (fix permission install)
Patch0:		ebtables-2.0.8-norootinst.patch
URL:		http://ebtables.sourceforge.net/
#BuildRequires:  kernel-source >= 2.6.0
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
The ebtables program is a filtering tool for a bridging firewall.
The filtering is focussed on the Link Layer Ethernet frame fields.
Apart from filtering, it also gives the ability to alter the
Ethernet MAC addresses and implement a brouter. 

%prep
%setup -q -n %{name}-v%{realver}
%patch0 -p1

%build
#make CFLAGS="%{optflags} -fPIC" LIBDIR=/%{_lib}
%make CFLAGS="%{optflags} -fPIC" LIBDIR="/%_lib/ebtables" BINDIR="/sbin" MANDIR="%{_mandir}" 

%if %{?_with_static:1}%{?!_with_static:0}
%make \
    CFLAGS="%{optflags} -fPIC" \
    LIBDIR=/%_lib/ebtables \
    static
%endif

%install
rm -rf %{buildroot}

install -d %{buildroot}%{_mandir}/man8
install -d %{buildroot}%{_sysconfdir}
install -d %{buildroot}%{_sysconfdir}/sysconfig
install -d %{buildroot}/sbin
install -d %{buildroot}%{_initrddir}

make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="/%{_lib}/ebtables" BINDIR="/sbin"  MANDIR="%{_mandir}" install
%{__install} -D -m0644 ethertypes %{buildroot}%{_sysconfdir}/ethertypes 

%if %{?_with_static:1}%{?!_with_static:0}
%{__install} -D -m0755 static %{buildroot}/sbin/ebtables-static
%endif

export __iets=`printf '/sbin' | sed 's/\\//\\\\\\//g'`
export __iets2=`printf '%_sysconfdir/sysconfig' | sed 's/\\//\\\\\\//g'`

sed -i "s/__EXEC_PATH__/$__iets/g" ebtables-save
%{__install} -m 0755 ebtables-save %{buildroot}/sbin/ebtables-save
sed -i "s/__EXEC_PATH__/$__iets/g" ebtables.sysv; sed -i "s/__SYSCONFIG__/$__iets2/g" ebtables.sysv
%{__install} -m 0755 ebtables.sysv %{buildroot}%{_initrddir}/ebtables
sed -i "s/__SYSCONFIG__/$__iets2/g" ebtables-config
%{__install} -m 0600 ebtables-config %{buildroot}%{_sysconfdir}/sysconfig/ebtables-config

unset __iets
unset __iets2


%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,0755)
%doc ChangeLog INSTALL THANKS
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ethertypes
%attr(0755,root,root) /sbin/ebtables                                                                                                                                                   
%attr(0755,root,root) /sbin/ebtables-save                                                                                                                                              
%attr(0755,root,root) /sbin/ebtables-restore
%attr(0644,root,root) %{_mandir}/man8/ebtables.8*
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/ebtables-config
%config %{_initrddir}/ebtables
/%_lib/ebtables


%changelog
* Wed Oct 06 2010 John Balcaen <mikala@mandriva.org> 2.0.9.2-1.2mdv2010.1
+ Revision: 583862
- Add patch0 from fedora
- clean spec
- Fix missing binary ( bug #51015)

* Thu Mar 25 2010 Sandro Cazzaniga <kharec@mandriva.org> 2.0.9.2-1mdv2010.1
+ Revision: 527541
- update to 2.0.9.2

* Sun Nov 22 2009 Olivier Thauvin <nanardon@mandriva.org> 2.0.9.1-1mdv2010.1
+ Revision: 469086
- 2.0.9.1

* Tue Jul 28 2009 Frederik Himpe <fhimpe@mandriva.org> 2.0.9-1mdv2010.0
+ Revision: 402579
- update to new version 2.0.9

* Thu Aug 07 2008 Thierry Vignaud <tv@mandriva.org> 2.0.8_2-4mdv2009.0
+ Revision: 266598
- rebuild early 2009.0 package (before pixel changes)

* Fri May 16 2008 Oden Eriksson <oeriksson@mandriva.com> 2.0.8_2-3mdv2009.0
+ Revision: 208134
- rebuild

* Wed Jan 16 2008 Thierry Vignaud <tv@mandriva.org> 2.0.8_2-2mdv2008.1
+ Revision: 153721
- remove useless kernel require
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Sun Oct 28 2007 Olivier Thauvin <nanardon@mandriva.org> 2.0.8_2-1mdv2008.1
+ Revision: 102711
- 2.0.8-2

* Wed Jul 04 2007 Olivier Thauvin <nanardon@mandriva.org> 2.0.8_1-2mdv2008.0
+ Revision: 47832
- disable stack protector to allow build
- 2.0.8-1
- provide it with dyn lib instead static to have all binaries


* Fri Nov 03 2006 Christiaan Welvaart <cjw@daneel.dyndns.org>
+ 2006-11-03 16:42:47 (76278)
- do not include extension libs but build a proper binary

* Sun Aug 06 2006 Olivier Thauvin <nanardon@mandriva.org>
+ 2006-08-05 14:34:21 (53291)
- 2.0.8 rc2

* Sun Aug 06 2006 Olivier Thauvin <nanardon@mandriva.org>
+ 2006-08-05 14:29:03 (53290)
Import ebtables

* Sat Dec 31 2005 Olivier Thauvin <nanardon@mandriva.org> 2.0.8-0.rc1-1mdk
- 2.0.8-rc1

* Fri Dec 24 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.6-3mdk
- x-mas rebuild :)

* Tue Nov 02 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.0.6-2mdk
- patch0: fix build with gcc 3.4

* Tue Dec 09 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.6-1mdk
- initial cooker contrib