]> git.pld-linux.org Git - packages/tcpdump.git/blobdiff - tcpdump.spec
- hide -w option for rpmbuild
[packages/tcpdump.git] / tcpdump.spec
index d5d365d0cba21b14ffea65bb01954dc111e7212a..a6e0cc77ad5a350138e678919d0df6979e3b1cb0 100644 (file)
@@ -1,6 +1,7 @@
 #
 # 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.UTF-8):     deponiert Pakete, die über eine Netzwerkschnittstelle gesandt oder empfangen werden
@@ -13,7 +14,7 @@ Summary(tr.UTF-8):    Bir ağ arabirimi üzerinden gelen ya da giden paketleri list
 Summary(uk.UTF-8):     Інструмент для моніторингу мережевого трафіку
 Name:          tcpdump
 Version:       4.2.0
-Release:       2
+Release:       6
 Epoch:         1
 License:       BSD
 Group:         Networking/Utilities
@@ -26,7 +27,12 @@ BuildRequires:       autoconf
 BuildRequires: libpcap-devel >= 2:1.2.0
 %{?with_libsmi:BuildRequires:  libsmi-devel}
 BuildRequires: openssl-devel >= 0.9.7d
+BuildRequires: rpmbuild(macros) >= 1.202
 Requires:      libpcap >= 2:1.2.0
+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
@@ -80,18 +86,19 @@ Tcpdump виводить хедери пакетів, що проходять ч
 %configure \
        CFLAGS="-I. %{rpmcflags} %{rpmcppflags}" \
        %{?with_smi:--with-smi} \
-       --enable-ipv6 \
+%if %{with drop_priv}
        --with-user=tcpdump \
-       --with-chroot=/usr/share/empty
+       --with-chroot=/usr/share/empty \
+%endif
+       --enable-ipv6
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-rm $RPM_BUILD_ROOT%{_sbindir}/tcpdump.%{version}
+%{__rm} $RPM_BUILD_ROOT%{_sbindir}/tcpdump.%{version}
 
 %pre
 %useradd -u 273 -r -d /usr/share/empty -s /bin/false -c "tcpdump User" -g nobody tcpdump
@@ -101,7 +108,6 @@ if [ "$1" = "0" ]; then
        %userremove tcpdump
 fi
 
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
This page took 0.096072 seconds and 4 git commands to generate.