apache-extfwd.spec 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ##
  2. ## apache-extfwd.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package information
  24. Name: apache-extfwd
  25. Summary: Apache Extension: Extract X-Forwarded-For Header
  26. URL: http://www.openinfo.co.uk/apache/
  27. Vendor: Richard Barrett
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: Web
  32. License: Open Source
  33. Version: 2.0.2
  34. Release: 20080102
  35. # list of sources
  36. Source0: http://www.openinfo.co.uk/apache/extract_forwarded-%{version}.tar.gz
  37. Source1: apache-extfwd.conf
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20060823, make
  42. PreReq: OpenPKG, openpkg >= 20060823
  43. BuildPreReq: apache, apache::with_mod_proxy = yes, apr
  44. PreReq: apache, apache::with_mod_proxy = yes, apr
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. This is the X-Forwarded-For header extraction extension module for
  49. the Apache HTTP webserver.
  50. %track
  51. prog apache-extfwd = {
  52. version = %{version}
  53. url = http://www.openinfo.co.uk/apache/
  54. regex = extract_forwarded-(__VER__)\.tar\.gz
  55. }
  56. %prep
  57. %setup -q -n extract_forwarded
  58. %build
  59. # build module
  60. %{l_prefix}/sbin/apxs -c mod_extract_forwarded.c
  61. %install
  62. # install module
  63. rm -rf $RPM_BUILD_ROOT
  64. %{l_shtool} mkdir -f -p -m 755 \
  65. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d \
  66. $RPM_BUILD_ROOT%{l_prefix}/libexec/apache
  67. %{l_shtool} install -c -m 755 \
  68. .libs/mod_extract_forwarded.so \
  69. $RPM_BUILD_ROOT%{l_prefix}/libexec/apache/mod_extract_forwarded.so
  70. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  71. %{SOURCE apache-extfwd.conf} \
  72. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d/
  73. # determine installation files
  74. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  75. %{l_files_std} \
  76. '%config %{l_prefix}/etc/apache/apache.d/apache-extfwd.conf'
  77. %files -f files
  78. %clean
  79. rm -rf $RPM_BUILD_ROOT
  80. %post
  81. # after upgrade, restart service
  82. [ $1 -eq 2 ] || exit 0
  83. eval `%{l_rc} apache status 2>/dev/null`
  84. [ ".$apache_active" = .yes ] && %{l_rc} apache restart
  85. exit 0