From 81f7ab262380a095b596dbd7f792213f9cc6caca Mon Sep 17 00:00:00 2001 From: shivansh-ibm Date: Sun, 9 Aug 2026 21:55:19 -0700 Subject: [PATCH] added build script for opus==1.3.1 for UBI 10.1 --- o/opus/build_info.json | 7 ++-- o/opus/opus_ubi_10.1.sh | 77 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 o/opus/opus_ubi_10.1.sh diff --git a/o/opus/build_info.json b/o/opus/build_info.json index f9fbbe3797..aa5cd20bec 100644 --- a/o/opus/build_info.json +++ b/o/opus/build_info.json @@ -1,5 +1,5 @@ { - "maintainer": "Harithanagothu2", + "maintainer": "shivansh-ibm", "package_name": "opus", "github_url": "https://github.com/xiph/opus", "version": "v1.3.1", @@ -12,6 +12,9 @@ "validate_build_script": true, "use_non_root_user": "false", "*":{ - "build_script":"opus_ubi_9.3.sh" + "build_script": [ + "opus_ubi_9.3.sh", + "opus_ubi_10.1.sh" + ] } } diff --git a/o/opus/opus_ubi_10.1.sh b/o/opus/opus_ubi_10.1.sh new file mode 100644 index 0000000000..1c2a3a7e47 --- /dev/null +++ b/o/opus/opus_ubi_10.1.sh @@ -0,0 +1,77 @@ +#!/bin/bash -e +# ----------------------------------------------------------------------------- +# +# Package : opus +# Version : 1.3.1 +# Source repo : https://github.com/xiph/opus +# Tested on : UBI:10.1 +# Language : Python, C +# Ci-Check : True +# Script License: Apache License, Version 2 or later +# Maintainer : Shivansh Sharma +# Disclaimer: This script has been tested in root mode on given +# ========== platform using the mentioned version of the package. +# It may not work as expected with newer versions of the +# package and/or distribution. In such case, please +# contact "Maintainer" of this script. +# +# ---------------------------------------------------------------------------- + +PACKAGE_NAME=opus +PACKAGE_DIR=opus +PACKAGE_VERSION=${1:-v1.3.1} +PACKAGE_URL=https://github.com/xiph/opus + +# install core dependencies +yum install -y python3.12 python3.12-pip python3.12-devel git cmake gcc-toolset-15 autoconf automake libtool wget +export PATH=/opt/rh/gcc-toolset-15/root/usr/bin:$PATH + +# clone source repository +git clone $PACKAGE_URL +cd $PACKAGE_DIR +git checkout $PACKAGE_VERSION + +mkdir prefix +export PREFIX=$(pwd)/prefix + +if [[ $(uname) == MSYS* ]]; then + if [[ ${ARCH} == 32 ]]; then + HOST_BUILD="--host=i686-w64-mingw32 --build=i686-w64-mingw32" + else + HOST_BUILD="--host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32" + fi + PREFIX=${PREFIX}/Library/mingw-w64 + JOBS=${NUMBER_OF_PROCESSORS} +elif [[ $(uname) == Darwin ]]; then + JOBS=$(sysctl -n hw.ncpu) +else + JOBS=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) +fi + +./autogen.sh +./configure --prefix=$PREFIX $HOST_BUILD && make -j$JOBS && make install + +#test +make check + +mkdir -p local/opus +cp -r ${PREFIX}/* local/opus/ + +pip install setuptools + +#pyproject.toml +wget https://raw.githubusercontent.com/ppc64le/build-scripts/refs/heads/master/o/opus/pyproject.toml +sed -i s/{PACKAGE_VERSION}/$PACKAGE_VERSION/g pyproject.toml + +if ! python3.12 -m pip install . ; then + echo "------------------$PACKAGE_NAME:Install_fails-------------------------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails" + exit 1 +else + echo "------------------$PACKAGE_NAME:Install_success-------------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_Success" + exit 0 +fi +