iozone.spec 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. ##
  2. ## iozone.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 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 version
  26. %define V_logic 3.207
  27. %define V_real 3_207
  28. # package information
  29. Name: iozone
  30. Summary: Filesystem Benchmark
  31. URL: http://www.iozone.org/
  32. Vendor: William D. Norcott
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [PLUS]
  35. Group: Benchmark
  36. License: Open Source
  37. Version: %{V_logic}
  38. Release: 20031115
  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 >= 20030909, gcc, make
  45. PreReq: OpenPKG, openpkg >= 20030909
  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. %prep
  53. %setup -q -c
  54. chmod 644 src/current/makefile
  55. %{l_shtool} subst -e 's;-Dlinux;-Dlinux $(MADV);' src/current/makefile
  56. %build
  57. cd src/current
  58. platform="generic"
  59. defs=""
  60. case "%{l_platform -t}" in
  61. *-freebsd* ) platform="freebsd" ;;
  62. *-linux2.2* ) platform="linux"
  63. defs="-DNO_MADVISE" ;;
  64. *-linux* ) platform="linux" ;;
  65. *-sunos* ) platform="Solaris" ;;
  66. esac
  67. %{l_make} %{l_mflags} \
  68. CC="%{l_cc}" CFLAGS="%{l_cflags -O}" MADV="$defs" \
  69. $platform
  70. %install
  71. rm -rf $RPM_BUILD_ROOT
  72. %{l_shtool} mkdir -f -p -m 755 \
  73. $RPM_BUILD_ROOT%{l_prefix}/bin \
  74. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  75. %{l_shtool} install -c -s -m 755 \
  76. src/current/iozone $RPM_BUILD_ROOT%{l_prefix}/bin/
  77. %{l_shtool} install -c -m 644 \
  78. docs/iozone.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  79. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  80. %files -f files
  81. %clean
  82. rm -rf $RPM_BUILD_ROOT