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