j2ee.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. ##
  2. ## j2ee.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 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 versions
  26. %define V_sunjava 1_3_1
  27. %define V_filesys 1.3.1
  28. %define V_openpkg 1.3.1
  29. # package information
  30. Name: j2ee
  31. Summary: Java 2 Platform, Enterprise Edition (J2EE)
  32. URL: http://java.sun.com/j2ee/
  33. Vendor: Sun Microsystems, Inc.
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG
  36. Class: EVAL
  37. Group: Language
  38. License: Commercial
  39. Version: %{V_openpkg}
  40. Release: 20040709
  41. # list of sources
  42. Source0: http://java.sun.com/j2ee/::/j2sdkee-%{V_sunjava}-solsparc.sh
  43. Source1: http://java.sun.com/j2ee/::/j2sdkee-%{V_sunjava}-linux.tar.gz
  44. Source2: rc.j2ee
  45. %NoSource 0
  46. %NoSource 1
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20040130, j2se
  51. PreReq: OpenPKG, openpkg >= 20040130, j2se
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. J2EE technology and its component based model simplifies
  56. enterprise development and deployment. The J2EE platform manages
  57. the infrastructure and supports the Web services to enable
  58. development of secure, robust and interoperable business
  59. applications.
  60. The J2EE SDK is intended as a proof of concept and example for
  61. implementations in the application server marketplace. The J2EE
  62. SDK includes a J2EE application server and various tools to help
  63. developers prototype J2EE applications and learn about the J2EE
  64. platform and technologies. It can be used as a J2EE development
  65. enviroment for applications prior to their deployment and
  66. distribution.
  67. %track
  68. prog j2ee = {
  69. disabled
  70. comment = "ms: no tracking possible"
  71. version = 1_3_1
  72. url = http://java.sun.com/j2ee/
  73. regex = j2sdkee-(__VER__)-solsparc.sh
  74. }
  75. %prep
  76. %setup -q -T -c
  77. %build
  78. %install
  79. rm -rf $RPM_BUILD_ROOT
  80. # create installation tree
  81. %{l_shtool} mkdir -f -p -m 755 \
  82. $RPM_BUILD_ROOT%{l_prefix}/bin \
  83. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  84. $RPM_BUILD_ROOT%{l_prefix}/libexec
  85. # unpack vendor distribution
  86. ( umask 022
  87. cd $RPM_BUILD_ROOT%{l_prefix}/libexec
  88. case "%{l_platform -t}" in
  89. ix86-freebsd[45]* )
  90. %{l_gzip} -d -c %{SOURCE j2sdkee-%{V_sunjava}-linux.tar.gz} |\
  91. %{l_tar} xf -
  92. mv j2sdkee%{V_filesys} j2ee
  93. find j2ee/bin -type f -print | xargs chmod u+w
  94. brandelf -t Linux \
  95. `find j2ee/bin/ -type f -print` \
  96. >/dev/null 2>&1 || true
  97. ;;
  98. ix86-linux2.[2-5]* )
  99. %{l_gzip} -d -c %{SOURCE j2sdkee-%{V_sunjava}-linux.tar.gz} |\
  100. %{l_tar} xf -
  101. mv j2sdkee%{V_filesys} j2ee
  102. ;;
  103. sparc64-sunos5.[6-9]* )
  104. echo "yes" | sh %{SOURCE j2sdkee-%{V_sunjava}-solsparc.sh} >/dev/null
  105. mv j2sdkee%{V_filesys} j2ee
  106. ;;
  107. * )
  108. echo "Sorry, unsupported architecture '%{l_platform -t}'" 1>&2
  109. exit 1
  110. ;;
  111. esac
  112. ) || exit $?
  113. # activate binaries
  114. ( cd $RPM_BUILD_ROOT%{l_prefix}/bin
  115. for bin in cleanup j2ee packager \
  116. cloudscape j2eeadmin realmtool \
  117. deploytool runclient verifier; do
  118. ln -s ../libexec/j2ee/bin/$bin .
  119. done
  120. ) || exit $?
  121. # install run-command script
  122. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  123. %{SOURCE rc.j2ee} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  124. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  125. %files -f files
  126. %clean
  127. rm -rf $RPM_BUILD_ROOT