oracle-jdk: various fixes; adding conflict with oracle-jre; revbump
This commit is contained in:
parent
62c9585275
commit
34b78e158f
3 changed files with 25 additions and 13 deletions
|
@ -6,28 +6,36 @@
|
||||||
|
|
||||||
BUILD_DIR="./var/tmp/${PKGNAME}.build"
|
BUILD_DIR="./var/tmp/${PKGNAME}.build"
|
||||||
|
|
||||||
case "${ACTION}" in
|
do_install() {
|
||||||
post)
|
|
||||||
. usr/share/java/oracle-jdk-vars.sh
|
|
||||||
|
|
||||||
mkdir -p "$BUILD_DIR"
|
mkdir -p "$BUILD_DIR"
|
||||||
wget \
|
wget \
|
||||||
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
||||||
--progress=bar:force \
|
--progress=bar:force \
|
||||||
-c -O $BUILD_DIR/jdk.tar.gz \
|
-c -O $BUILD_DIR/jdk.tar.gz \
|
||||||
$ORACLE_JDK_URL
|
$ORACLE_JDK_URL
|
||||||
echo "$ORACLE_JDK_CHECKSUM $BUILD_DIR/jdk.tar.gz" | sha256sum -c || exit 1
|
echo "$ORACLE_JDK_CHECKSUM $BUILD_DIR/jdk.tar.gz" | sha256sum -c || return 1
|
||||||
tar xf ${BUILD_DIR}/jdk.tar.gz || exit 1
|
tar xf ${BUILD_DIR}/jdk.tar.gz || return 1
|
||||||
rm -rf /usr/java/$PKGNAME 2> /dev/null
|
|
||||||
mv jdk$ORACLE_JDK_LONG_VERSION /usr/share/java/$PKGNAME || exit 1
|
if [ -d usr/share/java/$PKGNAME ]; then
|
||||||
|
rm -rf usr/share/java/$PKGNAME
|
||||||
|
fi
|
||||||
|
mv jdk$ORACLE_JDK_LONG_VERSION usr/share/java/$PKGNAME || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
case "${ACTION}" in
|
||||||
|
post)
|
||||||
|
. usr/share/java/oracle-jdk-vars.sh
|
||||||
|
do_install
|
||||||
|
RESULT=$?
|
||||||
rm -r $BUILD_DIR
|
rm -r $BUILD_DIR
|
||||||
|
[ $RESULT -ne 0 ] && exit $RESULT
|
||||||
cat << _EOF
|
cat << _EOF
|
||||||
=====================================================================
|
=====================================================================
|
||||||
|
|
||||||
- The Oracle JDK package is licensed software.
|
- The Oracle JDK package is licensed software.
|
||||||
|
|
||||||
You MUST read and agree to the license stored in
|
You MUST read and agree to the license stored in
|
||||||
/usr/share/licenses/oracle-jdk/license.html
|
/usr/share/licenses/oracle-jdk/LICENSE
|
||||||
before using it.
|
before using it.
|
||||||
|
|
||||||
- Please re-login to update PATH and JAVA_HOME or re-source
|
- Please re-login to update PATH and JAVA_HOME or re-source
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
export JAVA_HOME=${JAVA_HOME=/usr/share/java/oracle-jdk}
|
export JAVA_HOME=${JAVA_HOME=/usr/share/java/oracle-jdk}
|
||||||
export PATH="$PATH:/usr/share/java/oracle-jdk"
|
export PATH="$PATH:/usr/share/java/oracle-jdk/bin"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
pkgname=oracle-jdk
|
pkgname=oracle-jdk
|
||||||
version=8u5
|
version=8u5
|
||||||
_longVersion=1.8.0_05
|
_longVersion=1.8.0_05
|
||||||
revision=1
|
revision=2
|
||||||
short_desc="Java Development Kit (JDK)"
|
short_desc="Java Development Kit (JDK)"
|
||||||
maintainer="Enno Boland <eb@s01.de>"
|
maintainer="Enno Boland <eb@s01.de>"
|
||||||
homepage="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
|
homepage="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
|
||||||
|
@ -12,8 +12,9 @@ nonfree=yes
|
||||||
only_for_archs="i686 x86_64 armv6l armv7l"
|
only_for_archs="i686 x86_64 armv6l armv7l"
|
||||||
depends="hicolor-icon-theme desktop-file-utils xdg-utils shared-mime-info wget"
|
depends="hicolor-icon-theme desktop-file-utils xdg-utils shared-mime-info wget"
|
||||||
hostmakedepends="wget"
|
hostmakedepends="wget"
|
||||||
provides="java-runtime-${version}_1"
|
provides="java-runtime-${version}_1 oracle-jre-${version}_${revision}"
|
||||||
replaces="java-runtime>=0"
|
conflicts="oracle-jre>=0"
|
||||||
|
replaces="java-runtime>=0 oracle-jre>=0"
|
||||||
|
|
||||||
case "${XBPS_TARGET_MACHINE}" in
|
case "${XBPS_TARGET_MACHINE}" in
|
||||||
x86_64)
|
x86_64)
|
||||||
|
@ -61,11 +62,14 @@ do_build() {
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
vmkdir "usr/share/licenses/${pkgname}"
|
vmkdir "usr/share/licenses/${pkgname}"
|
||||||
|
vmkdir "usr/share/java/$pkgname/jre"
|
||||||
vinstall oracle-jdk-vars.sh 644 "usr/share/java"
|
vinstall oracle-jdk-vars.sh 644 "usr/share/java"
|
||||||
|
|
||||||
vinstall LICENSE 644 "usr/share/licenses/${pkgname}"
|
vinstall LICENSE 644 "usr/share/licenses/${pkgname}"
|
||||||
vinstall java-policy-settings.desktop 644 usr/share/applications
|
vinstall java-policy-settings.desktop 644 usr/share/applications
|
||||||
|
|
||||||
|
ln -sr $DESTDIR/usr/share/java/$pkgname/jre $DESTDIR/usr/share/java/oracle-jre
|
||||||
|
|
||||||
for i in 16 20 22 24 32 40 48 64 72 96 128 256 512; do
|
for i in 16 20 22 24 32 40 48 64 72 96 128 256 512; do
|
||||||
vinstall $FILESDIR/oracle-jdk-${i}x${i}.png 644 usr/share/icons/hicolor/${i}x${i}/apps oracle-java.png
|
vinstall $FILESDIR/oracle-jdk-${i}x${i}.png 644 usr/share/icons/hicolor/${i}x${i}/apps oracle-java.png
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue