extra/java7-openjdk to 7.u65_2.5.1-8

This commit is contained in:
Kevin Mihelich 2014-08-17 15:10:45 +00:00
parent 2d7f10aeb8
commit 9b527e37cf
7 changed files with 83 additions and 73 deletions

View file

@ -23,9 +23,9 @@ _JDK_UPDATE_VERSION=65
_bootstrap=0 # 0/1 for quick build or full bootstrap
pkgver=${_java_ver}.u${_JDK_UPDATE_VERSION}_${_icedtea_ver}
pkgrel=3
pkgrel=8
arch=('i686' 'x86_64')
url="http://icedtea.classpath.org"
url='http://icedtea.classpath.org'
license=('custom')
options=('!emptydirs')
makedepends=('jdk7-openjdk' 'libxp' 'libxslt'
@ -45,11 +45,7 @@ source=(${_icedtea_url}/source/icedtea-${_icedtea_ver}.tar.gz
icedtea_${_icedtea_ver}_hotspot.tar.bz2::${_drops_url}/hotspot.tar.bz2
fontconfig-paths.diff
openjdk7_nonreparenting-wm.diff
giflib_5.1.diff
jdk7-openjdk.profile
jdk7-openjdk.profile.csh
jre7-openjdk.profile
jre7-openjdk.profile.csh)
giflib_5.1.diff)
sha256sums=('06483c252099d41e33eade8ceee9231a15ba1e9594f90e2d32943d17c8802acd'
'0496072760c521aa184f3c26c1f515a89ef6f9a88df14fa888c6ee6cdd9379b7'
'd476f22db32e028cc30dda47fec81e5ba0e113f029c3ed7a30edf8fc1404819b'
@ -60,18 +56,14 @@ sha256sums=('06483c252099d41e33eade8ceee9231a15ba1e9594f90e2d32943d17c8802acd'
'78d57f7c207d8f56bba2ee6aec232a836fd51830d352cfa4804d8077d9a7b32b'
'9ad943ceb3dbcdf45d72974fc3667886a7ed65c69ab9abc17be5412827551a7f'
'56b919ababb13bd6afdcdaceb112b529b6e82539255f2dae9a7e5eb91645164b'
'77fba3032edf6cce549cd4e174d9296684b20f4589dc59179fcc8cba7426a4e9'
'bd55299e08e6f8e61ba5baad0990170891801a29a1e8137e502b5e8a10fc37ea'
'3f28f8bfc6dd105a07f747d7135c77a77de433e2b8647dd7520a900135203fbd'
'b7c045b08ad55a9f79390c104fa846d0e7dbb49fccffb2fab2a3824b6b19c9c8'
'89d99d8ac269ca66e2e279aff652d5aac938a35faec93cd8cff8f048052bd3ce')
'77fba3032edf6cce549cd4e174d9296684b20f4589dc59179fcc8cba7426a4e9')
noextract=(icedtea_${_icedtea_ver}_openjdk.tar.bz2
icedtea_${_icedtea_ver}_corba.tar.bz2
icedtea_${_icedtea_ver}_jaxp.tar.bz2
icedtea_${_icedtea_ver}_jaxws.tar.bz2
icedtea_${_icedtea_ver}_jdk.tar.bz2
icedtea_${_icedtea_ver}_lanbtools.tar.bz2
icedtea_${_icedtea_ver}_langtools.tar.bz2
icedtea_${_icedtea_ver}_hotspot.tar.bz2)
[ "$CARCH" = "x86_64" ] && _JARCH=amd64
@ -136,12 +128,14 @@ check() {
package_jre7-openjdk-headless() {
pkgdesc='OpenJDK Java 7 headless runtime environment'
depends=('libjpeg-turbo' 'lcms2' 'nss' 'ca-certificates-java')
depends=('java-common' 'libjpeg-turbo' 'lcms2' 'nss' 'ca-certificates-java')
optdepends=('libcups: needed for Java Mauve support - libmawt.so'
'fontconfig: needed for Java Mauve support - libmawt.so'
'java-rhino: for some JavaScript support')
provides=('java-runtime-headless=7')
provides=('java-runtime-headless=7' 'java-runtime-headless-openjdk=7')
conflicts=('openjdk6')
# TODO remove after some time
replaces=('jre7-openjdk-headless-wm')
# Upstream config files that should go to etc and get backup
_backup_etc=(etc/java-7-openjdk/${_JARCH}/jvm.cfg
etc/java-7-openjdk/calendars.properties
@ -163,9 +157,7 @@ package_jre7-openjdk-headless() {
etc/java-7-openjdk/security/nss.cfg
etc/java-7-openjdk/sound.properties
etc/java-7-openjdk/tz.properties)
backup=(${_backup_etc[@]}
etc/profile.d/jre.sh
etc/profile.d/jre.csh)
backup=(${_backup_etc[@]})
install=jre7-openjdk-headless.install
cd "${srcdir}/${_imgdir}/jre"
@ -198,23 +190,10 @@ package_jre7-openjdk-headless() {
done
popd
# Link binaries into /usr/bin
pushd "${pkgdir}${_jvmdir}/jre/bin"
install -d -m755 "${pkgdir}/usr/bin/"
for file in *; do
ln -sf ${_jvmdir}/jre/bin/${file} "${pkgdir}/usr/bin"
done
popd
# Link JKS keystore from ca-certificates-java
rm -f "${pkgdir}${_jvmdir}/jre/lib/security/cacerts"
ln -sf /etc/ssl/certs/java/cacerts "${pkgdir}${_jvmdir}/jre/lib/security/cacerts"
# Set some variables
install -d -m755 "${pkgdir}/etc/profile.d/"
install -m755 "${srcdir}/jre7-openjdk.profile" "${pkgdir}/etc/profile.d/jre.sh"
install -m755 "${srcdir}/jre7-openjdk.profile.csh" "${pkgdir}/etc/profile.d/jre.csh"
# Install license
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgbase}/"
install -m644 ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README \
@ -231,15 +210,17 @@ package_jre7-openjdk-headless() {
package_jre7-openjdk() {
pkgdesc='OpenJDK Java 7 full runtime environment'
depends=('jre7-openjdk-headless' 'xdg-utils' 'hicolor-icon-theme')
depends=("jre7-openjdk-headless=${pkgver}-${pkgrel}" 'xdg-utils' 'hicolor-icon-theme')
optdepends=('icedtea-web-java7: web browser plugin + Java Web Start'
'alsa-lib: for basic sound support'
'giflib: for gif format support'
'libpulse: for advanced sound support'
'gtk2: for the Gtk+ look and feel - desktop usage'
'libxtst: linked in xawt/libmawt.so - desktop usage')
provides=('java-runtime=7')
provides=('java-runtime=7' 'java-runtime-openjdk=7')
conflicts=('openjdk6')
# TODO remove after some time
replaces=('jre7-openjdk-wm')
install=jre7-openjdk.install
cd "${srcdir}/${_imgdir}/jre"
@ -248,14 +229,6 @@ package_jre7-openjdk() {
install -D ${f} "${pkgdir}${_jvmdir}/jre/${f}"
done
# Link binaries into /usr/bin
pushd "${pkgdir}${_jvmdir}/jre/bin"
install -d -m755 "${pkgdir}/usr/bin/"
for file in *; do
ln -sf ${_jvmdir}/jre/bin/${file} "${pkgdir}/usr/bin"
done
popd
# Man pages
pushd "${pkgdir}${_jvmdir}/jre/bin"
install -d -m 755 "${pkgdir}"/usr/share/man/{,ja/}man1/
@ -267,10 +240,9 @@ package_jre7-openjdk() {
done
popd
# Install icons and menu entries
for s in 16 24 32 48 ; do
install -d -m755 "${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/"
install -m644 ../../../openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
for s in 16 24 32 48; do
install -D -m 644 \
"${srcdir}/icedtea-${_icedtea_ver}/openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png" \
"${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/java.png"
done
@ -285,11 +257,10 @@ package_jre7-openjdk() {
package_jdk7-openjdk() {
pkgdesc='OpenJDK Java 7 development kit'
depends=('jre7-openjdk')
provides=('java-environment=7')
conflicts=('java-environment')
replaces=('openjdk6')
backup=(etc/profile.d/jdk.sh etc/profile.d/jdk.csh)
depends=("jre7-openjdk=${pkgver}-${pkgrel}")
provides=('java-environment=7' 'java-environment-openjdk=7')
replaces=('openjdk6' 'jdk7-openjdk-wm')
install=jdk7-openjdk.install
cd "${srcdir}/${_imgdir}"
@ -301,7 +272,6 @@ package_jdk7-openjdk() {
# 'bin' files
pushd bin
install -d -m755 "${pkgdir}${_jvmdir}/bin/" \
"${pkgdir}"/usr/bin/ \
"${pkgdir}"/usr/share/man/{,ja/}man1/
# 'java-rmi.cgi' will be handled separately as it should not be in the PATH and has no man page
@ -315,8 +285,6 @@ package_jdk7-openjdk() {
# Copy man page
install -m644 ../man/man1/${b}.1 "${pkgdir}/usr/share/man/man1/${b}.1"
install -m644 ../man/ja/man1/${b}.1 "${pkgdir}/usr/share/man/ja/man1/${b}.1"
# Link from /bin/
ln -s ${_jvmdir}/bin/${b} "${pkgdir}/usr/bin/${b}"
fi
done
popd
@ -328,11 +296,6 @@ package_jdk7-openjdk() {
install -d -m755 "${pkgdir}/usr/share/applications"
install -m644 "${srcdir}/icedtea-${_icedtea_ver}/jconsole.desktop" "${pkgdir}/usr/share/applications"
# Set some variables
install -d -m755 "${pkgdir}/etc/profile.d/"
install -m755 "${srcdir}/${pkgname}.profile" "${pkgdir}/etc/profile.d/jdk.sh"
install -m755 "${srcdir}/${pkgname}.profile.csh" "${pkgdir}/etc/profile.d/jdk.csh"
# link license
install -d -m755 "${pkgdir}/usr/share/licenses"
ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"

View file

@ -1 +0,0 @@
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk

View file

@ -1 +0,0 @@
setenv J2SDKDIR "/usr/lib/jvm/java-7-openjdk"

View file

@ -1,11 +1,41 @@
this_java='java-7-openjdk/jre'
post_install() {
default=$(/usr/bin/archlinux-java get)
if [ -z "${default}" ]; then
/usr/bin/archlinux-java set ${this_java}
elif [ "${default/\/jre}" = "${this_java/\/jre}" ]; then
/usr/bin/archlinux-java fix
else
echo "Default Java environment is already set to '${default}'"
echo "To set '${this_java}' as default, consider using:"
echo " archlinux-java set '${this_java}'"
fi
if [ ! -f /etc/ssl/certs/java/cacerts ]; then
/usr/bin/init-jks-keystore
# Overwrite JAVA_HOME because if it still points at java-7-openjdk AND user just removed jdk,
# Then /usr/bin/java will in the end, refer to /usr/lib/jvm/java-7-openjdk/java which doesn't exist
JAVA_HOME=/usr/lib/jvm/java-default-runtime /usr/bin/init-jks-keystore
fi
}
post_upgrade() {
default=$(/usr/bin/archlinux-java get)
if [ -z "${default}" ]; then
/usr/bin/archlinux-java set ${this_java}
elif [ "${default/\/jre}" = "${this_java/\/jre}" ]; then
/usr/bin/archlinux-java fix
fi
if [ ! -f /etc/ssl/certs/java/cacerts ]; then
/usr/bin/init-jks-keystore
JAVA_HOME=/usr/lib/jvm/java-default-runtime /usr/bin/init-jks-keystore
fi
}
pre_remove() {
default=$(/usr/bin/archlinux-java get)
if [ "x${default/\/jre}" = "x${this_java/\/jre}" ]; then
/usr/bin/archlinux-java unset
echo 'No Java environment is set anymore'
fi
}

View file

@ -1,18 +1,45 @@
this_java='java-7-openjdk/jre'
post_install() {
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
echo "when you use a non-reparenting window manager"
echo "set _JAVA_AWT_WM_NONREPARENTING=1 in"
echo "/etc/profile.d/jre.sh"
# update-desktop-database -q
default=$(/usr/bin/archlinux-java get)
if [ -z "${default}" ]; then
/usr/bin/archlinux-java set ${this_java}
elif [ "${default/\/jre}" = "${this_java/\/jre}" ]; then
/usr/bin/archlinux-java fix
else
echo "Default Java environment is already set to '${default}'"
echo "To set '${this_java}' as default, consider using:"
echo " archlinux-java set '${this_java}'"
fi
}
post_upgrade() {
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
# update-desktop-database -q
}
# update-desktop-database -q
default=$(/usr/bin/archlinux-java get)
if [ -z "${default}" ]; then
/usr/bin/archlinux-java set ${this_java}
elif [ "${default/\/jre}" = "${this_java/\/jre}" ]; then
/usr/bin/archlinux-java fix
fi
}
post_remove() {
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
# update-desktop-database -q
default=$(/usr/bin/archlinux-java get)
if [ "${default/\/jre}" = "${this_java/\/jre}" ]; then
/usr/bin/archlinux-java fix
fi
}

View file

@ -1,4 +0,0 @@
export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk/jre}
# Enable this for non-reparenting window managers
#export _JAVA_AWT_WM_NONREPARENTING=1

View file

@ -1,4 +0,0 @@
setenv JAVA_HOME "/usr/lib/jvm/java-7-openjdk/jre"
# Enable this for non-reparenting window managers
#setenv _JAVA_AWT_WM_NONREPARENTING 1