File PKGBUILD of Package ortp
# Get some information about the machine we are building on:
_numberOfProcessorsOnMachine=$(nproc)
_wantedJobs=$(echo "1.25*${_numberOfProcessorsOnMachine}" | bc -l)
_jobsIget=$(echo ${_wantedJobs} | awk '{print int($1+0.5)}')
_TOTAL_DISK=$(df -h --total | awk 'END{print $2}')
_FREEMEM=$(free --mega)
_TOTAL_MEM=$(free --total --mega | xargs | awk '{print $19"MB"}')
_TOTAL_RAM=$(free --total --mega | xargs | awk '{print $8"MB"}')
_TOTAL_SWAP=$(free --total --mega | xargs | awk '{print $15"MB"}')
pkgname=ortp
pkgver=5.3.5
pkgrel=1
pkgdesc='A Real-time Transport Protocol (RTP) library'
arch=(x86_64)
url='https://gitlab.linphone.org/'
license=(GPL3)
# "bctoolbox>=$pkgver"
depends=("bctoolbox>=5.3.5")
makedepends=(cmake doxygen "bctoolbox>=5.3.5" 'procps-ng' 'bc' 'gzip' libdecaf)
source=(https://gitlab.linphone.org/BC/public/$pkgname/-/archive/$pkgver/$pkgname-$pkgver.tar.bz2)
sha256sums=('SKIP')
build() {
echo "--- Machine data we are building on ---"
echo "Total disk: $_TOTAL_DISK"
echo "Output of free -h:"
echo "$_FREEMEM"
echo "Total memory: $_TOTAL_MEM"
echo "Total RAM: $_TOTAL_RAM"
echo "Total SWAP: $_TOTAL_SWAP"
echo "_numberOfProcessorsOnMachine=$_numberOfProcessorsOnMachine"
echo "_wantedJobs=$_wantedJobs"
echo "_jobsIget=$_jobsIget"
echo "--- End machine data we are building on ---"
cmake -B build -S $pkgname-$pkgver \
-DCMAKE_BUILD_PARALLEL_LEVEL=${_jobsIget} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DENABLE_STATIC=OFF \
-DENABLE_DOC=OFF \
-DENABLE_TESTS=OFF \
-DENABLE_UNIT_TESTS=OFF
cmake --build build --parallel ${_jobsIget}
}
package() {
DESTDIR="$pkgdir" cmake --install build
}