+#
+# Conditional build:
+%bcond_without libsmi # Build without SMI support
+%bcond_with drop_priv # Breaks "-w" option
+#
Summary: dumps packets that are sent or received over a network interface
-Summary(de): deponiert Pakete, die über eine Netzwerkschnittstelle gesandt oder empfangen werden
-Summary(fr): vide les paquets émis ou reçus sur une interface réseau
-Summary(pl): Pokazuje pakiety przechodz±ce przez inerfejsy sieciowe
-Summary(tr): Bir að arabirimi üzerinden gelen ya da giden paketleri listeler
+Summary(de.UTF-8): deponiert Pakete, die über eine Netzwerkschnittstelle gesandt oder empfangen werden
+Summary(es.UTF-8): Enseña los paquetes que son enviados o recibidos a través de una interface de red
+Summary(fr.UTF-8): vide les paquets émis ou reçus sur une interface réseau
+Summary(pl.UTF-8): Pokazuje pakiety przechodzące przez interfejsy sieciowe
+Summary(pt_BR.UTF-8): Mostra os pacotes que são enviados ou recebidos através de uma interface de rede
+Summary(ru.UTF-8): Инструмент для мониторинга сетевого траффика
+Summary(tr.UTF-8): Bir ağ arabirimi üzerinden gelen ya da giden paketleri listeler
+Summary(uk.UTF-8): Інструмент для моніторингу мережевого трафіку
Name: tcpdump
-Version: 3.4
+Version: 4.5.1
Release: 1
-Copyright: BSD
-Group: Applications/Networking
-Group(pl): Aplikacje/Sieciowe
-Source0: ftp://ftp.ee.lbl.gov//%{name}-%{version}.tar.Z
-Patch0: ftp://ftp.inr.ac.ru/ip-routing/lbl-tools/tcpdump-3.4-ss990523.dif.gz
-Patch1: tcpdump-glibc2.1.patch
-BuildPrereq: libpcap
-BuildRoot: /tmp/%{name}-%{version}-root
+Epoch: 1
+License: BSD
+Group: Networking/Utilities
+Source0: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz
+# Source0-md5: 973a2513d0076e34aa9da7e15ed98e1b
+Patch0: libpcap-m4.patch
+URL: http://www.tcpdump.org/
+BuildRequires: autoconf >= 2.61
+BuildRequires: libcap-ng-devel
+BuildRequires: libpcap-devel >= 2:1.5.1
+%{?with_libsmi:BuildRequires: libsmi-devel}
+BuildRequires: openssl-devel >= 0.9.7d
+BuildRequires: rpmbuild(macros) >= 1.202
+Requires: libpcap >= 2:1.5.1
+Provides: user(tcpdump)
+Requires(postun): /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/sbin/useradd
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-Tcpdump prints out the headers of packets on a network interface. It
+Tcpdump prints out the headers of packets on a network interface. It
is very useful for debugging network problems and security operations.
-%description -l de
-Tcpdump druckt die Headers von Paketen auf einer Netzschnittstelle.
-Es ist überaus nützlich zum Debuggen von Netzwerkproblemen und von
+%description -l de.UTF-8
+Tcpdump druckt die Headers von Paketen auf einer Netzschnittstelle. Es
+ist überaus nützlich zum Debuggen von Netzwerkproblemen und von
Sicherheitsoperationen.
-%description -l fr
-tcpdump affiche les en-têtes des paquets d'une interface réseau. Il est
-très utile pour détecter les problèmes de réseau et de sécurité.
+%description -l es.UTF-8
+Tcpdump imprime los encabezamientos de los paquetes en una interface
+de red. Es muy práctico para solucionar problemas en la red y para
+operaciones de seguridad.
-%description -l pl
-Tcpdump s³u¿y do analizy pakietów przechodz±cych przez interfejscy
-sieciowe, jest u¿ytecznym narzêdziem do ¶ledzenia ruchu w sieci.
+%description -l fr.UTF-8
+tcpdump affiche les en-têtes des paquets d'une interface réseau. Il
+est très utile pour détecter les problèmes de réseau et de sécurité.
-%description -l tr
-Tcpdump, bir að arabirimi üzerinden geçen paketlerin baþlýklarýný döker.
-Güvenlik iþlemleri ve að problemlerinin irdelenmesi konularýnda son derece
-yararlýdýr.
+%description -l pl.UTF-8
+Tcpdump służy do analizy pakietów przechodzących przez interfejsy
+sieciowe, jest użytecznym narzędziem do śledzenia ruchu w sieci.
+
+%description -l pt_BR.UTF-8
+Tcpdump imprime os cabeçalhos dos pacotes em uma interface de rede.
+Ele é muito prático para resolver problemas na rede e para operações
+de segurança.
+
+%description -l ru.UTF-8
+Tcpdump выводит хедеры пакетов, проходящих через сетевой интерфейс.
+Незаменим для диагностики сетевых проблем и нарушений безопасности.
+
+%description -l tr.UTF-8
+Tcpdump, bir ağ arabirimi üzerinden geçen paketlerin başlıklarını
+döker. Güvenlik işlemleri ve ağ problemlerinin irdelenmesi konularında
+son derece yararlıdır.
+
+%description -l uk.UTF-8
+Tcpdump виводить хедери пакетів, що проходять через мереживний
+інтерфейс. Незамінний для діагностики мереживних проблем та порушень
+безпеки.
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%build
-%configure
-CFLAGS="$RPM_OPT_FLAGS -DIP_MAX_MEMBERSHIPS=20" \
- ./configure --prefix=%{_prefix} \
- --mandir=%{_mandir}
-make
+%{__autoconf}
+%configure \
+ CFLAGS="-I. %{rpmcflags} %{rpmcppflags}" \
+ %{?with_smi:--with-smi} \
+%if %{with drop_priv}
+ --with-user=tcpdump \
+ --with-chroot=/usr/share/empty \
+%endif
+ --enable-ipv6 \
+ --with-crypto
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8}
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
-install -s tcpdump $RPM_BUILD_ROOT%{_sbindir}
-install tcpdump.1 $RPM_BUILD_ROOT%{_mandir}/man8/tcpdump.8
+%{__rm} $RPM_BUILD_ROOT%{_sbindir}/tcpdump.%{version}
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man8/*
+%pre
+%useradd -u 273 -r -d /usr/share/empty -s /bin/false -c "tcpdump User" -g nobody tcpdump
+
+%postun
+if [ "$1" = "0" ]; then
+ %userremove tcpdump
+fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
+%doc CHANGES CREDITS LICENSE README.md
%attr(755,root,root) %{_sbindir}/tcpdump
-%{_mandir}/man8/*
-
-%changelog
-* Sat Jul 03 1999 PLD Team <pld-list@pld.org.pl>
-- new commenting style:
-
- $Log: tcpdump.spec,v $
- Revision 1.8 1999-07-09 16:22:14 kloczek
-
- - added line on top spec file with cvs tags ($Revision:$ and $Date:$).
-
- Revision 1.7 1999/07/03 17:06:12 misiek
- updated to 3.4. IPv6 patches replaced by ANK patches
-
-
-* Wed Jun 23 1999 Micha³ Kuratczyk <kura@pld.org.pl>
- [3.4a6-2]
-- gzipping documentation instead bzipping
-- added Group(pl)
-- more RPM macros
-- added using %configure
-
-* Tue Jul 2 1998 Wojtek ¦lusarczyk <wojtek@shadow.eu.org>
- [3.4a6-1d]
-- build against glibc-2.1,
-- added IPv6 support,
-- updatet to relase 3.4a6,
-- translation modified for pl,
-- changed permission of tcpdump to 711,
-- moved %changelog at the end of spec.
-
-* Thu May 07 1998 Prospector System <bugs@redhat.com>
-- translations modified for de, fr, tr
-
-* Sat May 2 1998 Alan Cox <alan@rehat.com>
-- Added the SACK printing fix so you can dump Linux 2.1+.
-
-* Tue Oct 21 1997 Erik Troan <ewt@redhat.com>
-- updated to release 3.4a5
-- uses a buildroot and %attr
-
-* Thu Jul 17 1997 Erik Troan <ewt@redhat.com>
-- built against glibc
+%{_mandir}/man1/tcpdump.1*