Mon, 17 Sep 2012 19:10:10 +0200
Update to new version of vendor software although Oracle fails to deliver.
More specifically, newer db(3) patch revisions exist but Oracle has
removed them from the canonical download server URI for Berkely DB.
michael@27 | 1 | ## |
michael@27 | 2 | ## libpcap.spec -- OpenPKG RPM Package Specification |
michael@488 | 3 | ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@27 | 4 | ## |
michael@27 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@27 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@27 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@27 | 8 | ## copies. |
michael@27 | 9 | ## |
michael@27 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@27 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@27 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@27 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@27 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@27 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@27 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@27 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@27 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@27 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@27 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@27 | 21 | ## SUCH DAMAGE. |
michael@27 | 22 | ## |
michael@27 | 23 | |
michael@488 | 24 | # package version |
michael@488 | 25 | %define V_tarball 1.3.0 |
michael@488 | 26 | %define V_subdir 1.3.0 |
michael@488 | 27 | |
michael@27 | 28 | # package information |
michael@27 | 29 | Name: libpcap |
michael@27 | 30 | Summary: Network Packet Capture Library |
michael@27 | 31 | URL: http://www.tcpdump.org/ |
michael@27 | 32 | Vendor: The Tcpdump Group |
michael@27 | 33 | Packager: OpenPKG Foundation e.V. |
michael@27 | 34 | Distribution: OpenPKG Community |
michael@27 | 35 | Class: BASE |
michael@27 | 36 | Group: Capturing |
michael@27 | 37 | License: GPL |
michael@488 | 38 | Version: %{V_tarball} |
michael@489 | 39 | Release: 20120800 |
michael@27 | 40 | |
michael@27 | 41 | # list of sources |
michael@488 | 42 | Source0: http://www.tcpdump.org/release/libpcap-%{V_tarball}.tar.gz |
michael@27 | 43 | Patch0: libpcap.patch |
michael@27 | 44 | |
michael@27 | 45 | # build information |
michael@489 | 46 | BuildPreReq: OpenPKG, openpkg >= 20100101, make, bison, flex |
michael@488 | 47 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@27 | 48 | |
michael@27 | 49 | %description |
michael@27 | 50 | libpcap provides a portable framework for low-level network monitoring and |
michael@27 | 51 | system-independent interface for user-level packet capture. The libpcap |
michael@27 | 52 | interface supports a filtering mechanism based on the architecture in the |
michael@27 | 53 | BSD packet filter. On systems that don't have BPF, all packets are read |
michael@27 | 54 | into user-space and the BPF filters are evaluated in the libpcap library. |
michael@27 | 55 | |
michael@27 | 56 | %track |
michael@27 | 57 | prog libpcap = { |
michael@488 | 58 | version = %{V_tarball} |
michael@488 | 59 | url = http://www.tcpdump.org/ |
michael@27 | 60 | regex = libpcap-(__VER__)\.tar\.gz |
michael@27 | 61 | } |
michael@27 | 62 | |
michael@27 | 63 | %prep |
michael@488 | 64 | %setup -q -n libpcap-%{V_subdir} |
michael@27 | 65 | %patch -p0 |
michael@489 | 66 | %{l_shtool} subst \ |
michael@489 | 67 | -e 's;\(#if defined(PF_PACKET) && defined(SO_ATTACH_FILTER)\)$;\1 \&\& defined(__linux__);g' \ |
michael@489 | 68 | gencode.c |
michael@27 | 69 | |
michael@27 | 70 | %build |
michael@27 | 71 | CC="%{l_cc}" \ |
michael@27 | 72 | CFLAGS="%{l_cflags -O}" \ |
michael@488 | 73 | GREP="grep" \ |
michael@27 | 74 | ./configure \ |
michael@27 | 75 | --prefix=%{l_prefix} \ |
michael@499 | 76 | --mandir=%{l_prefix}/man |
michael@27 | 77 | %{l_make} %{l_mflags -O} |
michael@27 | 78 | |
michael@27 | 79 | %install |
michael@27 | 80 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@27 | 81 | $RPM_BUILD_ROOT%{l_prefix}/bin \ |
michael@27 | 82 | $RPM_BUILD_ROOT%{l_prefix}/man/man3 |
michael@27 | 83 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@27 | 84 | ( cd $RPM_BUILD_ROOT%{l_prefix}/man/man3 |
michael@27 | 85 | %{l_shtool} move -e '*.3pcap' '%1.3' |
michael@27 | 86 | ) || exit $? |
michael@27 | 87 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@27 | 88 | |
michael@27 | 89 | %files -f files |
michael@27 | 90 | |
michael@27 | 91 | %clean |
michael@27 | 92 |