# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/sun-jre-142/java-sun-conf.in # Copyright (C) 2004 - 2023 The T2 SDE Project # Copyright (C) 1998 - 2005 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- autoextract=0 makeopt='' makeinstopt='' # Make prefix same a java_home. This way artifacts like the bin, lib # and doc directory are created at the proper level. . $base/package/*/*/java-jdk-conf.in $1 java_home_original= # Gnome support is only turned on when gnome is installed. if pkginstalled libgnome; then pkgprefix -t libgnome GNOME_DIR=$root/$(pkgprefix libgnome) export GNOME_DIR fi # The archive to be installed/patched depends on the # current architecture. java_srctar= case $arch in x86) java_srctar="`match_source_file -p -i586`" ;; ia64) java_srctar="`match_source_file -p -ia64`" ;; x86-64) java_srctar="`match_source_file -p -x64`" ;; esac # Make sure there is a file to be patched. If not we # apparently do not support the current architecture. [ "$java_srctar" ] || abort "No binary for this architecture ($arch) detected!" # Custom pre patching. java_preconf() { # eliminate interactivity and integrity checks. cp -v $java_srctar . sed -i 's,more <<,cat <<,' ${java_srctar##*/} sed -i 's,agreed=,agreed=1,' ${java_srctar##*/} sed -i 's,`agree`,yes,' ${java_srctar##*/} if [[ $pkg == *-150 ]]; then patch -p0 ${java_srctar##*/} $confdir/../sun-jre-150/mime-type-remove.diff fi # Retrieve the original javahome name from the archive. tempvar="`head -n70 ${java_srctar##*/} | grep javahome`" java_home_original=${tempvar/*=/} # Ready to unpack/install the archive. sh ${java_srctar##*/} -noregister } # Custom installation. java_postmake() { # Copy all stuff from the original home to our java-home. # But to make sure any possible links stay intact we use # tar | untar instead of cp. (cd $builddir/$java_home_original; tar -c * | tar -x -C /$prefix) } hook_add preconf 5 java_preconf hook_add postmake 5 java_postmake