tomcat.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. ##
  2. ## tomcat.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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: tomcat
  27. Summary: Apache Jakarta Tomcat
  28. URL: http://jakarta.apache.org/
  29. Vendor: Apache Software Foundation
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: Web
  33. License: Apache Software License 1.1
  34. Version: 3.2.4
  35. Release: 20021122
  36. # list of sources
  37. Source0: http://jakarta.apache.org/builds/jakarta-tomcat/release/v%{version}/bin/jakarta-tomcat-%{version}.tar.gz
  38. Source1: rc.tomcat
  39. Source2: tomcat.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20021120
  44. PreReq: OpenPKG, openpkg >= 20021120, JDK
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. Apache Jakarta Tomcat %{version} is a complete rewrite of Jserv and
  49. supplies the functionality of both a Servlet API 2.2 and a JSP 1.1
  50. compliant container.
  51. %prep
  52. %setup -q -n jakarta-tomcat-%{version}
  53. %build
  54. %install
  55. rm -rf $RPM_BUILD_ROOT
  56. # create installation tree
  57. %{l_shtool} mkdir -f -p -m 755 \
  58. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  59. $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat \
  60. $RPM_BUILD_ROOT%{l_prefix}/share/tomcat/doc \
  61. $RPM_BUILD_ROOT%{l_prefix}/var/tomcat/log
  62. # unpack vendor distribution and relocate to final location
  63. %{l_tar} -cf - --exclude lib/test \
  64. bin/*.sh bin/ant bin/antRun conf lib src webapps |\
  65. ( umask 022; \
  66. cd $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat/; \
  67. %{l_tar} -xf - )
  68. # patch vendor distribution
  69. ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat
  70. cat %{SOURCE tomcat.patch} |\
  71. sed -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0
  72. )
  73. # make scripts executable
  74. chmod 755 $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat/bin/*
  75. # install run-command script
  76. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  77. %{SOURCE rc.tomcat} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  78. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  79. %{l_files_std} \
  80. '%config %{l_prefix}/etc/tomcat/*'
  81. %files -f files
  82. %clean
  83. rm -rf $RPM_BUILD_ROOT