iozone.spec 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. ##
  2. ## iozone.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package version
  25. %define V_logic 3.242
  26. %define V_real 3_242
  27. # package information
  28. Name: iozone
  29. Summary: Filesystem Benchmark
  30. URL: http://www.iozone.org/
  31. Vendor: William D. Norcott
  32. Packager: OpenPKG
  33. Distribution: OpenPKG
  34. Class: PLUS
  35. Group: Benchmark
  36. License: Open Source
  37. Version: %{V_logic}
  38. Release: 20050621
  39. # list of sources
  40. Source0: http://www.iozone.org/src/current/iozone%{V_real}.tar
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make
  45. PreReq: OpenPKG, openpkg >= 20040130
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. IOzone is a filesystem benchmark tool. The benchmark generates and
  50. measures a variety of file operations. Iozone has been ported to
  51. many machines and runs under many operating systems.
  52. %track
  53. prog iozone = {
  54. version = %{V_real}
  55. url = http://www.iozone.org/src/current/
  56. regex = iozone(__VER__)\.tar
  57. }
  58. %prep
  59. %setup -q -n iozone%{V_real}
  60. chmod 644 src/current/makefile
  61. %{l_shtool} subst -e 's;-Dlinux;-Dlinux $(MADV);' src/current/makefile
  62. %build
  63. cd src/current
  64. platform="generic"
  65. defs=""
  66. case "%{l_platform -t}" in
  67. *-freebsd* ) platform="freebsd" ;;
  68. *-linux2.2* ) platform="linux"
  69. defs="-DNO_MADVISE" ;;
  70. *-linux* ) platform="linux" ;;
  71. *-sunos* ) platform="Solaris" ;;
  72. esac
  73. %{l_make} %{l_mflags} \
  74. CC="%{l_cc}" CFLAGS="%{l_cflags -O}" MADV="$defs" \
  75. $platform
  76. %install
  77. rm -rf $RPM_BUILD_ROOT
  78. %{l_shtool} mkdir -f -p -m 755 \
  79. $RPM_BUILD_ROOT%{l_prefix}/bin \
  80. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  81. %{l_shtool} install -c -s -m 755 \
  82. src/current/iozone $RPM_BUILD_ROOT%{l_prefix}/bin/
  83. %{l_shtool} install -c -m 644 \
  84. docs/iozone.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  85. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  86. %files -f files
  87. %clean
  88. rm -rf $RPM_BUILD_ROOT