Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions o/opus/build_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"maintainer": "Harithanagothu2",
"maintainer": "shivansh-ibm",
"package_name": "opus",
"github_url": "https://github.com/xiph/opus",
"version": "v1.3.1",
Expand All @@ -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"
]
}
}
77 changes: 77 additions & 0 deletions o/opus/opus_ubi_10.1.sh
Original file line number Diff line number Diff line change
@@ -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 <shivansh.s1@ibm.com>
# 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

Loading