Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/build-support/disabled/java/bin32-jdk7/bin32-jdk7.install
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2021-05-15 16:29:12 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2021-05-15 16:29:12 +0200
commit85abd230165823f70b8101ec3f40a536c1c90cb8 (patch)
tree2f70f84d776db65bbd215af42fca49790531e915 /build-support/disabled/java/bin32-jdk7/bin32-jdk7.install
parent905049e8f500160ec0047ff838fbe69c4d57428d (diff)
bootstrapped and unblacklisted java8-openjdk
Diffstat (limited to 'build-support/disabled/java/bin32-jdk7/bin32-jdk7.install')
-rw-r--r--build-support/disabled/java/bin32-jdk7/bin32-jdk7.install71
1 files changed, 71 insertions, 0 deletions
diff --git a/build-support/disabled/java/bin32-jdk7/bin32-jdk7.install b/build-support/disabled/java/bin32-jdk7/bin32-jdk7.install
new file mode 100644
index 00000000..7e849cbb
--- /dev/null
+++ b/build-support/disabled/java/bin32-jdk7/bin32-jdk7.install
@@ -0,0 +1,71 @@
+THIS_JAVA='java32-7-jdk'
+NAME='32-bit JDK 7'
+
+all_off="$(tput sgr0)"
+bold="${all_off}$(tput bold)"
+blue="${bold}$(tput setaf 4)"
+yellow="${bold}$(tput setaf 3)"
+
+note() {
+ printf "${blue}::${yellow} archlinux-java32:${bold} $1${all_off}\n"
+}
+
+update_desktop() {
+ update-desktop-database -q
+ update-mime-database /usr/share/mime >/dev/null
+ xdg-icon-resource forceupdate &>/dev/null
+}
+
+post_install() {
+ default=$(archlinux-java32 get)
+ case ${default} in
+ "")
+ archlinux-java32 set ${THIS_JAVA}
+ note "${NAME} ('${THIS_JAVA}') set as default Java environment."
+ ;;
+ ${THIS_JAVA})
+ note "${NAME} ('${THIS_JAVA}') set as default Java environment."
+ ;;
+ *)
+ note "Default Java environment already set to '${default}'.
+ To use ${NAME} ('${THIS_JAVA}'), run:
+ # archlinux-java32 set ${THIS_JAVA}
+ For status, use:
+ $ archlinux-java32 status"
+ ;;
+ esac
+
+ if [[ ! -f /etc/ssl/certs/java/cacerts ]]; then
+ update-ca-trust
+ fi
+
+ update_desktop
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ default=$(archlinux-java32 get)
+ if [[ ${default} = ${THIS_JAVA} ]]; then
+ archlinux-java32 unset
+ fi
+}
+
+post_remove() {
+ default=$(archlinux-java32 get) # reassign
+ if [[ ${default} ]]; then
+ note "Default Java environment is '${default}'."
+ else
+ archlinux-java32 fix
+ default=$(archlinux-java32 get) # re-reassign
+ if [[ ${default} ]]; then
+ note "Default Java environment left as '${default}'."
+ else
+ note "Java environment unset."
+ fi
+ fi
+
+ update_desktop
+}