Bart De Schuymer | 6e3005a | 2005-11-07 18:52:59 +0000 | [diff] [blame] | 1 | # spec file originally from Dag Wieers, altered by Bart De Schuymer |
| 2 | |
| 3 | %define _sbindir /usr/local/sbin |
| 4 | %define _mysysconfdir %{_sysconfdir}/sysconfig |
| 5 | |
| 6 | Summary: Ethernet Bridge frame table administration tool |
| 7 | Name: ebtables |
Bart De Schuymer | cdae0ba | 2006-12-15 11:35:55 +0000 | [diff] [blame] | 8 | Version: $(VERSION) |
| 9 | Release: $(RELEASE) |
Bart De Schuymer | 6e3005a | 2005-11-07 18:52:59 +0000 | [diff] [blame] | 10 | License: GPL |
| 11 | Group: System Environment/Base |
| 12 | URL: http://ebtables.sourceforge.net/ |
| 13 | |
| 14 | Packager: Bart De Schuymer <bdschuym@pandora.be> |
| 15 | |
| 16 | Source: http://dl.sf.net/ebtables/ebtables-v%{version}-%{release}.tar.gz |
| 17 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
| 18 | |
| 19 | %description |
| 20 | Ethernet bridge tables is a firewalling tool to transparantly filter network |
| 21 | traffic passing a bridge. The filtering possibilities are limited to link |
| 22 | layer filtering and some basic filtering on higher network layers. |
| 23 | |
| 24 | The ebtables tool can be used together with the other Linux filtering tools, |
| 25 | like iptables. There are no incompatibility issues. |
| 26 | |
| 27 | %prep |
| 28 | %setup -n ebtables-v%{version}-%{release} |
| 29 | |
| 30 | %build |
| 31 | %{__make} %{?_smp_mflags} \ |
| 32 | CFLAGS="%{optflags}" |
| 33 | |
| 34 | %install |
| 35 | %{__rm} -rf %{buildroot} |
| 36 | %{__install} -D -m0755 ebtables %{buildroot}%{_sbindir}/ebtables |
| 37 | %{__install} -D -m0755 ebtables-restore %{buildroot}%{_sbindir}/ebtables-restore |
| 38 | %{__install} -D -m0644 ethertypes %{buildroot}%{_sysconfdir}/ethertypes |
| 39 | %{__install} -D -m0644 ebtables.8 %{buildroot}%{_mandir}/man8/ebtables.8 |
| 40 | %{__mkdir} -p %{buildroot}%{_libdir}/ebtables/ |
| 41 | %{__mkdir} -p %{buildroot}%{_sbindir} |
| 42 | %{__mkdir} -p %{buildroot}%{_initrddir} |
| 43 | %{__mkdir} -p %{buildroot}%{_mysysconfdir} |
| 44 | %{__install} -m0755 extensions/*.so %{buildroot}%{_libdir}/ebtables/ |
| 45 | %{__install} -m0755 *.so %{buildroot}%{_libdir}/ebtables/ |
| 46 | export __iets=`printf %{_sbindir} | sed 's/\\//\\\\\\//g'` |
| 47 | export __iets2=`printf %{_mysysconfdir} | sed 's/\\//\\\\\\//g'` |
| 48 | sed -i "s/__EXEC_PATH__/$__iets/g" ebtables-save |
| 49 | %{__install} -m 0755 -o root -g root ebtables-save %{buildroot}%{_sbindir}/ebtables-save |
| 50 | sed -i "s/__EXEC_PATH__/$__iets/g" ebtables.sysv; sed -i "s/__SYSCONFIG__/$__iets2/g" ebtables.sysv |
| 51 | %{__install} -m 0755 -o root -g root ebtables.sysv %{buildroot}%{_initrddir}/ebtables |
| 52 | sed -i "s/__SYSCONFIG__/$__iets2/g" ebtables-config |
| 53 | %{__install} -m 0600 -o root -g root ebtables-config %{buildroot}%{_mysysconfdir}/ebtables-config |
| 54 | unset __iets |
| 55 | unset __iets2 |
| 56 | |
| 57 | %clean |
| 58 | %{__rm} -rf %{buildroot} |
| 59 | |
| 60 | %post |
| 61 | /sbin/chkconfig --add ebtables |
| 62 | |
| 63 | %preun |
| 64 | if [ $1 -eq 0 ]; then |
| 65 | /sbin/service ebtables stop &>/dev/null || : |
| 66 | /sbin/chkconfig --del ebtables |
| 67 | fi |
| 68 | |
| 69 | %files |
| 70 | %defattr(-, root, root, 0755) |
| 71 | %doc ChangeLog COPYING INSTALL THANKS |
| 72 | %doc %{_mandir}/man8/ebtables.8* |
| 73 | %config %{_sysconfdir}/ethertypes |
| 74 | %config %{_mysysconfdir}/ebtables-config |
| 75 | %config %{_initrddir}/ebtables |
| 76 | %{_sbindir}/ebtables |
| 77 | %{_sbindir}/ebtables-save |
| 78 | %{_sbindir}/ebtables-restore |
Bart De Schuymer | 6e3005a | 2005-11-07 18:52:59 +0000 | [diff] [blame] | 79 | %{_libdir}/ebtables/ |
| 80 | |
| 81 | %changelog |
| 82 | * Mon Nov 07 2005 Bart De Schuymer <bdschuym@pandora.be> - 2.0.8-rc1 |
| 83 | - Initial package. |