michael@657: ## michael@657: ## tcpdump.spec -- OpenPKG RPM Package Specification michael@657: ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. michael@657: ## michael@657: ## Permission to use, copy, modify, and distribute this software for michael@657: ## any purpose with or without fee is hereby granted, provided that michael@657: ## the above copyright notice and this permission notice appear in all michael@657: ## copies. michael@657: ## michael@657: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@657: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@657: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@657: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@657: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@657: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@657: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@657: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@657: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@657: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@657: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@657: ## SUCH DAMAGE. michael@657: ## michael@657: michael@657: # package version michael@657: %define V_tarball 4.3.0 michael@657: %define V_subdir 4.3.0 michael@657: michael@657: # package information michael@657: Name: tcpdump michael@657: Summary: Network Packet Dumping Tool michael@657: URL: http://www.tcpdump.org/ michael@657: Vendor: The Tcpdump Group michael@657: Packager: OpenPKG Foundation e.V. michael@657: Distribution: OpenPKG Community michael@657: Class: BASE michael@657: Group: Capturing michael@657: License: GPL michael@657: Version: %{V_tarball} michael@658: Release: 20120800 michael@657: michael@657: # list of sources michael@657: Source0: http://www.tcpdump.org/release/tcpdump-%{V_tarball}.tar.gz michael@657: Patch0: tcpdump.patch michael@657: michael@657: # build information michael@657: BuildPreReq: OpenPKG, openpkg >= 20100101, autoconf michael@657: PreReq: OpenPKG, openpkg >= 20100101 michael@657: BuildPreReq: libpcap, openssl michael@657: PreReq: libpcap, openssl michael@657: michael@657: %description michael@658: Tcpdump is a real time network packet capturing and dumping tool. michael@657: Despite its historical name, it is a general purpose network tool, michael@657: not just usable for TCP packets. michael@657: michael@657: %track michael@657: prog tcpdump = { michael@657: version = %{V_tarball} michael@657: url = http://www.tcpdump.org/ michael@657: regex = tcpdump-(__VER__)\.tar\.gz michael@657: } michael@657: michael@657: %prep michael@657: %setup -q -n tcpdump-%{V_subdir} michael@657: %patch -p0 michael@657: michael@657: %build michael@657: options="" michael@657: case "%{l_platform -t}" in michael@657: *-freebsd[5-9].* | *-sunos5.1[01] | *-sunos5.9 | *-linux2.[46]* | *-linux3.* ) michael@657: options="--enable-ipv6" michael@657: ;; michael@657: esac michael@657: CC="%{l_cc}" \ michael@657: CFLAGS="%{l_cflags -O} %{l_cppflags openssl}" \ michael@657: CPPFLAGS="%{l_cppflags openssl}" \ michael@657: LDFLAGS="%{l_ldflags}" \ michael@657: GREP="grep" \ michael@657: ./configure \ michael@657: --prefix=%{l_prefix} \ michael@657: --mandir=%{l_prefix}/man \ michael@658: --with-crypto=%{l_prefix} \ michael@657: $options michael@657: %{l_make} %{l_mflags -O} michael@657: michael@657: %install michael@657: %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT michael@657: strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true michael@657: rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/tcpdump.* >/dev/null 2>&1 || true michael@657: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@657: michael@657: %files -f files michael@657: michael@657: %clean michael@657: