Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
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@569 | 34 | Version: 1.12 |
michael@569 | 35 | Release: 20120800 |
michael@568 | 36 | |
michael@568 | 37 | # list of sources |
michael@569 | 38 | Source0: http://libdnet.googlecode.com/files/libdnet-%{version}.tgz |
michael@568 | 39 | |
michael@568 | 40 | # build information |
michael@569 | 41 | BuildPreReq: OpenPKG, openpkg >= 20100101, bison, flex, make, perl, perl-sys |
michael@569 | 42 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@568 | 43 | |
michael@568 | 44 | %description |
michael@568 | 45 | libdnet provides a simplified, portable interface to several |
michael@568 | 46 | low-level networking routines, including network address |
michael@568 | 47 | manipulation, kernel arp(4) cache and route(4) table lookup and |
michael@568 | 48 | manipulation, network firewalling (IP filter, ipfw, ipchains, |
michael@568 | 49 | pf, ...), network interface lookup and manipulation, raw IP |
michael@568 | 50 | packet and Ethernet frame, and data transmission. |
michael@568 | 51 | |
michael@568 | 52 | %track |
michael@568 | 53 | prog libdnet = { |
michael@568 | 54 | version = %{version} |
michael@569 | 55 | url = http://libdnet.googlecode.com/files/ |
michael@569 | 56 | regex = libdnet-(__VER__)\.tgz |
michael@568 | 57 | } |
michael@568 | 58 | |
michael@568 | 59 | %prep |
michael@568 | 60 | %setup -q |
michael@568 | 61 | %{l_prefix}/bin/perl \ |
michael@568 | 62 | -e 'use IO::All; $_<io("configure"); s/(")(\n\s+\|\| test)/$1 \\$2/sg; $_>io("configure");' |
michael@568 | 63 | %{l_shtool} subst \ |
michael@568 | 64 | -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \ |
michael@568 | 65 | configure |
michael@568 | 66 | |
michael@568 | 67 | %build |
michael@568 | 68 | case "%{l_platform -t}" in |
michael@568 | 69 | *-freebsd5* ) echo "ac_cv_header_netinet_ip_fw_h=no" >config.cache ;; |
michael@569 | 70 | *-sunos* ) echo "ac_cv_dnet_linux_pf_packet=no" >config.cache ;; |
michael@568 | 71 | esac |
michael@568 | 72 | CC="%{l_cc}" \ |
michael@568 | 73 | CFLAGS="%{l_cflags -O}" \ |
michael@568 | 74 | ./configure \ |
michael@568 | 75 | --cache-file=./config.cache \ |
michael@569 | 76 | --prefix=%{l_prefix} \ |
michael@569 | 77 | --disable-shared |
michael@568 | 78 | %{l_make} %{l_mflags -O} |
michael@568 | 79 | |
michael@568 | 80 | %install |
michael@568 | 81 | %{l_shtool} mkdir -p $RPM_BUILD_ROOT%{l_prefix}/man/man3 |
michael@568 | 82 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@568 | 83 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@568 | 84 | |
michael@568 | 85 | %files -f files |
michael@568 | 86 | |
michael@568 | 87 | %clean |
michael@568 | 88 |