New package: jre-7 (oracle)

This commit is contained in:
davehome 2011-10-13 17:26:18 -06:00
parent 5d80e68fae
commit a6da8ab22e
4 changed files with 104 additions and 0 deletions

23
srcpkgs/jre/INSTALL Normal file
View File

@ -0,0 +1,23 @@
#
# This script will advise the user to read the license for JRE
# and to re-login to have JRE included in PATH
#
case "${ACTION}" in
pre)
;;
post)
cat << _EOF
=====================================================================
- The Oracle JRE package is licensed software.
You MUST read and agree to the license stored in
/usr/share/licenses/jre/LICENSE before using it.
- Please re-login to include JRE in your PATH.
=====================================================================
_EOF
;;
esac

View File

@ -0,0 +1,10 @@
[Desktop Entry]
Exec=policytool
Icon=sun-java.png
Name[cs]=Nastavení politiky Java aplikací
Name=Java Policy Settings
Path=
StartupNotify=true
Terminal=false
Type=Application
Categories=Settings;Java;

2
srcpkgs/jre/files/jre.sh Normal file
View File

@ -0,0 +1,2 @@
export PATH=$PATH:/opt/java/jre/bin
export JAVA_HOME=${JAVA_HOME:-/opt/java/jre}

69
srcpkgs/jre/template Normal file
View File

@ -0,0 +1,69 @@
# Template file for 'oracle-jre'
pkgname=jre
_extraversion=1.7.0
version=7
distfiles="http://download.oracle.com/otn-pub/java/jdk/${version}/jre-${version}-linux-x64.tar.gz"
build_style=custom-install
short_desc="Oracle's Java Runtime Environment (JRE) - Version 7"
maintainer="davehome <davehome@redthumb.info.tm"
homepage="http://www.oracle.com/technetwork/java/javase/downloads/index.html"
license="oracle"
checksum=d829890d46295ab0cbfcbeb5c68ac7c90a5021689f7503c00b8bcf4bf9ea2f8d
long_desc="
Oracle Java SE 7 - Runtime Environment (JRE) only:
This release includes new features such as small language changes for
improved developer productivity, a new Filesystem API, support for
asynchronous I/O, a new fork/join framework for multicore performance,
improved support for dynamic and script languages, updates to security,
internationalization and web standards and much more."
Add_dependency build libXtst-devel
Add_dependency full desktop-file-utils
Add_dependency full xdg-utils
Add_dependency full shared-mime-info
wrksrc=jre${_extraversion}
do_install()
{
# Install desktop related items
vmkdir usr/share
vcopy ${wrksrc}/lib/desktop/icons usr/share
vcopy ${wrksrc}/lib/desktop/applications usr/share
vcopy ${wrksrc}/lib/desktop/mime usr/share
# Install mozilla-compatible browser plugin
vmkdir usr/lib/mozilla/plugins
vinstall ${wrksrc}/lib/amd64/libnpjp2.so 755 usr/lib/mozilla/plugins
# Install license(s)
vmkdir usr/share/licenses/jre
vcopy ${wrksrc}/COPYRIGHT usr/share/licenses/jre
vcopy ${wrksrc}/LICENSE usr/share/licenses/jre
vcopy ${wrksrc}/THIRDPARTYLICENSEREADME.txt usr/share/licenses/jre
# Fix system prefs folder FS#18872
vmkdir etc/.java/.systemPrefs
# For system environment vars and desktop extra shortcut
vinstall ${FILESDIR}/jre.sh 644 etc/profile.d
vinstall ${FILESDIR}/java-policy-settings.desktop 644 usr/share/applications
# Install JRE
vmkdir opt/java/jre
vcopy ${wrksrc}/bin opt/java/jre
vcopy ${wrksrc}/lib opt/java/jre
vcopy ${wrksrc}/man opt/java/jre
vcopy ${wrksrc}/plugin opt/java/jre
vcopy ${wrksrc}/release opt/java/jre
vcopy ${wrksrc}/Welcome.html opt/java/jre
}
post_install()
{
update-desktop-database -q
xdg-icon-resource forceupdate
update-mime-database usr/share/mime &> /dev/null
}