pgfouine.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ##
  2. ## pgfouine.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 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 versions
  25. %define V_pgfouine 0.7.2
  26. %define V_pgfouine_dir 1191
  27. # package information
  28. Name: pgfouine
  29. Summary: PostgreSQL Log Analyzer
  30. URL: http://pgfouine.projects.postgresql.org/
  31. Vendor: Guillaume Smet
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: EVAL
  35. Group: Database
  36. License: GPL
  37. Version: %{V_pgfouine}
  38. Release: 20061212
  39. # list of sources
  40. Source0: http://pgfoundry.org/frs/download.php/%{V_pgfouine_dir}/pgfouine-%{V_pgfouine}.tar.gz
  41. Patch0: pgfouine.patch
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130
  46. PreReq: OpenPKG, openpkg >= 20040130
  47. PreReq: php, php::with_gd = yes, php::with_pcre = yes
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. pgFouine is a PostgreSQL log analyzer designed to parse big log
  52. files with a low memory footprint. You can generate text or HTML
  53. reports containing aggregated information about the queries executed
  54. by your database.
  55. %track
  56. prog pgfouine = {
  57. version = %{V_pgfouine}.%{V_pgfouine_dir}
  58. url = http://pgfouine.projects.postgresql.org/
  59. regex = download.php/(\d+/pgfouine-(\d+(\.\d+)+))\.tar\.gz
  60. transform = "s/^(\\d+)\/pgfouine-(.+)$/$2.$1/; $_"
  61. }
  62. %prep
  63. %setup -q
  64. sed <%{PATCH0} -e 's;@include_path@;%{l_prefix}/share/pgfouine;g' | %{l_patch} -p0 -b
  65. %{l_shtool} subst \
  66. -e 's;^#! /usr\(/bin/php \)\(-qC.*\)$;#!%{l_prefix}\1-dsafe_mode=off \2;' \
  67. pgfouine*.php
  68. %build
  69. :
  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}/share/pgfouine/include
  75. %{l_shtool} install -c -m 755 \
  76. pgfouine*.php \
  77. $RPM_BUILD_ROOT%{l_prefix}/bin/
  78. %{l_shtool} install -c -m 644 \
  79. version.php \
  80. $RPM_BUILD_ROOT%{l_prefix}/share/pgfouine/
  81. %{l_tar} cf - -C include/ . | \
  82. %{l_tar} xvf - -C $RPM_BUILD_ROOT%{l_prefix}/share/pgfouine/include/
  83. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  84. %files -f files
  85. %clean
  86. rm -rf $RPM_BUILD_ROOT