daq/daq.spec

Mon, 17 Sep 2012 19:10:10 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 17 Sep 2012 19:10:10 +0200
changeset 689
9fe04d4d4e5a
permissions
-rw-r--r--

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@551 1 ##
michael@551 2 ## daq.spec -- OpenPKG RPM Package Specification
michael@551 3 ## Copyright (c) 2012 Michael Schloh von Bennewitz <michael@schloh.com>
michael@551 4 ##
michael@551 5 ## Permission to use, copy, modify, and distribute this software for
michael@551 6 ## any purpose with or without fee is hereby granted, provided that
michael@551 7 ## the above copyright notice and this permission notice appear in all
michael@551 8 ## copies.
michael@551 9 ##
michael@551 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@551 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@551 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@551 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@551 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@551 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@551 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@551 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@551 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@551 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@551 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@551 21 ## SUCH DAMAGE.
michael@551 22 ##
michael@551 23
michael@551 24 # package information
michael@551 25 Name: daq
michael@551 26 Summary: Data Acquisition Library
michael@551 27 URL: http://www.snort.org/
michael@551 28 Vendor: B. Caswell, M. Roesch
michael@551 29 Packager: Michael Schloh von Bennewitz
michael@551 30 Distribution: Europalab Networks Production
michael@551 31 Class: EVAL
michael@551 32 Group: Network
michael@551 33 License: GPL
michael@551 34 Version: 1.1.1
michael@551 35 Release: 20120800
michael@551 36
michael@551 37 # list of sources
michael@551 38 Source0: http://dl.snort.org/snort-current/daq-%{version}.tar.gz
michael@551 39
michael@551 40 # build information
michael@551 41 BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, flex, bison
michael@551 42 PreReq: OpenPKG, openpkg >= 20100101
michael@551 43 BuildPreReq: libpcap
michael@551 44 PreReq: libpcap
michael@551 45
michael@551 46 %description
michael@551 47 DAQ, or Data Acquisition library, provides packet I/O. The DAQ
michael@551 48 replaces direct calls to PCAP functions with an abstraction layer
michael@551 49 that facilitates operation on a variety of hardware and software
michael@551 50 interfaces without requiring changes to dependent applications.
michael@551 51 It is possible to select the DAQ type and mode when invoking an
michael@551 52 application to perform PCAP readback or inline operation, for
michael@551 53 example. The modular nature allows for building new modules for
michael@551 54 other platforms.
michael@551 55
michael@551 56 %track
michael@551 57 prog daq = {
michael@551 58 version = %{version}
michael@551 59 url = http://www.snort.org/downloads
michael@551 60 regex = daq-(__VER__)\.tar\.gz
michael@551 61 }
michael@551 62
michael@551 63 %prep
michael@551 64 %setup -q
michael@551 65 %{l_shtool} subst \
michael@551 66 -e 's;u_int\([0-9]*\)_t;uint\1_t;g' \
michael@551 67 sfbpf/*
michael@551 68
michael@551 69 %build
michael@551 70 # configure program
michael@551 71 LIBS=""
michael@551 72 case "%{l_platform -t}" in
michael@551 73 *-sunos* ) LIBS="$LIBS -lsocket -lnsl" ;;
michael@551 74 esac
michael@551 75 CC="%{l_cc}" \
michael@551 76 CFLAGS="%{l_cflags -O}" \
michael@551 77 CPPFLAGS="%{l_cppflags}" \
michael@551 78 LDFLAGS="%{l_ldflags}" \
michael@551 79 LIBS="$LIBS" \
michael@551 80 ./configure \
michael@551 81 --prefix=%{l_prefix} \
michael@551 82 --with-libpcap-includes=%{l_prefix}/include \
michael@551 83 --with-libpcap-libraries=%{l_prefix}/lib \
michael@551 84 --enable-static
michael@551 85
michael@551 86 # build program
michael@551 87 %{l_make} %{l_mflags -O}
michael@551 88
michael@551 89
michael@551 90 %install
michael@551 91 # install program
michael@551 92 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@551 93
michael@551 94 # remove unwanted shared libs
michael@551 95 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.so*
michael@551 96
michael@551 97 # adjust static only libs
michael@551 98 %{l_shtool} subst \
michael@551 99 -e 's;dlname=.*;dlname=;g' \
michael@551 100 -e 's;library_names=.*;library_names=;g' \
michael@551 101 $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
michael@551 102
michael@551 103 # determine installation files
michael@551 104 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@551 105
michael@551 106 %files -f files
michael@551 107
michael@551 108 %clean
michael@551 109

mercurial