awstats.spec 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. ##
  2. ## awstats.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. # FIXME: rse: needs a basic cleanup, please!
  25. # package information
  26. Name: awstats
  27. Summary: Powerful Server Logfile Analyzer
  28. URL: http://awstats.sourceforge.org/
  29. Vendor: Laurent Destailleur
  30. Packager: OpenPKG
  31. Distribution: OpenPKG
  32. Class: JUNK
  33. Group: Mail
  34. License: GPL
  35. Version: 6.5
  36. Release: 20050928
  37. # list of sources
  38. Source0: http://awstats.sourceforge.net/files/awstats-%{version}.tar.gz
  39. Source1: awstats.postfix.conf
  40. Source2: awstats.apache.conf
  41. Source3: rc.awstats
  42. Patch0: awstats.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130
  47. PreReq: OpenPKG, openpkg >= 20040130, perl
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. AWStats (Advanced Web Statistics) is a powerful and featureful
  52. web server logfile analyzer that shows you all your Web statistics
  53. including visitors, pages, hits, hours, search engines, keywords
  54. used to find your site, broken links, robots and more... It works
  55. with IIS 5.0+, Apache and all major web, wap, proxy, streaming
  56. server log files (and even ftp servers or mail logs) on all
  57. Operating Systems.
  58. NOTE: This package is optimized for Postfix and Apache mail
  59. statistics
  60. %track
  61. prog awstats = {
  62. version = %{version}
  63. url = http://awstats.sourceforge.net/files/
  64. regex = awstats-(__VER__)\.tar.gz
  65. }
  66. %prep
  67. %setup -q
  68. %patch -p0
  69. %build
  70. %install
  71. rm -rf $RPM_BUILD_ROOT
  72. %{l_shtool} mkdir -f -p -m 755 \
  73. $RPM_BUILD_ROOT%{l_prefix}/etc/awstats \
  74. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  75. $RPM_BUILD_ROOT%{l_prefix}/share/awstats/js \
  76. $RPM_BUILD_ROOT%{l_prefix}/share/awstats/lib \
  77. $RPM_BUILD_ROOT%{l_prefix}/share/awstats/css \
  78. $RPM_BUILD_ROOT%{l_prefix}/share/awstats/lang \
  79. $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/browser \
  80. $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/clock \
  81. $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/flags \
  82. $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/os \
  83. $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/cpu \
  84. $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/other \
  85. $RPM_BUILD_ROOT%{l_prefix}/var/awstats \
  86. $RPM_BUILD_ROOT%{l_prefix}/web/awstats \
  87. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  88. $RPM_BUILD_ROOT%{l_prefix}/cgi
  89. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  90. %{SOURCE awstats.postfix.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/awstats/
  91. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  92. %{SOURCE awstats.apache.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/awstats/
  93. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  94. %{SOURCE rc.awstats} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  95. %{l_shtool} install -c -m 644 \
  96. wwwroot/js/* $RPM_BUILD_ROOT%{l_prefix}/share/awstats/js/
  97. %{l_shtool} install -c -m 644 \
  98. wwwroot/cgi-bin/lib/* $RPM_BUILD_ROOT%{l_prefix}/share/awstats/lib/
  99. %{l_shtool} install -c -m 644 \
  100. wwwroot/css/* $RPM_BUILD_ROOT%{l_prefix}/share/awstats/css/
  101. %{l_shtool} install -c -m 644 \
  102. wwwroot/icon/browser/* $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/browser/
  103. %{l_shtool} install -c -m 644 \
  104. wwwroot/icon/clock/* $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/clock/
  105. %{l_shtool} install -c -m 644 \
  106. wwwroot/icon/cpu/* $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/cpu/
  107. %{l_shtool} install -c -m 644 \
  108. wwwroot/icon/flags/* $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/flags/
  109. %{l_shtool} install -c -m 644 \
  110. wwwroot/icon/os/* $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/os/
  111. %{l_shtool} install -c -m 644 \
  112. wwwroot/icon/other/* $RPM_BUILD_ROOT%{l_prefix}/share/awstats/icon/other/
  113. %{l_shtool} install -c -m 644 \
  114. wwwroot/cgi-bin/lang/* $RPM_BUILD_ROOT%{l_prefix}/share/awstats/lang/
  115. %{l_shtool} install -c -m 755 \
  116. -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;g' \
  117. -e 's;/etc/opt;%{l_prefix}/etc;g' \
  118. -e 's;/usr/share/awstats/lib;%{l_prefix}/share/awstats/lib;g' \
  119. wwwroot/cgi-bin/awstats.pl \
  120. $RPM_BUILD_ROOT%{l_prefix}/sbin/awstats
  121. %{l_shtool} install -c -m 755 \
  122. -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;g' \
  123. tools/maillogconvert.pl \
  124. $RPM_BUILD_ROOT%{l_prefix}/sbin/maillogconvert
  125. %{l_shtool} install -c -m 755 \
  126. -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;g' \
  127. tools/awstats_updateall.pl \
  128. $RPM_BUILD_ROOT%{l_prefix}/sbin/awstats_updateall
  129. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  130. %files -f files
  131. %clean
  132. rm -rf $RPM_BUILD_ROOT