talimat 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Tanım: Java Development Kit (JDK) adı verilen bir dizi program.
  2. # URL: http://openjdk.java.net/
  3. # Paketçi: milisarge
  4. # Gerekler: ccache unzip xorg-libxrender xorg-libxtst xorg-libxt zip cups alsa-lib
  5. # Grup: geliştirme
  6. isim=openjdk
  7. surum=8
  8. devir=1
  9. _java_ver=8
  10. _jdk_update=192
  11. _jdk_build=26
  12. pkgver=${_java_ver}.u${_jdk_update}
  13. _repo_ver=jdk${_java_ver}u${_jdk_update}-b${_jdk_build}
  14. kaynak=(http://hg.openjdk.java.net/jdk8u/jdk8u/archive/${_repo_ver}.tar.gz::jdk8u-${_repo_ver}.tar.gz
  15. http://hg.openjdk.java.net/jdk8u/jdk8u/corba/archive/${_repo_ver}.tar.gz::corba-${_repo_ver}.tar.gz
  16. http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/archive/${_repo_ver}.tar.gz::hotspot-${_repo_ver}.tar.gz
  17. http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/archive/${_repo_ver}.tar.gz::jdk-${_repo_ver}.tar.gz
  18. http://hg.openjdk.java.net/jdk8u/jdk8u/jaxws/archive/691079f04a6f.tar.gz::jaxws-691079f04a6f.tar.gz
  19. http://hg.openjdk.java.net/jdk8u/jdk8u/jaxp/archive/${_repo_ver}.tar.gz::jaxp-${_repo_ver}.tar.gz
  20. http://hg.openjdk.java.net/jdk8u/jdk8u/langtools/archive/${_repo_ver}.tar.gz::langtools-${_repo_ver}.tar.gz
  21. http://hg.openjdk.java.net/jdk8u/jdk8u/nashorn/archive/${_repo_ver}.tar.gz::nashorn-${_repo_ver}.tar.gz)
  22. derle() {
  23. _JARCH=amd64
  24. _jdkname=openjdk8
  25. _jvmdir=/usr/lib/jvm/java-8-openjdk
  26. _prefix="jdk8u-${_repo_ver}/image"
  27. _imgdir="${_prefix}/jvm/openjdk-1.8.0_$(printf '%.2d' ${_jdk_update})"
  28. _nonheadless=(bin/policytool
  29. lib/${_JARCH}/libjsound.so
  30. lib/${_JARCH}/libjsoundalsa.so
  31. lib/${_JARCH}/libsplashscreen.so)
  32. cd jdk8u-${_repo_ver}
  33. for subrepo in corba hotspot jdk jaxp langtools nashorn; do
  34. ln -s ../${subrepo}-${_repo_ver} ${subrepo}
  35. done
  36. ln -s ../jaxws-691079f04a6f jaxws
  37. unset JAVA_HOME
  38. # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1346
  39. export MAKEFLAGS=${MAKEFLAGS/-j*}
  40. # We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
  41. export CFLAGS="${CFLAGS//-O2/-O3} ${CPPFLAGS} -Wno-error=deprecated-declarations -Wno-error=return-type -Wno-error=cpp -fno-lifetime-dse -fno-delete-null-pointer-checks"
  42. export CXXFLAGS="${CXXFLAGS} ${CPPFLAGS}"
  43. install -d -m 755 "${SRC}/${_prefix}/"
  44. sed -i 's/gcc -V >&5//' configure
  45. sh configure \
  46. --prefix="${SRC}/${_prefix}" \
  47. --with-update-version="${_jdk_update}" \
  48. --with-build-number="b${_jdk_build}" \
  49. --with-milestone="fcs" \
  50. --enable-unlimited-crypto \
  51. --with-zlib=system \
  52. --with-extra-cflags="${CFLAGS}" \
  53. --with-extra-cxxflags="${CXXFLAGS}" \
  54. --with-extra-ldflags="${LDFLAGS}"
  55. # TODO OpenJDK does not want last version of giflib (add 'giflib' as dependency once fixed)
  56. #--with-giflib=system \
  57. # These help to debug builds: LOG=trace HOTSPOT_BUILD_JOBS=1
  58. # Without 'DEBUG_BINARIES', i686 won't build: http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-July/019203.html
  59. make
  60. make install
  61. cd ../${_imgdir}
  62. # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
  63. find . -iname '*.jar' -exec chmod ugo+r {} \;
  64. chmod ugo+r lib/ct.sym
  65. # remove redundant *diz and *debuginfo files
  66. find . -iname '*.diz' -exec rm {} \;
  67. find . -iname '*.debuginfo' -exec rm {} \;
  68. cd $SRC/${_imgdir}
  69. # Main files
  70. install -d -m 755 "${PKG}${_jvmdir}"
  71. install -d -m 755 "${PKG}${_jvmdir}/jre"
  72. cp -a include lib "${PKG}${_jvmdir}"
  73. cp -a jre/bin jre/lib "${PKG}${_jvmdir}/jre"
  74. # 'bin' files
  75. pushd bin
  76. # 'java-rmi.cgi' will be handled separately as it should not be in the PATH and has no man page
  77. for b in $(ls | grep -v java-rmi.cgi); do
  78. if [ -e ../jre/bin/${b} ]; then
  79. # Provide a link of the jre binary in the jdk/bin/ directory
  80. ln -s ../jre/bin/${b} "${PKG}${_jvmdir}/bin/${b}"
  81. else
  82. # Copy binary to jdk/bin/
  83. install -D -m 755 ${b} "${PKG}${_jvmdir}/bin/${b}"
  84. fi
  85. done
  86. popd
  87. # Handling 'java-rmi.cgi' separately
  88. install -D -m 755 bin/java-rmi.cgi "${PKG}${_jvmdir}/bin/java-rmi.cgi"
  89. # Set config files
  90. mv "${PKG}${_jvmdir}"/jre/lib/management/jmxremote.password{.template,}
  91. mv "${PKG}${_jvmdir}"/jre/lib/management/snmp.acl{.template,}
  92. # Link JKS keystore from ca-certificates-utils
  93. rm -f "${PKG}${_jvmdir}/jre/lib/security/cacerts"
  94. ln -sf /etc/ssl/certs/java/cacerts "${PKG}${_jvmdir}/jre/lib/security/cacerts"
  95. # Install license
  96. install -d -m 755 "${PKG}/usr/share/licenses/java8-openjdk/"
  97. install -m 644 ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README \
  98. "${PKG}/usr/share/licenses/java8-openjdk"
  99. ln -sf /usr/share/licenses/java8-openjdk "${PKG}/usr/share/licenses/${isim}"
  100. }