1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
4 # T2 SDE: package/.../blackdown-jre/java-blackdown-conf.in
5 # Copyright (C) 2004 - 2020 The T2 SDE Project
6 # Copyright (C) 1998 - 2005 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- T2-COPYRIGHT-NOTE-END ---
16 # Prevent normal package extraction. However since auto package
17 # extraction is turned off, so are the pre and post patch hooks.
18 # Instead we abuse the preconf hook to do the necessary patching.
21 # Prevent executing normal make and install build steps.
22 # This package has custom make and install.
26 # Make prefix same a java_home. This way artifacts like the bin, lib
27 # and doc directory are created at the proper level.
28 . $base/package/*/*/java-jdk-conf.in $1
33 # Check if installing needs to be done with or without X11.
34 if ! pkginstalled xorg; then
35 var_append java_install_opt ' ' "--nox11"
38 # The archive to be installed/patched depends on the
39 # current architecture.
42 x86) java_srctar="`match_source_file -p -i586`" ;;
43 x86-64) java_srctar="`match_source_file -p -amd64`" ;;
46 # Make sure there is a file to be patched. If not we
47 # apparently do not support the current architecture.
48 [ "$java_srctar" ] || abort "No binary for this architecture ($arch) detected!"
51 # Custom pre patching.
53 # eliminate interactivity and integrity checks.
55 sed -i 's/MD5=.*$/MD5=\\"00000000000000000000000000000000\\"; SETUP_NOCHECK=1/' ${java_srctar##*/}
56 sed -i 's/more <</agreed=1; cat <</' ${java_srctar##*/}
58 # Retrieve the original JAVAHOME name from the archive.
59 tempvar="`head -n15 ${java_srctar##*/} | grep JAVAHOME`"
60 java_home_original=${tempvar/*=/}
62 # Ready to unpack/install the archive.
66 # Custom installation.
68 # Copy all stuff from the original home to our java-home.
69 # But to make sure any possible links stay intact we use
70 # tar | untar instead of cp.
71 ( cd $builddir/$java_home_original; tar -c * | tar -x -C /$prefix )
74 hook_add preconf 5 java_preconf
75 hook_add postmake 5 java_postmake