mtr.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ##
  2. ## mtr.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: mtr
  27. Summary: Network Diagnostic Tool
  28. URL: http://www.bitwizard.nl/mtr/
  29. Vendor: BitWizard B.V.
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: PLUS
  33. Group: Network
  34. License: GPL
  35. Version: 0.55
  36. Release: 20040401
  37. # package options
  38. %option with_x11 no
  39. # list of sources
  40. Source0: ftp://ftp.bitwizard.nl/mtr/mtr-%{version}.tar.gz
  41. Patch0: mtr.patch
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130, ncurses
  46. PreReq: OpenPKG, openpkg >= 20040130, ncurses
  47. %if "%{with_x11}" == "yes"
  48. BuildPreReq: X11, gtk
  49. PreReq: X11, gtk
  50. %endif
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. mtr combines the functionality of the traceroute(8) and ping(8)
  55. programs in a single network diagnostic tool.
  56. %track
  57. prog mtr = {
  58. version = %{version}
  59. url = ftp://ftp.bitwizard.nl/mtr/
  60. regex = mtr-(__VER__)\.tar\.gz
  61. }
  62. %prep
  63. %setup -q
  64. %patch -p0
  65. %build
  66. %{l_shtool} subst \
  67. -e 's;autoconf;true;g' \
  68. -e 's;automake;true;g' \
  69. -e 's;autoheader;true;g' \
  70. configure
  71. echo 'ac_cv_lib_termcap_tgetent=no' >config.cache
  72. CC="%{l_cc}" \
  73. CFLAGS="%{l_cflags -O}" \
  74. CPPFLAGS="%{l_cppflags}" \
  75. LDFLAGS="%{l_ldflags}" \
  76. ./configure \
  77. --prefix=%{l_prefix} \
  78. %if "%{with_x11}" == "yes"
  79. --with-x \
  80. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  81. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  82. --with-gtk-prefix=%{l_prefix}
  83. %else
  84. --without-x \
  85. --without-gtk
  86. %endif
  87. %{l_shtool} subst \
  88. -e 's;^AUTOCONF =.*;AUTOCONF = true;' \
  89. -e 's;^AUTOMAKE =.*;AUTOMAKE = true;' \
  90. -e 's;^AUTOHEADER =.*;AUTOHEADER = true;' \
  91. Makefile
  92. %{l_make} %{l_mflags -O}
  93. %install
  94. rm -rf $RPM_BUILD_ROOT
  95. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  96. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  97. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  98. %{l_files_std} \
  99. '%attr(4755,%{l_susr},%{l_musr}) %{l_prefix}/sbin/mtr'
  100. %files -f files
  101. %clean
  102. rm -rf $RPM_BUILD_ROOT