j2ee.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. ##
  2. ## j2ee.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 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 [PRIV]
  36. Group: Language
  37. License: Commercial
  38. Version: %{V_openpkg}
  39. Release: 20021110
  40. # list of sources
  41. Source0: j2sdkee-%{V_sunjava}-solsparc.sh
  42. Source0: j2sdkee-%{V_sunjava}-linux.tar.gz
  43. Source3: rc.%{name}
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20020714, JRE, tar, gzip
  48. PreReq: OpenPKG, openpkg >= 20020714, JRE
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. J2EE technology and its component based model simplifies
  53. enterprise development and deployment. The J2EE platform manages
  54. the infrastructure and supports the Web services to enable
  55. development of secure, robust and interoperable business
  56. applications.
  57. The J2EE SDK is intended as a proof of concept and example for
  58. implementations in the application server marketplace. The J2EE
  59. SDK includes a J2EE application server and various tools to help
  60. developers prototype J2EE applications and learn about the J2EE
  61. platform and technologies. It can be used as a J2EE development
  62. enviroment for applications prior to their deployment and
  63. distribution.
  64. %prep
  65. %setup -q -c %{name} -T
  66. %build
  67. %install
  68. rm -rf $RPM_BUILD_ROOT
  69. # create installation tree
  70. %{l_shtool} mkdir -f -p -m 755 \
  71. $RPM_BUILD_ROOT%{l_prefix}/bin \
  72. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  73. $RPM_BUILD_ROOT%{l_prefix}/libexec
  74. # unpack vendor distribution
  75. ( umask 022
  76. cd $RPM_BUILD_ROOT%{l_prefix}/libexec
  77. case "%{l_target}" in
  78. ix86-freebsd4* )
  79. %{l_gzip} -d -c %{SOURCE j2sdkee-%{V_sunjava}-linux.tar.gz} |\
  80. %{l_tar} xf -
  81. mv j2sdkee%{V_filesys} %{name}
  82. find %{name}/bin -type f -print | xargs chmod u+w
  83. brandelf -t Linux \
  84. `find %{name}/bin/ -type f -print` \
  85. >/dev/null 2>&1 || true
  86. ;;
  87. ix86-linux2.[2-5]* )
  88. %{l_gzip} -d -c %{SOURCE j2sdkee-%{V_sunjava}-linux.tar.gz} |\
  89. %{l_tar} xf -
  90. mv j2sdkee%{V_filesys} %{name}
  91. ;;
  92. sparc64-solaris2.[6-9]* )
  93. echo "yes" | sh %{SOURCE j2sdkee-%{V_sunjava}-solsparc.sh} >/dev/null
  94. mv j2sdkee%{V_filesys} %{name}
  95. ;;
  96. * )
  97. echo "Sorry, unsupported architecture '%{l_target}'" 1>&2
  98. exit 1
  99. ;;
  100. esac
  101. )
  102. # activate binaries
  103. ( cd $RPM_BUILD_ROOT%{l_prefix}/bin
  104. for bin in cleanup j2ee packager \
  105. cloudscape j2eeadmin realmtool \
  106. deploytool runclient verifier; do
  107. ln -s ../libexec/%{name}/bin/$bin .
  108. done
  109. )
  110. # install run-command script
  111. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  112. %{SOURCE rc.%{name}} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  113. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  114. %files -f files
  115. %clean
  116. rm -rf $RPM_BUILD_ROOT