michael@568: ##
michael@568: ## libdnet.spec -- OpenPKG RPM Package Specification
michael@568: ## Copyright (c) 2000-2008 OpenPKG Foundation e.V.
michael@568: ##
michael@568: ## Permission to use, copy, modify, and distribute this software for
michael@568: ## any purpose with or without fee is hereby granted, provided that
michael@568: ## the above copyright notice and this permission notice appear in all
michael@568: ## copies.
michael@568: ##
michael@568: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@568: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@568: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@568: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@568: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@568: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@568: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@568: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@568: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@568: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@568: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@568: ## SUCH DAMAGE.
michael@568: ##
michael@568:
michael@568: # package information
michael@568: Name: libdnet
michael@568: Summary: Network Client Library
michael@568: URL: http://libdnet.sourceforge.net/
michael@568: Vendor: Dug Song
michael@568: Packager: OpenPKG Foundation e.V.
michael@568: Distribution: OpenPKG Community
michael@568: Class: PLUS
michael@568: Group: Network
michael@568: License: MIT-style
michael@569: Version: 1.12
michael@569: Release: 20120800
michael@568:
michael@568: # list of sources
michael@569: Source0: http://libdnet.googlecode.com/files/libdnet-%{version}.tgz
michael@568:
michael@568: # build information
michael@569: BuildPreReq: OpenPKG, openpkg >= 20100101, bison, flex, make, perl, perl-sys
michael@569: PreReq: OpenPKG, openpkg >= 20100101
michael@568:
michael@568: %description
michael@568: libdnet provides a simplified, portable interface to several
michael@568: low-level networking routines, including network address
michael@568: manipulation, kernel arp(4) cache and route(4) table lookup and
michael@568: manipulation, network firewalling (IP filter, ipfw, ipchains,
michael@568: pf, ...), network interface lookup and manipulation, raw IP
michael@568: packet and Ethernet frame, and data transmission.
michael@568:
michael@568: %track
michael@568: prog libdnet = {
michael@568: version = %{version}
michael@569: url = http://libdnet.googlecode.com/files/
michael@569: regex = libdnet-(__VER__)\.tgz
michael@568: }
michael@568:
michael@568: %prep
michael@568: %setup -q
michael@568: %{l_prefix}/bin/perl \
michael@568: -e 'use IO::All; $_io("configure");'
michael@568: %{l_shtool} subst \
michael@568: -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
michael@568: configure
michael@568:
michael@568: %build
michael@568: case "%{l_platform -t}" in
michael@568: *-freebsd5* ) echo "ac_cv_header_netinet_ip_fw_h=no" >config.cache ;;
michael@569: *-sunos* ) echo "ac_cv_dnet_linux_pf_packet=no" >config.cache ;;
michael@568: esac
michael@568: CC="%{l_cc}" \
michael@568: CFLAGS="%{l_cflags -O}" \
michael@568: ./configure \
michael@568: --cache-file=./config.cache \
michael@569: --prefix=%{l_prefix} \
michael@569: --disable-shared
michael@568: %{l_make} %{l_mflags -O}
michael@568:
michael@568: %install
michael@568: %{l_shtool} mkdir -p $RPM_BUILD_ROOT%{l_prefix}/man/man3
michael@568: %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@568: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@568:
michael@568: %files -f files
michael@568:
michael@568: %clean
michael@568: