Import new package spec for introduction into repository.

Mon, 21 Mar 2011 23:53:34 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 21 Mar 2011 23:53:34 +0100
changeset 312
c71ec3f2c0da
parent 311
263143ec0fb2
child 313
fc0449ec63bb

Import new package spec for introduction into repository.

netperf/netperf.patch file | annotate | diff | comparison | revisions
netperf/netperf.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netperf/netperf.patch	Mon Mar 21 23:53:34 2011 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +diff -Nau configure.orig configure
     1.5 +Index: configure
     1.6 +--- configure.orig	2011-03-21 09:30:50.934813866 +0100
     1.7 ++++ configure	2011-03-21 09:31:27.459048318 +0100
     1.8 +@@ -8748,6 +8748,7 @@
     1.9 + cat confdefs.h >>conftest.$ac_ext
    1.10 + cat >>conftest.$ac_ext <<_ACEOF
    1.11 + /* end confdefs.h.  */
    1.12 ++#include <sys/socket.h>
    1.13 + #include <netinet/sctp.h>
    1.14 + 
    1.15 + int
    1.16 +diff -Nau src/net_uuid.c.orig src/net_uuid.c
    1.17 +Index: src/net_uuid.c
    1.18 +--- src/net_uuid.c.orig	2008-10-25 01:13:44.000000000 +0200
    1.19 ++++ src/net_uuid.c	2011-03-21 14:23:16.000000000 +0100
    1.20 +@@ -38,8 +38,10 @@
    1.21 + #else
    1.22 + #include <sys/types.h>
    1.23 + #include <sys/time.h>
    1.24 ++#if !defined(__APPLE__) && !defined(__MACH__)
    1.25 + #include <sys/sysinfo.h>
    1.26 + #endif
    1.27 ++#endif
    1.28 + 
    1.29 + /* system dependent call to get the current system time. Returned as
    1.30 +    100ns ticks since UUID epoch, but resolution may be less than
    1.31 +diff -Nau src/nettest_bsd.c.orig src/nettest_bsd.c
    1.32 +Index: src/nettest_bsd.c
    1.33 +--- src/nettest_bsd.c.orig	2011-03-21 09:20:13.471888999 +0100
    1.34 ++++ src/nettest_bsd.c	2011-03-21 09:20:16.343927098 +0100
    1.35 +@@ -97,6 +97,7 @@
    1.36 + #endif /* NOSTDLIBH */
    1.37 + 
    1.38 + #ifdef WANT_SCTP
    1.39 ++#include <sys/socket.h>
    1.40 + #include <netinet/sctp.h>
    1.41 + #endif
    1.42 + 
    1.43 +diff -Nau src/nettest_sctp.c.orig src/nettest_sctp.c
    1.44 +Index: src/nettest_sctp.c
    1.45 +--- src/nettest_sctp.c.orig	2011-03-21 09:22:57.248890123 +0100
    1.46 ++++ src/nettest_sctp.c	2011-03-21 09:23:02.907197031 +0100
    1.47 +@@ -58,6 +58,7 @@
    1.48 + #include <netinet/sctp.h>
    1.49 + #include <arpa/inet.h>
    1.50 + #include <netdb.h>
    1.51 ++#include <strings.h>
    1.52 + 
    1.53 + /* would seem that not all sctp.h files define a MSG_EOF, but that
    1.54 +    MSG_EOF can be the same as MSG_FIN so lets work with that
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/netperf/netperf.spec	Mon Mar 21 23:53:34 2011 +0100
     2.3 @@ -0,0 +1,90 @@
     2.4 +##
     2.5 +##  netperf.spec -- OpenPKG RPM Package Specification
     2.6 +##  Copyright (c) 2011 Michael Schloh von Bennewitz <michael@schloh.com>
     2.7 +##
     2.8 +##  Permission to use, copy, modify, and distribute this software for
     2.9 +##  any purpose with or without fee is hereby granted, provided that
    2.10 +##  the above copyright notice and this permission notice appear in all
    2.11 +##  copies.
    2.12 +##
    2.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    2.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    2.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    2.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    2.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    2.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    2.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    2.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    2.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    2.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    2.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.24 +##  SUCH DAMAGE.
    2.25 +##
    2.26 +
    2.27 +#   package information
    2.28 +Name:         netperf
    2.29 +Summary:      Network Pipemeter
    2.30 +URL:          http://www.netperf.org/
    2.31 +Vendor:       Rick Jones
    2.32 +Packager:     Michael Schloh von Bennewitz
    2.33 +Distribution: Europalab Production
    2.34 +Class:        EVAL
    2.35 +Group:        Network
    2.36 +License:      Commercial
    2.37 +Version:      2.4.5
    2.38 +Release:      20110302
    2.39 +
    2.40 +#   list of sources
    2.41 +Source0:      ftp://ftp.netperf.org/netperf/netperf-%{version}.tar.bz2
    2.42 +Patch0:       netperf.patch
    2.43 +
    2.44 +#   build information
    2.45 +Prefix:       %{l_prefix}
    2.46 +BuildRoot:    %{l_buildroot}
    2.47 +BuildPreReq:  OpenPKG, openpkg >= 20040130
    2.48 +PreReq:       OpenPKG, openpkg >= 20040130
    2.49 +AutoReq:      no
    2.50 +AutoReqProv:  no
    2.51 +
    2.52 +%description
    2.53 +    Netperf is a benchmark that can be used to measure the performance
    2.54 +    of many different types of networking. It provides tests for both
    2.55 +    unidirecitonal throughput, and end to end latency. The environments
    2.56 +    currently measureable by netperf include TCP and UDP via BSD Sockets
    2.57 +    for both IPv4 and IPv6, DLPI, Unix Domain Sockets, and SCTP for both
    2.58 +    IPv4 and IPv6.
    2.59 +
    2.60 +%track
    2.61 +    prog netperf = {
    2.62 +        version   = %{version}
    2.63 +        url       = ftp://ftp.netperf.org/netperf/
    2.64 +        regex     = netperf-(__VER__)\.tar\.bz2
    2.65 +    }
    2.66 +
    2.67 +%prep
    2.68 +    %setup -q
    2.69 +    %patch -p0
    2.70 +
    2.71 +%build
    2.72 +    loclibs=''
    2.73 +    case "%{l_platform -t}" in
    2.74 +        *-sunos* ) loclibs="$loclibs -lkstat" ;;
    2.75 +    esac
    2.76 +    LIBS="$loclibs" \
    2.77 +    ./configure \
    2.78 +        --prefix=%{l_prefix} \
    2.79 +        --enable-burst \
    2.80 +        --enable-sctp
    2.81 +    %{l_make} %{l_mflags -O}
    2.82 +
    2.83 +%install
    2.84 +    rm -rf $RPM_BUILD_ROOT
    2.85 +    %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
    2.86 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/*
    2.87 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
    2.88 +
    2.89 +%files -f files
    2.90 +
    2.91 +%clean
    2.92 +    rm -rf $RPM_BUILD_ROOT
    2.93 +

mercurial