analog.spec 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ##
  2. ## analog.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.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 [REL]
  32. Group: Web
  33. License: GPL
  34. Version: 5.22
  35. Release: 20020321
  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 >= 20020206, make
  42. PreReq: OpenPKG, openpkg >= 20020206
  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. PATH="%{l_prefix}/bin:$PATH"; export PATH
  54. cd src
  55. libs="-lm"
  56. case "%{l_target}" in
  57. *-solaris* ) libs="-lnsl $libs" ;;
  58. esac
  59. %{l_make} %{l_mflags} \
  60. CC="%{l_cc}" \
  61. CFLAGS='%{l_cflags -O} -DDEFAULTCONFIGFILE=\"%{l_prefix}/etc/analog/analog.cfg\"' \
  62. LIBS="$libs"
  63. %install
  64. rm -rf $RPM_BUILD_ROOT
  65. %{l_shtool} mkdir -f -p -m 755 \
  66. $RPM_BUILD_ROOT%{l_prefix}/bin \
  67. $RPM_BUILD_ROOT%{l_prefix}/etc/analog \
  68. $RPM_BUILD_ROOT%{l_prefix}/share/analog/image \
  69. $RPM_BUILD_ROOT%{l_prefix}/share/analog/lang
  70. %{l_shtool} install -c -s -m 755 \
  71. analog $RPM_BUILD_ROOT%{l_prefix}/bin/
  72. %{l_shtool} install -c -m 644 \
  73. -e 's;^# LANGFILE uk.lng;LANGFILE %{l_prefix}/share/analog/lang/uk.lng;' \
  74. -e 's;^# DOMAINSFILE ukdom.tab;DOMAINSFILE %{l_prefix}/share/analog/lang/ukdom.tab;' \
  75. -e 's;^# DESCFILE ukdesc.txt;DESCFILE %{l_prefix}/share/analog/lang/ukdesc.txt;' \
  76. examples/big.cfg $RPM_BUILD_ROOT%{l_prefix}/etc/analog/analog.cfg
  77. %{l_shtool} install -c -m 644 \
  78. images/* $RPM_BUILD_ROOT%{l_prefix}/share/analog/image/
  79. %{l_shtool} install -c -m 644 \
  80. lang/* $RPM_BUILD_ROOT%{l_prefix}/share/analog/lang/
  81. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  82. %{l_files_std} \
  83. '%config %{l_prefix}/etc/analog/analog.cfg'
  84. %files -f files
  85. %clean
  86. rm -rf $RPM_BUILD_ROOT