From a306c2530354c1c02351c4cc02eefa53c8d23eac Mon Sep 17 00:00:00 2001 From: root Date: Tue, 9 Aug 2011 23:14:31 +0000 Subject: Tue Aug 9 23:14:31 UTC 2011 --- community/java-oracle/PKGBUILD | 95 +++++++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 42 deletions(-) (limited to 'community/java-oracle/PKGBUILD') diff --git a/community/java-oracle/PKGBUILD b/community/java-oracle/PKGBUILD index 61cce1d2a..ac8e89a76 100644 --- a/community/java-oracle/PKGBUILD +++ b/community/java-oracle/PKGBUILD @@ -10,18 +10,16 @@ pkgbase=java-oracle pkgname=('jre' 'jdk') pkgver=7 -pkgrel=2 +pkgrel=3 arch=('i686' 'x86_64') [ "${CARCH}" = 'i686' ] && _arch='i586' [ "${CARCH}" = 'x86_64' ] && _arch='x64' url='http://jdk7.java.net/' license=('custom') source=("http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-${_arch}.tar.gz" - 'java-control-panel.desktop' 'java-monitoring-and-management-console.desktop' 'java-policy-settings.desktop' 'java-visualvm.desktop' - 'java-web-start.desktop' 'jre.profile' 'jre.profile.csh' 'jdk.profile' @@ -31,22 +29,20 @@ source=("http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-${_arch}.tar. 'javaws-launcher') [ "${CARCH}" = 'i686' ] && md5sums=('f97244a104f03731e5ff69f0dd5a9927') [ "${CARCH}" = 'x86_64' ] && md5sums=('b3c1ef5faea7b180469c129a49762b64') -md5sums+=('e4d814c0f310d77ed6990c731bccd0fb' - '4bc2b0be93f76ed07b471e3c89eb5a8a' - '8e3cec7ab641ec449cabd068be583f5c' - '9ba148ebabce8ed3351b813a9a66b6e5' - '619ec32235dcfe454234ef4316f8a7cc' - '7cd3dc10e7a37468cad4053a067dcd01' - 'cc90df2df6fe80fab885a80036d420a1' - 'b83ab5742651b4234b7d2e20785c6693' - '6f4cbf332816d2c4e9578ecd1d0dce7f' - 'a279e195e249000646895d93e199860d' - '4bdff6982c66d24a879c424aaac3d04d' - '45c15a6b4767288f2f745598455ea2bf') +md5sums+=('81cf9b716263ba85f0528d3357dccb75' + '6614b04176b9b7dfe26f22e9ce846801' + 'ef27c6d4062f2f97c532a9e893b6adbe' + '7cd3dc10e7a37468cad4053a067dcd01' + 'cc90df2df6fe80fab885a80036d420a1' + 'b83ab5742651b4234b7d2e20785c6693' + '6f4cbf332816d2c4e9578ecd1d0dce7f' + 'a279e195e249000646895d93e199860d' + '4bdff6982c66d24a879c424aaac3d04d' + '45c15a6b4767288f2f745598455ea2bf') package_jre() { pkgdesc="Oracle's Java Runtime Environment" - depends=('libxtst') + depends=('libxtst' 'desktop-file-utils' 'xdg-utils' 'shared-mime-info') provides=('java-runtime=7') conflicts=('java-runtime') install='jre.install' @@ -55,6 +51,27 @@ package_jre() { mkdir -p ${pkgdir}/opt/java cp -r jdk1.7.0/jre ${pkgdir}/opt/java + # move icons to appropriate location + install -d ${pkgdir}/usr/share + mv ${pkgdir}/opt/java/jre/lib/desktop/icons ${pkgdir}/usr/share + + # install .desktop entries + mv ${pkgdir}/opt/java/jre/lib/desktop/applications ${pkgdir}/usr/share + # desktop entries + install -d ${pkgdir}/usr/share/applications + install -m644 \ + ${srcdir}/java-policy-settings.desktop \ + ${pkgdir}/usr/share/applications + + # move mime files + mv ${pkgdir}/opt/java/jre/lib/desktop/mime ${pkgdir}/usr/share + + # get rid of already installed files + rm -r ${pkgdir}/opt/java/jre/plugin/desktop + rm -r ${pkgdir}/opt/java/jre/lib/desktop + + # TODO: find out the purpose of ./jre/lib/images/icons + # profiles install -D ${srcdir}/jre.profile \ ${pkgdir}/etc/profile.d/jre.sh @@ -73,19 +90,20 @@ package_jre() { # licenses install -d ${pkgdir}/usr/share/licenses/jre - install -m644 ${pkgdir}/opt/java/jre/COPYRIGHT \ - ${pkgdir}/usr/share/licenses/jre - install -m644 ${pkgdir}/opt/java/jre/LICENSE \ - ${pkgdir}/usr/share/licenses/jre - install -m644 ${pkgdir}/opt/java/jre/THIRDPARTYLICENSEREADME.txt \ + install -m644 \ + ${pkgdir}/opt/java/jre/{COPYRIGHT,LICENSE,THIRDPARTYLICENSEREADME.txt} \ ${pkgdir}/usr/share/licenses/jre - # Fix system prefs folder FS#18872 - install -d ${pkgdir}/etc/.java/.systemPrefs - # Clicking a .jnlp file does not launch that file but launch javaws -viewer instead FS#22509 install ${srcdir}/javaws-launcher \ ${pkgdir}/opt/java/jre/bin + sed \ + -e 's/Exec=javaws/&-launcher %f/' \ + -e '/NoDisplay=true/d' \ + -i ${pkgdir}/usr/share/applications/sun-javaws.desktop + + # Fix system prefs folder FS#18872 + install -d ${pkgdir}/etc/.java/.systemPrefs } package_jdk() { @@ -101,14 +119,16 @@ package_jdk() { # main files install -d ${pkgdir}/opt - mv jdk1.7.0 ${pkgdir}/opt/java + cp -r jdk1.7.0 ${pkgdir}/opt/java - # cleanup jre folder - rm -rf ${pkgdir}/opt/java/jre + # remove jre folder provided by the jre package + rm -r ${pkgdir}/opt/java/jre # can not package src.zip due to international use restrictions for certain countries rm ${pkgdir}/opt/java/src.zip # remove windows specific batch files find ${pkgdir}/opt/java -name '*\.bat' -delete + # remove already installed icons, mime and .desktop files provided by jre + rm -r ${pkgdir}/opt/java/lib/desktop # profiles install -D ${srcdir}/jdk.profile \ @@ -118,24 +138,15 @@ package_jdk() { # licenses install -d ${pkgdir}/usr/share/licenses/jdk - install -m644 ${pkgdir}/opt/java/COPYRIGHT \ - ${pkgdir}/usr/share/licenses/jdk - install -m644 ${pkgdir}/opt/java/LICENSE \ - ${pkgdir}/usr/share/licenses/jdk - install -m644 ${pkgdir}/opt/java/THIRDPARTYLICENSEREADME.txt \ + install -m644 \ + ${pkgdir}/opt/java/{COPYRIGHT,LICENSE,THIRDPARTYLICENSEREADME.txt} \ ${pkgdir}/usr/share/licenses/jdk # desktop entries - install -Dm644 ${srcdir}/java-control-panel.desktop \ - ${pkgdir}/usr/share/applications/java-control-panel.desktop - install -Dm644 ${srcdir}/java-monitoring-and-management-console.desktop \ - ${pkgdir}/usr/share/applications/java-monitoring-and-management-console.desktop - install -Dm644 ${srcdir}/java-policy-settings.desktop \ - ${pkgdir}/usr/share/applications/java-policy-settings.desktop - install -Dm644 ${srcdir}/java-visualvm.desktop \ - ${pkgdir}/usr/share/applications/java-visualvm.desktop - install -Dm644 ${srcdir}/java-web-start.desktop \ - ${pkgdir}/usr/share/applications/java-web-start.desktop + install -d ${pkgdir}/usr/share/applications + install -m644 \ + ${srcdir}/java-{monitoring-and-management-console,visualvm}.desktop \ + ${pkgdir}/usr/share/applications # javadb (apache derby) daemon files FS#21186 install -D ${srcdir}/derby-network-server \ -- cgit v1.2.3-54-g00ecf