Blob Blame History Raw
Summary: User space tool to set up tables of ARP rules in kernel
Name:    arptables
Version: 0.0.4
Release: 14%{?dist}
License: GPLv2+
Group:   System Environment/Base

URL:     http://ebtables.sourceforge.net/
Source0: http://downloads.sourceforge.net/ebtables/arptables/arptables-v%{version}.tar.gz
Source1: arptables.service
Source2: arptables-helper
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
# http://marc.info/?l=netfilter-devel&m=137908241011194&w=2
Source3: COPYING

BuildRequires:  gcc
BuildRequires: perl-generators
BuildRequires: systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd

Obsoletes: arptables_jf < 0.0.8-37
Provides:  arptables_jf = 0.0.8-37

%description
The arptables is a user space tool used to set up and maintain
the tables of ARP rules in the Linux kernel. These rules inspect
the ARP frames which they see. arptables is analogous to the iptables
user space tool, but is less complicated.

%prep
%setup -q -n arptables-v%{version}

cp %{SOURCE3} COPYING

%build
# Makefile uses $(KERNEL_DIR) to redefine where to look for header files.
# But when it's set to standard system include directory gcc ignores it
# (see gcc(1)). It however looks that the code is not ready for using 
# system headers (instead included ones) so we don't use this option.
make all 'COPT_FLAGS=%{optflags}' 'LDFLAGS=%{build_ldflags}' %{_smp_mflags}

%install
make install DESTDIR=%{buildroot} BINDIR=%{_sbindir} MANDIR=%{_mandir}

install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/arptables.service
mkdir -p %{buildroot}%{_libexecdir}/
install -p -D -m 755 %{SOURCE2} %{buildroot}%{_libexecdir}/
rm -rf %{buildroot}%{_initrddir}
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
echo '# Configure prior to use' > %{buildroot}%{_sysconfdir}/sysconfig/arptables

%post
%systemd_post arptables.service

%preun
%systemd_preun arptables.service

%postun
%systemd_postun_with_restart arptables.service


%files
%doc COPYING
%{_sbindir}/arptables*
%{_libexecdir}/arptables-helper
%{_mandir}/*/arptables*
%{_unitdir}/arptables.service
%config(noreplace) %{_sysconfdir}/sysconfig/arptables

%changelog
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.4-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 21 2018 Florian Weimer <fweimer@redhat.com> - 0.0.4-13
- Use LDFLAGS from redhat-rpm-config

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.4-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.4-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Mon Sep 16 2013 Jiri Popelka <jpopelka@redhat.com> - 0.0.4-4
- revert previous change, the code is not ready for this

* Mon Sep 16 2013 Jiri Popelka <jpopelka@redhat.com> - 0.0.4-3
- use system kernel headers

* Fri Sep 13 2013 Jiri Popelka <jpopelka@redhat.com> - 0.0.4-2
- install with '-p' (#1007964)

* Fri Sep 13 2013 Jiri Popelka <jpopelka@redhat.com> - 0.0.4-1
- renamed arptables_jf to arptables