tcpdump/tcpdump.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 657
fdb90fe1cf21
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

michael@657 1 ##
michael@657 2 ## tcpdump.spec -- OpenPKG RPM Package Specification
michael@657 3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@657 4 ##
michael@657 5 ## Permission to use, copy, modify, and distribute this software for
michael@657 6 ## any purpose with or without fee is hereby granted, provided that
michael@657 7 ## the above copyright notice and this permission notice appear in all
michael@657 8 ## copies.
michael@657 9 ##
michael@657 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@657 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@657 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@657 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@657 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@657 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@657 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@657 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@657 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@657 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@657 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@657 21 ## SUCH DAMAGE.
michael@657 22 ##
michael@657 23
michael@657 24 # package version
michael@657 25 %define V_tarball 4.3.0
michael@657 26 %define V_subdir 4.3.0
michael@657 27
michael@657 28 # package information
michael@657 29 Name: tcpdump
michael@657 30 Summary: Network Packet Dumping Tool
michael@657 31 URL: http://www.tcpdump.org/
michael@657 32 Vendor: The Tcpdump Group
michael@657 33 Packager: OpenPKG Foundation e.V.
michael@657 34 Distribution: OpenPKG Community
michael@657 35 Class: BASE
michael@657 36 Group: Capturing
michael@657 37 License: GPL
michael@657 38 Version: %{V_tarball}
michael@658 39 Release: 20120800
michael@657 40
michael@657 41 # list of sources
michael@657 42 Source0: http://www.tcpdump.org/release/tcpdump-%{V_tarball}.tar.gz
michael@657 43 Patch0: tcpdump.patch
michael@657 44
michael@657 45 # build information
michael@657 46 BuildPreReq: OpenPKG, openpkg >= 20100101, autoconf
michael@657 47 PreReq: OpenPKG, openpkg >= 20100101
michael@657 48 BuildPreReq: libpcap, openssl
michael@657 49 PreReq: libpcap, openssl
michael@657 50
michael@657 51 %description
michael@658 52 Tcpdump is a real time network packet capturing and dumping tool.
michael@657 53 Despite its historical name, it is a general purpose network tool,
michael@657 54 not just usable for TCP packets.
michael@657 55
michael@657 56 %track
michael@657 57 prog tcpdump = {
michael@657 58 version = %{V_tarball}
michael@657 59 url = http://www.tcpdump.org/
michael@657 60 regex = tcpdump-(__VER__)\.tar\.gz
michael@657 61 }
michael@657 62
michael@657 63 %prep
michael@657 64 %setup -q -n tcpdump-%{V_subdir}
michael@657 65 %patch -p0
michael@657 66
michael@657 67 %build
michael@657 68 options=""
michael@657 69 case "%{l_platform -t}" in
michael@657 70 *-freebsd[5-9].* | *-sunos5.1[01] | *-sunos5.9 | *-linux2.[46]* | *-linux3.* )
michael@657 71 options="--enable-ipv6"
michael@657 72 ;;
michael@657 73 esac
michael@657 74 CC="%{l_cc}" \
michael@657 75 CFLAGS="%{l_cflags -O} %{l_cppflags openssl}" \
michael@657 76 CPPFLAGS="%{l_cppflags openssl}" \
michael@657 77 LDFLAGS="%{l_ldflags}" \
michael@657 78 GREP="grep" \
michael@657 79 ./configure \
michael@657 80 --prefix=%{l_prefix} \
michael@657 81 --mandir=%{l_prefix}/man \
michael@658 82 --with-crypto=%{l_prefix} \
michael@657 83 $options
michael@657 84 %{l_make} %{l_mflags -O}
michael@657 85
michael@657 86 %install
michael@657 87 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@657 88 strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
michael@657 89 rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/tcpdump.* >/dev/null 2>&1 || true
michael@657 90 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@657 91
michael@657 92 %files -f files
michael@657 93
michael@657 94 %clean
michael@657 95

mercurial