summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlad2015-07-08 15:49:36 +0300
committervlad2015-07-08 15:49:36 +0300
commita53c95167e2ea09298062006f0d3e00ff2b56aa7 (patch)
tree11aaf03e450a0498ab054833985950a322cf5ac2
downloadaur-a53c95167e2ea09298062006f0d3e00ff2b56aa7.tar.gz
Initial import
-rw-r--r--.SRCINFO70
-rw-r--r--PKGBUILD142
-rw-r--r--jconsole-jdk7.desktop8
-rw-r--r--jdk.install83
-rw-r--r--jmc-jdk7.desktop8
-rw-r--r--jvisualvm-jdk7.desktop9
-rw-r--r--policytool-jdk7.desktop8
7 files changed, 328 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..4eafda1b4df
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,70 @@
+pkgbase = jdk7
+ pkgdesc = Oracle Java 7 Development Kit
+ pkgver = 7.80
+ pkgrel = 2
+ url = http://www.oracle.com/technetwork/java/javase/downloads/index.html
+ install = jdk.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ depends = ca-certificates-java
+ depends = desktop-file-utils
+ depends = hicolor-icon-theme
+ depends = java-environment-common
+ depends = java-runtime-common
+ depends = libx11
+ depends = libxrender
+ depends = libxslt
+ depends = libxtst
+ depends = shared-mime-info
+ depends = xdg-utils
+ optdepends = alsa-lib: for basic sound support
+ optdepends = derby: for Oracle Apache Derby Java database (AUR)
+ optdepends = eclipse: "Oracle Java Mission Control" plugins for Eclipse
+ optdepends = gtk2: for Gtk+ look and feel (desktop)
+ optdepends = ttf-font: fonts
+ optdepends = visualvm: for lightweight profiling capabilities
+ optdepends = jdk7-docs: Oracle JDK 7 documentation
+ optdepends = java7-jce_ustrength: Unrestricted cryptographic libraries
+ provides = java-runtime=7
+ provides = java-runtime-headless=7
+ provides = java-web-start=7
+ provides = java-environment=7
+ provides = java-runtime-jre=7
+ provides = java-runtime-headless-jre=7
+ provides = java-web-start-jre=7
+ provides = java-environment-jdk=7
+ backup = etc/java-jdk7/amd64/jvm.cfg
+ backup = etc/java-jdk7/amd64/server/Xusage.txt
+ backup = etc/java-jdk7/images/cursors/cursors.properties
+ backup = etc/java-jdk7/management/jmxremote.access
+ backup = etc/java-jdk7/management/jmxremote.password.template
+ backup = etc/java-jdk7/management/management.properties
+ backup = etc/java-jdk7/management/snmp.acl.template
+ backup = etc/java-jdk7/security/java.policy
+ backup = etc/java-jdk7/security/java.security
+ backup = etc/java-jdk7/security/javaws.policy
+ backup = etc/java-jdk7/calendars.properties
+ backup = etc/java-jdk7/content-types.properties
+ backup = etc/java-jdk7/flavormap.properties
+ backup = etc/java-jdk7/fontconfig.properties.src
+ backup = etc/java-jdk7/javafx.properties
+ backup = etc/java-jdk7/jvm.hprof.txt
+ backup = etc/java-jdk7/logging.properties
+ backup = etc/java-jdk7/net.properties
+ backup = etc/java-jdk7/psfont.properties.ja
+ backup = etc/java-jdk7/psfontj2d.properties
+ backup = etc/java-jdk7/sound.properties
+ source = http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
+ source = jconsole-jdk7.desktop
+ source = jmc-jdk7.desktop
+ source = jvisualvm-jdk7.desktop
+ source = policytool-jdk7.desktop
+ sha256sums = bad9a731639655118740bee119139c1ed019737ec802a630dd7ad7aab4309623
+ sha256sums = ab4a2e49825df4e6055e90283f9d0b432e28a6d66f0f7ed659985e7c53847751
+ sha256sums = 535d86adeb183340442c307e0ba579d0f7718b30fe6ed319bdc91bb2cee47763
+ sha256sums = cf20cdf39583e1a992a85ab366437b80217951aeb9dec6b2ee54b77b4d0af6be
+ sha256sums = af15efe8b471d0ab147f4a88215aed3fc50b1a605ce31100dfa7a404f29e85b1
+
+pkgname = jdk7
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d2ad6900e42
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,142 @@
+# Maintainer: Jochen Schalanda <jochen+aur@schalanda.name>
+# Contributor: Det
+# Contributor: isiachi <isiachi@rhyeworld.it>
+# Based on jre: https://aur.archlinux.org/packages.php?ID=51908
+
+_pkgname=jdk
+pkgname=${_pkgname}7
+_major=7
+_minor=80
+_build=b15
+_pkg=${_major}u$_minor
+pkgver=$_major.$_minor
+pkgrel=2
+pkgdesc="Oracle Java $_major Development Kit"
+arch=('i686' 'x86_64')
+url=http://www.oracle.com/technetwork/java/javase/downloads/index.html
+license=('custom')
+depends=('ca-certificates-java' 'desktop-file-utils' 'hicolor-icon-theme' 'java-environment-common'
+ 'java-runtime-common' 'libx11' 'libxrender' 'libxslt' 'libxtst' 'shared-mime-info' 'xdg-utils')
+optdepends=('alsa-lib: for basic sound support'
+ 'derby: for Oracle Apache Derby Java database (AUR)'
+ 'eclipse: "Oracle Java Mission Control" plugins for Eclipse'
+ 'gtk2: for Gtk+ look and feel (desktop)'
+ 'ttf-font: fonts'
+ 'visualvm: for lightweight profiling capabilities'
+ 'jdk7-docs: Oracle JDK 7 documentation'
+ 'java7-jce_ustrength: Unrestricted cryptographic libraries')
+provides=("java-runtime=$_major" "java-runtime-headless=$_major" "java-web-start=$_major" "java-environment=$_major"
+ "java-runtime-jre=$_major" "java-runtime-headless-jre=$_major" "java-web-start-jre=$_major" "java-environment-jdk=$_major")
+
+# Variables
+_arch=x64
+_arch2=amd64
+if [[ $CARCH = i686 ]]; then
+ _arch=i586
+ _arch2=i386
+fi
+DLAGENTS=('http::/usr/bin/curl -LC - -b oraclelicense=a -O')
+_jname=jdk${_major}
+_jvmdir=/usr/lib/jvm/java-$_major-${_pkgname}
+backup=("etc/java-$_jname/$_arch2/jvm.cfg"
+ "etc/java-$_jname/$_arch2/server/Xusage.txt"
+ "etc/java-$_jname/images/cursors/cursors.properties"
+ "etc/java-$_jname/management/jmxremote.access"
+ "etc/java-$_jname/management/jmxremote.password.template"
+ "etc/java-$_jname/management/management.properties"
+ "etc/java-$_jname/management/snmp.acl.template"
+ "etc/java-$_jname/security/java.policy"
+ "etc/java-$_jname/security/java.security"
+ "etc/java-$_jname/security/javaws.policy"
+ "etc/java-$_jname/calendars.properties"
+ "etc/java-$_jname/content-types.properties"
+ "etc/java-$_jname/flavormap.properties"
+ "etc/java-$_jname/fontconfig.properties.src"
+ "etc/java-$_jname/javafx.properties"
+ "etc/java-$_jname/jvm.hprof.txt"
+ "etc/java-$_jname/logging.properties"
+ "etc/java-$_jname/net.properties"
+ "etc/java-$_jname/psfont.properties.ja"
+ "etc/java-$_jname/psfontj2d.properties"
+ "etc/java-$_jname/sound.properties")
+install=jdk.install
+source=("http://download.oracle.com/otn-pub/java/${_pkgname}/$_pkg-$_build/${_pkgname}-$_pkg-linux-$_arch.tar.gz"
+ "jconsole-$_jname.desktop"
+ "jmc-$_jname.desktop"
+ "jvisualvm-$_jname.desktop"
+ "policytool-$_jname.desktop")
+sha256sums=('bad9a731639655118740bee119139c1ed019737ec802a630dd7ad7aab4309623'
+ 'ab4a2e49825df4e6055e90283f9d0b432e28a6d66f0f7ed659985e7c53847751'
+ '535d86adeb183340442c307e0ba579d0f7718b30fe6ed319bdc91bb2cee47763'
+ 'cf20cdf39583e1a992a85ab366437b80217951aeb9dec6b2ee54b77b4d0af6be'
+ 'af15efe8b471d0ab147f4a88215aed3fc50b1a605ce31100dfa7a404f29e85b1')
+[ "$CARCH" = 'i686' ] && sha256sums[0]='9ded1318a7223cf6e09ac4b6ee4db1f4c5d1aef1d3d291f6db8491a32eaa57ba'
+
+package() {
+ msg2 "Creating required dirs"
+ cd ${_pkgname}1.${_major}.0_${_minor}
+ install -d "$pkgdir"/{usr/{lib/{jvm/java-$_major-$_pkgname/bin,mozilla/plugins},share/licenses/java$_major-$_pkgname},etc/.java/.systemPrefs}
+
+ msg2 "Preparing"
+ # Link duplicate binaries from jre/
+ for i in $(ls jre/bin/); do
+ ln -sf $_jvmdir/jre/bin/$i bin/$i
+ done
+
+ # Link NPAPI plugin
+ ln -sf $_jvmdir/jre/lib/$_arch2/libnpjp2.so "$pkgdir"/usr/lib/mozilla/plugins/libnpjp2-$_jname.so
+
+ # Replace JKS keystore with 'ca-certificates-java'
+ ln -sf /etc/ssl/certs/java/cacerts jre/lib/security/cacerts
+
+ # Suffix .desktops, icons and MIME packages
+ for i in $(find jre/lib/desktop/ -type f); do
+ rename -- "." "-$_jname." $i
+ done
+
+ # Suffix man pages
+ rename -- ".1" "-$_jname.1" man/{,ja_JP.UTF-8/}man1/*
+
+ # Fix .desktop paths
+ sed -e "s,Exec=,&$_jvmdir/jre/bin/," \
+ -e "s/\.png/-$_jname/" \
+ -i jre/lib/desktop/applications/*
+
+ msg2 "Removing redundancies"
+ rm -r db/ jre/lib/fontconfig.*.{bfc,properties.src} jre/plugin/ jre/{COPYRIGHT,LICENSE,README,*.txt} lib/visualvm/ man/ja
+
+ msg2 "Moving stuff in place"
+ # .desktops + icons
+ mv jre/lib/desktop/* "$pkgdir"/usr/share/
+ install -m644 "$srcdir"/*.desktop "$pkgdir"/usr/share/applications/
+
+ # Move/link configs: /usr/lib/jvm/java-$_jname/jre/lib -> /etc
+ for new_etc in ${backup[@]}; do
+ old_usr=jre/lib/${new_etc#*$_jname/}
+ install -Dm644 $old_usr "$pkgdir"/$new_etc
+ ln -sf /$new_etc $old_usr
+ done
+
+ # Man pages
+ mv man/ja_JP.UTF-8/ man/ja/
+ mv man/ "$pkgdir"/usr/share/
+
+ # Licenses
+ mv COPYRIGHT LICENSE *.txt "$pkgdir"/usr/share/licenses/java$_major-$_pkgname/
+ ln -sf /usr/share/licenses/java$_major-$pkgname/ "$pkgdir"/usr/share/licenses/$pkgname
+
+ # Do the move
+ mv * "$pkgdir"/$_jvmdir
+
+ msg2 "Enabling copy+paste to unsigned applets"
+ # Copy/paste from system clipboard to unsigned Java applets has been disabled since 6u24:
+ # - https://blogs.oracle.com/kyle/entry/copy_and_paste_in_java
+ # - http://slightlyrandombrokenthoughts.blogspot.com/2011/03/oracle-java-applet-clipboard-injection.html
+ _line=$(awk '/permission/{a=NR}; END{print a}' "$pkgdir"/etc/java-$_jname/security/java.policy)
+ sed "$_line a\\\\n \
+ // (AUR) Allow unsigned applets to read system clipboard, see:\n \
+ // - https://blogs.oracle.com/kyle/entry/copy_and_paste_in_java\n \
+ // - http://slightlyrandombrokenthoughts.blogspot.com/2011/03/oracle-java-applet-clipboard-injection.html\n \
+ permission java.awt.AWTPermission \"accessClipboard\";" \
+ -i "$pkgdir"/etc/java-$_jname/security/java.policy
+}
diff --git a/jconsole-jdk7.desktop b/jconsole-jdk7.desktop
new file mode 100644
index 00000000000..7270f932375
--- /dev/null
+++ b/jconsole-jdk7.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Exec=/usr/lib/jvm/java-7-jdk/bin/jconsole
+Icon=sun-java-jdk7
+Name=Java Monitoring and Management Console
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Development;Java;
diff --git a/jdk.install b/jdk.install
new file mode 100644
index 00000000000..f38e8dacb79
--- /dev/null
+++ b/jdk.install
@@ -0,0 +1,83 @@
+THIS_JDK='java-7-jdk'
+NAME='JDK'
+
+note() {
+ printf "${blue}::${yellow} archlinux-java:${bold} $1${all_off}\n"
+}
+
+all_off="$(tput sgr0)"
+bold="${all_off}$(tput bold)"
+blue="${bold}$(tput setaf 4)"
+yellow="${bold}$(tput setaf 3)"
+
+update_desktop() {
+ update-desktop-database -q
+ update-mime-database /usr/share/mime >/dev/null
+ xdg-icon-resource forceupdate &>/dev/null
+ xdg-icon-resource forceupdate --theme HighContrast &>/dev/null
+ xdg-icon-resource forceupdate --theme HighContrastInverse &>/dev/null
+ xdg-icon-resource forceupdate --theme LowContrast &>/dev/null
+}
+
+fix_default() {
+ if [[ -x /usr/bin/java ]]; then
+ archlinux-java get
+ else
+ archlinux-java unset
+ fi
+}
+
+post_install() {
+ default=$(fix_default)
+ case ${default} in
+ "")
+ archlinux-java set ${THIS_JDK}
+ note "${NAME} ('${THIS_JDK}') set as default Java environment."
+ ;;
+ ${THIS_JDK})
+ # Nothing
+ note "${NAME} ('${THIS_JDK}') set as default Java environment."
+ ;;
+ *)
+ note "Default Java environment already set to '${default}'.
+ To use ${NAME} ('${THIS_JDK}'), run:
+ # archlinux-java set ${THIS_JDK}
+ For status, use:
+ $ archlinux-java status"
+ ;;
+ esac
+
+ if [[ ! -f /etc/ssl/certs/java/cacerts ]]; then
+ init-jks-keystore
+ fi
+
+ update_desktop
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ default=$(fix_default)
+ if [[ ${default} = ${THIS_JDK} ]]; then
+ archlinux-java unset
+ fi
+}
+
+post_remove() {
+ default=$(fix_default) # reassign
+ if [[ ${default} ]]; then
+ note "Default Java environment is '${default}'."
+ else
+ archlinux-java fix
+ default=$(fix_default) # re-reassign
+ if [[ ${default} ]]; then
+ note "Default Java environment left as '${default}'."
+ else
+ note "Java environment unset."
+ fi
+ fi
+
+ update_desktop
+}
diff --git a/jmc-jdk7.desktop b/jmc-jdk7.desktop
new file mode 100644
index 00000000000..d7eccc7c4e1
--- /dev/null
+++ b/jmc-jdk7.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Exec=/usr/lib/jvm/java-7-jdk/bin/jmc
+Icon=sun-java-jdk7
+Name=Java Mission Control
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Development;Java;
diff --git a/jvisualvm-jdk7.desktop b/jvisualvm-jdk7.desktop
new file mode 100644
index 00000000000..a94c5a5034a
--- /dev/null
+++ b/jvisualvm-jdk7.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Exec=/usr/lib/jvm/java-7-jdk/bin/jvisualvm
+GenericName=Java Monitoring and Performance Monitoring Tool
+Icon=sun-java-jdk7
+Name=Java VisualVM
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Development;Java;
diff --git a/policytool-jdk7.desktop b/policytool-jdk7.desktop
new file mode 100644
index 00000000000..0c223e8a55f
--- /dev/null
+++ b/policytool-jdk7.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Exec=/usr/lib/jvm/java-7-jdk/jre/bin/policytool
+Icon=sun-java-jdk7
+Name=Java Policy Settings
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Settings;Java;