File PKGBUILD of Package belle-sip

# 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=belle-sip
_pkgname=belle-sip
pkgver=5.3.5
pkgrel=1
pkgdesc="A Voice-over-IP phone"
arch=('x86_64')
url="https://github.com/BelledonneCommunications/belle-sip/"
license=('GPL3')
# "belr>=$pkgver" "bctoolbox>=$pkgver"
depends=('avahi' "belr>=5.3.5" "bctoolbox>=5.3.5")
makedepends=('cmake' 'procps-ng' 'bc' 'gzip' 'libdecaf')
options=('!emptydirs')
source=("${_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 "$pkgname-$pkgver" \
        -DCMAKE_BUILD_PARALLEL_LEVEL=${_jobsIget} \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DENABLE_STATIC=NO \
        -DENABLE_MDNS=YES \
        -DENABLE_STRICT=YES \
        -DENABLE_UNIT_TESTS=OFF \
        -DENABLE_TESTS=NO .
  make -C build -j ${_jobsIget}
}

package() {
  make DESTDIR="$pkgdir" -C build install
}
openSUSE Build Service is sponsored by