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