nepim/nepim.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 189
1a7b9c850a13
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

     1 ##
     2 ##  nepim.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package information
    25 Name:         nepim
    26 Summary:      Network Pipemeter
    27 URL:          http://www.nongnu.org/nepim/
    28 Vendor:       Everton da Silva Marques
    29 Packager:     Michael Schloh von Bennewitz
    30 Distribution: Europalab Production
    31 Class:        EVAL
    32 Group:        Network
    33 License:      GPL
    34 Version:      0.53
    35 Release:      20110300
    37 #   list of sources
    38 Source0:      http://download.savannah.gnu.org/releases/nepim/nepim-%{version}.tar.gz
    40 #   build information
    41 Prefix:       %{l_prefix}
    42 BuildRoot:    %{l_buildroot}
    43 BuildPreReq:  OpenPKG, openpkg >= 20040130, make, pkgconfig
    44 PreReq:       OpenPKG, openpkg >= 20040130
    45 BuildPreReq:  liboop
    46 PreReq:       liboop
    47 AutoReq:      no
    48 AutoReqProv:  no
    50 %description
    51 Nepim stands for network pipemeter, a tool for measuring available
    52 bandwidth between hosts or generating network traffic for testing
    53 purposes. Nepim operates in client/server mode, is able to handle
    54 multiple parallel traffic streams, reports periodic partial
    55 statistics along the testing, accepts rich tuning from the command
    56 line, and supports multicast and IPv6.
    58 %track
    59     prog nepim = {
    60         version   = %{version}
    61         url       = http://www.very-clever.com/download/nongnu/nepim/
    62         regex     = nepim-(__VER__)\.tar\.gz
    63     }
    65 %prep
    66     %setup -q
    67     %{l_shtool} subst \
    68         -e 's;\(\t*\$(CC).*\);\1 $(LIBS);' \
    69         -e 's;\(\t*-DHAVE_.*\)\$(SPARC64);\1-DHAVE_GROUP_SOURCE_REQ;' \
    70         -e 's; *\$(SPARC64);;g' \
    71         -e 's;\$(DEBUG);;g' \
    72         -e 's;-ggdb;;g' \
    73         -e 's;-g;;g' \
    74         src/Makefile
    76 %build
    77     loclibs='-ldl'
    78     case "%{l_platform -t}" in
    79         *-sunos* ) loclibs="$loclibs -lsocket -lnsl" ;;
    80     esac
    81     cd src
    82     %{l_make} %{l_mflags -O} \
    83         CC="%{l_cc}" \
    84         CPPFLAGS="%{l_cppflags}" \
    85         LDFLAGS="%{l_ldflags}" \
    86         LIBS="$loclibs `pkg-config liboop --libs-only-l`" \
    87         OOP_BASE=%{l_prefix}
    89 %install
    90     rm -rf $RPM_BUILD_ROOT
    91     %{l_shtool} mkdir -f -p -m 755 \
    92         $RPM_BUILD_ROOT%{l_prefix}/bin
    93     %{l_shtool} install -c -s -m 755 \
    94         src/nepim \
    95         $RPM_BUILD_ROOT%{l_prefix}/bin/
    96     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
    98 %files -f files
   100 %clean
   101     rm -rf $RPM_BUILD_ROOT

mercurial