iozone.spec 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ##
  2. ## iozone.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2017 OpenPKG Foundation e.V. <http://openpkg.net/>
  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. ##
  23. # package version
  24. %define V_logic 3.471
  25. %define V_real 3_471
  26. # package information
  27. Name: iozone
  28. Summary: Filesystem Benchmark
  29. URL: http://www.iozone.org/
  30. Vendor: William D. Norcott
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: PLUS
  34. Group: Benchmark
  35. License: Open Source
  36. Version: %{V_logic}
  37. Release: 20170920
  38. # list of sources
  39. Source0: http://www.iozone.org/src/current/iozone%{V_real}.tar
  40. Patch0: iozone.patch
  41. # build information
  42. BuildPreReq: OpenPKG, openpkg >= 20160101, gcc, make
  43. PreReq: OpenPKG, openpkg >= 20160101
  44. %description
  45. IOzone is a filesystem benchmark tool. The benchmark generates and
  46. measures a variety of file operations. Iozone has been ported to
  47. many machines and runs under many operating systems.
  48. %track
  49. prog iozone = {
  50. version = %{V_real}
  51. url = http://www.iozone.org/src/current/
  52. regex = iozone(__VER__)\.tar
  53. }
  54. %prep
  55. %setup -q -n iozone%{V_real}
  56. %patch -p0
  57. chmod 644 src/current/makefile
  58. %{l_shtool} subst -e 's;-Dlinux;-Dlinux $(MADV);' src/current/makefile
  59. %build
  60. cd src/current
  61. platform="generic"
  62. defs=""
  63. case "%{l_platform -t}" in
  64. *-freebsd* ) platform="freebsd" ;;
  65. *-netbsd* ) platform="netbsd" ;;
  66. *-linux2.2* ) platform="linux"
  67. defs="-DNO_MADVISE" ;;
  68. *-linux* ) platform="linux" ;;
  69. *-sunos* ) platform="Solaris" ;;
  70. esac
  71. %{l_make} %{l_mflags} \
  72. CC="%{l_cc}" CFLAGS="%{l_cflags -O}" MADV="$defs" \
  73. $platform
  74. %install
  75. %{l_shtool} mkdir -f -p -m 755 \
  76. $RPM_BUILD_ROOT%{l_prefix}/bin \
  77. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  78. %{l_shtool} install -c -s -m 755 \
  79. src/current/iozone $RPM_BUILD_ROOT%{l_prefix}/bin/
  80. %{l_shtool} install -c -m 644 \
  81. docs/iozone.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  82. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  83. %files -f files
  84. %clean