From 838016f47397043d106d50413e3306c88c5acf9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Agostinho=20de=20Sousa?= Date: Fri, 21 Nov 2025 15:56:14 +0100 Subject: [PATCH] Changed build to keep the same structure of the installation as the zip archive --- olex2/build | 38 ++++++++++++++------------------------ olex2/modulefile | 3 +++ 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/olex2/build b/olex2/build index fad32ba..d17357d 100755 --- a/olex2/build +++ b/olex2/build @@ -1,15 +1,6 @@ #!/usr/bin/env modbuild pbuild::configure(){ - : -} - -pbuild::compile(){ - : -} - -pbuild::install() { - # Get the OS and architecture os=$(uname -s | tr '[:upper:]' '[:lower:]') arch=$(uname -m) @@ -20,24 +11,23 @@ pbuild::install() { armv7*) arch="arm" ;; esac - ZIP="${PREFIX}/${P}-${os}${arch}.zip" + ZIP="${SRC_DIR}/${P}-${os}${arch}.zip" # Copy the zip archive from the build directory cp -n "${BUILDBLOCK_DIR}/${P}-${os}${arch}.zip" "$ZIP" - # Extract contents directly into PREFIX - unzip -o -q "$ZIP" -d "${PREFIX}" + # Extract contents directly into SRC_DIR + unzip -o -q "$ZIP" -d "${SRC_DIR}" - # Create the bin directory - mkdir -p "${PREFIX}/bin" - - # Copy the executable files to the bin directory - find "${PREFIX}/${P}" -maxdepth 1 -type f -perm -111 -exec mv {} "${PREFIX}/bin/" \; - - # Move all contents of the zip archive into PREFIX - mv "${PREFIX}/${P}/"* "${PREFIX}/" - rmdir "${PREFIX}/${P}" - - # Remove zip archive - rm "$ZIP" + # Clean up the zip file + rm -f "$ZIP" +} + +pbuild::compile(){ + : +} + +pbuild::install() { + # Move all contents of the zip archive into PREFIX + mv "${SRC_DIR}/${P}/"* "${PREFIX}/" } diff --git a/olex2/modulefile b/olex2/modulefile index 7b6d92a..e46b9d1 100644 --- a/olex2/modulefile +++ b/olex2/modulefile @@ -16,3 +16,6 @@ workflow into a single, intuitive package. # Use software OpenGL explicitly to avoid Vulkan drivers missing error setenv LIBGL_ALWAYS_SOFTWARE 1 + +# Because the executable files need to be in the top directory +prepend-path PATH $PREFIX -- 2.49.1