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