libdnet/libdnet.spec

Tue, 28 Aug 2012 18:34:30 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:34:30 +0200
changeset 568
f43677a707f3
child 569
0bfe61798a56
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

michael@568 1 ##
michael@568 2 ## libdnet.spec -- OpenPKG RPM Package Specification
michael@568 3 ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@568 4 ##
michael@568 5 ## Permission to use, copy, modify, and distribute this software for
michael@568 6 ## any purpose with or without fee is hereby granted, provided that
michael@568 7 ## the above copyright notice and this permission notice appear in all
michael@568 8 ## copies.
michael@568 9 ##
michael@568 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@568 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@568 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@568 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@568 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@568 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@568 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@568 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@568 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@568 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@568 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@568 21 ## SUCH DAMAGE.
michael@568 22 ##
michael@568 23
michael@568 24 # package information
michael@568 25 Name: libdnet
michael@568 26 Summary: Network Client Library
michael@568 27 URL: http://libdnet.sourceforge.net/
michael@568 28 Vendor: Dug Song
michael@568 29 Packager: OpenPKG Foundation e.V.
michael@568 30 Distribution: OpenPKG Community
michael@568 31 Class: PLUS
michael@568 32 Group: Network
michael@568 33 License: MIT-style
michael@568 34 Version: 1.11
michael@568 35 Release: 20080101
michael@568 36
michael@568 37 # list of sources
michael@568 38 Source0: http://switch.dl.sourceforge.net/sourceforge/libdnet/libdnet-%{version}.tar.gz
michael@568 39
michael@568 40 # build information
michael@568 41 Prefix: %{l_prefix}
michael@568 42 BuildRoot: %{l_buildroot}
michael@568 43 BuildPreReq: OpenPKG, openpkg >= 20040130, bison, flex, make, perl, perl-sys
michael@568 44 PreReq: OpenPKG, openpkg >= 20040130
michael@568 45 AutoReq: no
michael@568 46 AutoReqProv: no
michael@568 47
michael@568 48 %description
michael@568 49 libdnet provides a simplified, portable interface to several
michael@568 50 low-level networking routines, including network address
michael@568 51 manipulation, kernel arp(4) cache and route(4) table lookup and
michael@568 52 manipulation, network firewalling (IP filter, ipfw, ipchains,
michael@568 53 pf, ...), network interface lookup and manipulation, raw IP
michael@568 54 packet and Ethernet frame, and data transmission.
michael@568 55
michael@568 56 %track
michael@568 57 prog libdnet = {
michael@568 58 version = %{version}
michael@568 59 url = http://libdnet.sourceforge.net/
michael@568 60 regex = libdnet-(__VER__)\.tar\.gz
michael@568 61 }
michael@568 62
michael@568 63 %prep
michael@568 64 %setup -q
michael@568 65 %{l_prefix}/bin/perl \
michael@568 66 -e 'use IO::All; $_<io("configure"); s/(")(\n\s+\|\| test)/$1 \\$2/sg; $_>io("configure");'
michael@568 67 %{l_shtool} subst \
michael@568 68 -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
michael@568 69 configure
michael@568 70
michael@568 71 %build
michael@568 72 case "%{l_platform -t}" in
michael@568 73 *-freebsd5* ) echo "ac_cv_header_netinet_ip_fw_h=no" >config.cache ;;
michael@568 74 esac
michael@568 75 CC="%{l_cc}" \
michael@568 76 CFLAGS="%{l_cflags -O}" \
michael@568 77 ./configure \
michael@568 78 --disable-shared \
michael@568 79 --cache-file=./config.cache \
michael@568 80 --prefix=%{l_prefix}
michael@568 81 %{l_make} %{l_mflags -O}
michael@568 82
michael@568 83 %install
michael@568 84 rm -rf $RPM_BUILD_ROOT
michael@568 85 %{l_shtool} mkdir -p $RPM_BUILD_ROOT%{l_prefix}/man/man3
michael@568 86 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@568 87 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@568 88
michael@568 89 %files -f files
michael@568 90
michael@568 91 %clean
michael@568 92 rm -rf $RPM_BUILD_ROOT
michael@568 93

mercurial