analog.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. ##
  2. ## analog.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 information
  26. Name: analog
  27. Summary: Website Logfile Analysing and Reporting
  28. URL: http://www.analog.cx/
  29. Vendor: Stephen Turner
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [BASE]
  32. Group: Web
  33. License: GPL
  34. Version: 5.32
  35. Release: 20030919
  36. # list of sources
  37. Source0: http://www.analog.cx/analog-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20030909, make
  42. PreReq: OpenPKG, openpkg >= 20030909
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. Analog is a program to measure the usage on your web server. It
  47. tells you which pages are most popular, which countries people are
  48. visiting from, which sites they tried to follow broken links from,
  49. and all sorts of other useful information.
  50. %prep
  51. %setup -q
  52. %build
  53. cd src
  54. libs="-lm"
  55. case "%{l_platform -t}" in
  56. *-sunos5* ) libs="-lnsl $libs" ;;
  57. esac
  58. %{l_make} %{l_mflags} \
  59. CC="%{l_cc}" \
  60. CFLAGS='%{l_cflags -O} -DDEFAULTCONFIGFILE=\"%{l_prefix}/etc/analog/analog.cfg\"' \
  61. LIBS="$libs"
  62. %install
  63. rm -rf $RPM_BUILD_ROOT
  64. %{l_shtool} mkdir -f -p -m 755 \
  65. $RPM_BUILD_ROOT%{l_prefix}/bin \
  66. $RPM_BUILD_ROOT%{l_prefix}/etc/analog \
  67. $RPM_BUILD_ROOT%{l_prefix}/share/analog/image \
  68. $RPM_BUILD_ROOT%{l_prefix}/share/analog/lang
  69. %{l_shtool} install -c -s -m 755 \
  70. analog $RPM_BUILD_ROOT%{l_prefix}/bin/
  71. %{l_shtool} install -c -m 644 \
  72. -e 's;^# LANGFILE uk.lng;LANGFILE %{l_prefix}/share/analog/lang/uk.lng;' \
  73. -e 's;^# DOMAINSFILE ukdom.tab;DOMAINSFILE %{l_prefix}/share/analog/lang/ukdom.tab;' \
  74. -e 's;^# DESCFILE ukdesc.txt;DESCFILE %{l_prefix}/share/analog/lang/ukdesc.txt;' \
  75. examples/big.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/analog/analog.cfg
  76. %{l_shtool} install -c -m 644 \
  77. images/* $RPM_BUILD_ROOT%{l_prefix}/share/analog/image/
  78. %{l_shtool} install -c -m 644 \
  79. lang/* $RPM_BUILD_ROOT%{l_prefix}/share/analog/lang/
  80. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  81. %{l_files_std} \
  82. '%config %{l_prefix}/etc/analog/analog.cfg'
  83. %files -f files
  84. %clean
  85. rm -rf $RPM_BUILD_ROOT