daq/daq.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
permissions
-rw-r--r--

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

     1 ##
     2 ##  daq.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2012 Michael Schloh von Bennewitz <michael@schloh.com>
     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 ##
    24 #   package information
    25 Name:         daq
    26 Summary:      Data Acquisition Library
    27 URL:          http://www.snort.org/
    28 Vendor:       B. Caswell, M. Roesch
    29 Packager:     Michael Schloh von Bennewitz
    30 Distribution: Europalab Networks Production
    31 Class:        EVAL
    32 Group:        Network
    33 License:      GPL
    34 Version:      1.1.1
    35 Release:      20120800
    37 #   list of sources
    38 Source0:      http://dl.snort.org/snort-current/daq-%{version}.tar.gz
    40 #   build information
    41 BuildPreReq:  OpenPKG, openpkg >= 20100101, make, gcc, flex, bison
    42 PreReq:       OpenPKG, openpkg >= 20100101
    43 BuildPreReq:  libpcap
    44 PreReq:       libpcap
    46 %description
    47     DAQ, or Data Acquisition library, provides packet I/O. The DAQ
    48     replaces direct calls to PCAP functions with an abstraction layer
    49     that facilitates operation on a variety of hardware and software
    50     interfaces without requiring changes to dependent applications.
    51     It is possible to select the DAQ type and mode when invoking an
    52     application to perform PCAP readback or inline operation, for
    53     example. The modular nature allows for building new modules for
    54     other platforms.
    56 %track
    57     prog daq = {
    58         version   = %{version}
    59         url       = http://www.snort.org/downloads
    60         regex     = daq-(__VER__)\.tar\.gz
    61     }
    63 %prep
    64     %setup -q
    65     %{l_shtool} subst \
    66         -e 's;u_int\([0-9]*\)_t;uint\1_t;g' \
    67         sfbpf/*
    69 %build
    70     #   configure program
    71     LIBS=""
    72     case "%{l_platform -t}" in
    73         *-sunos* ) LIBS="$LIBS -lsocket -lnsl" ;;
    74     esac
    75     CC="%{l_cc}" \
    76     CFLAGS="%{l_cflags -O}" \
    77     CPPFLAGS="%{l_cppflags}" \
    78     LDFLAGS="%{l_ldflags}" \
    79     LIBS="$LIBS" \
    80     ./configure \
    81         --prefix=%{l_prefix} \
    82         --with-libpcap-includes=%{l_prefix}/include \
    83         --with-libpcap-libraries=%{l_prefix}/lib \
    84         --enable-static
    86     #   build program
    87     %{l_make} %{l_mflags -O}
    90 %install
    91     #   install program
    92     %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
    94     #   remove unwanted shared libs
    95     rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.so*
    97     #   adjust static only libs
    98     %{l_shtool} subst \
    99         -e 's;dlname=.*;dlname=;g' \
   100         -e 's;library_names=.*;library_names=;g' \
   101         $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
   103     #   determine installation files
   104     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   106 %files -f files
   108 %clean

mercurial