44 lines
990 B
Plaintext
Executable File
44 lines
990 B
Plaintext
Executable File
#!/usr/bin/env modbuild
|
|
|
|
pbuild::configure(){
|
|
:
|
|
}
|
|
|
|
pbuild::compile(){
|
|
:
|
|
}
|
|
|
|
pbuild::install() {
|
|
|
|
# Get the OS and architecture
|
|
os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
|
arch=$(uname -m)
|
|
case "$arch" in
|
|
x86_64|amd64) arch="64" ;;
|
|
i386|i686) arch="32" ;;
|
|
aarch64) arch="arm64" ;;
|
|
armv7*) arch="arm" ;;
|
|
esac
|
|
|
|
ZIP="${PREFIX}/${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}"
|
|
|
|
# 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"
|
|
}
|