# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346171520 -7200 # Node ID d7ae7fd8a21473e3e175007bb0463afb9a9f5ea4 # Parent b663cfca750a11895f6dc33fd4f74e968a36fa8d Import new package spec for introduction into repository. This intends to satisfy the new requirements since version 2.9 of Snort. diff -r b663cfca750a -r d7ae7fd8a214 daq/daq.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/daq/daq.spec Tue Aug 28 18:32:00 2012 +0200 @@ -0,0 +1,109 @@ +## +## daq.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2012 Michael Schloh von Bennewitz +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package information +Name: daq +Summary: Data Acquisition Library +URL: http://www.snort.org/ +Vendor: B. Caswell, M. Roesch +Packager: Michael Schloh von Bennewitz +Distribution: Europalab Networks Production +Class: EVAL +Group: Network +License: GPL +Version: 1.1.1 +Release: 20120800 + +# list of sources +Source0: http://dl.snort.org/snort-current/daq-%{version}.tar.gz + +# build information +BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, flex, bison +PreReq: OpenPKG, openpkg >= 20100101 +BuildPreReq: libpcap +PreReq: libpcap + +%description + DAQ, or Data Acquisition library, provides packet I/O. The DAQ + replaces direct calls to PCAP functions with an abstraction layer + that facilitates operation on a variety of hardware and software + interfaces without requiring changes to dependent applications. + It is possible to select the DAQ type and mode when invoking an + application to perform PCAP readback or inline operation, for + example. The modular nature allows for building new modules for + other platforms. + +%track + prog daq = { + version = %{version} + url = http://www.snort.org/downloads + regex = daq-(__VER__)\.tar\.gz + } + +%prep + %setup -q + %{l_shtool} subst \ + -e 's;u_int\([0-9]*\)_t;uint\1_t;g' \ + sfbpf/* + +%build + # configure program + LIBS="" + case "%{l_platform -t}" in + *-sunos* ) LIBS="$LIBS -lsocket -lnsl" ;; + esac + CC="%{l_cc}" \ + CFLAGS="%{l_cflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags}" \ + LIBS="$LIBS" \ + ./configure \ + --prefix=%{l_prefix} \ + --with-libpcap-includes=%{l_prefix}/include \ + --with-libpcap-libraries=%{l_prefix}/lib \ + --enable-static + + # build program + %{l_make} %{l_mflags -O} + + +%install + # install program + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + + # remove unwanted shared libs + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.so* + + # adjust static only libs + %{l_shtool} subst \ + -e 's;dlname=.*;dlname=;g' \ + -e 's;library_names=.*;library_names=;g' \ + $RPM_BUILD_ROOT%{l_prefix}/lib/*.la + + # determine installation files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean +