rrdtool.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ##
  2. ## rrdtool.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: rrdtool
  27. Summary: Round Robin Database
  28. URL: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
  29. Vendor: Tobias Oetiker
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: BASE
  33. Group: Database
  34. License: LGPL
  35. Version: 1.0.47
  36. Release: 20040405
  37. # list of sources
  38. Source0: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-%{version}.tar.gz
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20040130, perl, perl-openpkg >= 5.8.3-20040126, gcc
  43. PreReq: OpenPKG, openpkg >= 20040130, perl
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. RRD is the Acronym for Round Robin Database. RRD is a system
  48. to store and display time-series data (i.e. network bandwidth,
  49. machine-room temperature, server load average). It stores the
  50. data in a very compact way that will not expand over time, and it
  51. presents useful graphs by processing the data to enforce a certain
  52. data density. It can be used either via simple wrapper scripts (from
  53. shell or Perl) or via frontends that poll network devices and put a
  54. friendly user interface on it.
  55. %track
  56. prog rrdtool = {
  57. version = %{version}
  58. url = http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/
  59. regex = rrdtool-(__VER__)\.tar\.gz
  60. }
  61. %prep
  62. %setup -q
  63. %build
  64. # configure package
  65. echo "ac_cv_path_PERL=no" >config.cache
  66. CC="%{l_cc}" \
  67. CFLAGS="%{l_cflags -O}" \
  68. ./configure \
  69. --cache-file=./config.cache \
  70. --prefix=%{l_prefix} \
  71. --disable-shared
  72. # build package
  73. %{l_make} %{l_mflags -O}
  74. # build Perl part
  75. %{l_prefix}/bin/perl-openpkg prepare
  76. %{l_prefix}/bin/perl-openpkg -d perl-piped configure build
  77. %{l_prefix}/bin/perl-openpkg -d perl-shared configure build
  78. %install
  79. rm -rf $RPM_BUILD_ROOT
  80. # install package
  81. %{l_shtool} subst \
  82. -e 's/^\(install-data-am:\).*/\1/' \
  83. Makefile
  84. %{l_make} %{l_mflags} install \
  85. DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  86. # install Perl part
  87. %{l_prefix}/bin/perl-openpkg -d perl-piped install
  88. %{l_prefix}/bin/perl-openpkg -d perl-shared install
  89. # strip down installation hierarchy
  90. rm -rf $RPM_BUILD_ROOT%{l_prefix}/contrib
  91. rm -rf $RPM_BUILD_ROOT%{l_prefix}/doc
  92. rm -rf $RPM_BUILD_ROOT%{l_prefix}/html
  93. rm -rf $RPM_BUILD_ROOT%{l_prefix}/examples
  94. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  95. # post-process Perl part
  96. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  97. # determine installation files
  98. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  99. %{l_files_std} `cat perl-openpkg-files`
  100. %files -f files
  101. %clean
  102. rm -rf $RPM_BUILD_ROOT