File PKGBUILD of Package belle-sip
# Fix for error: bsdtar: Failed to set default locale
# LANG=en_US.UTF-8 # not available, use C or POSIX
LANG=C
LC_ALL=${LANG}
pkgname=belle-sip
pkgver=5.3.37
pkgrel=0
pkgdesc="A Voice-over-IP phone"
arch=('x86_64')
url="https://github.com/BelledonneCommunications/belle-sip/"
license=('GPL3')
# With debug symbols
options=(!strip)
conflicts=($pkgname)
provides=("$pkgname=$pkgver")
depends=(avahi belr bctoolbox)
makedepends=('cmake')
options=('!emptydirs')
source=("${pkgname}-${pkgver}.tar.bz2"
set_current_version.patch)
sha256sums=(SKIP SKIP)
_uploaddir=/usr/src/packages/SOURCES
_sourcedir=/usr/src/packages/BUILD/${pkgname}/src/${pkgname}-${pkgver}
# srcdir is already defined as
# ${srcdir}=/usr/src/packages/BUILD/${pkgname}/src
_builddir=/usr/src/packages/BUILD/${pkgname}/build
_pkgdir=/usr/src/packages/BUILD/${pkgname}/pkg/${pkgname}
_installToDir=${_pkgdir}
prepare() {
echo "Move patching to build() section for verbose log output"
# patch -d "${_sourcedir}" -p1 < fix.patch
# patch -d "${_sourcedir}" --forward --strip=1 --input="${srcdir}/fix.patch"
# patch -d "${_sourcedir}" --forward --strip=1 --input="${_uploaddir}/fix.patch"
patch -d "${_sourcedir}" -p1 < set_current_version.patch
}
build() {
cmake -S "${_sourcedir}" -B "${_builddir}" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DENABLE_STATIC=NO \
-DENABLE_MDNS=YES \
-DENABLE_STRICT=YES \
-DENABLE_TESTS=NO
make -C "${_builddir}"
}
package() {
rm -rf "${pkgdir}"; mkdir -pv "${pkgdir}"
make install -C "${_builddir}" DESTDIR="${_installToDir}"
# make install -C "${_builddir}" DESTDIR="${_installToDir}" --strip
echo
echo pkgdir=${pkgdir}
echo "--- Show files that will be packaged ---"
find ${pkgdir} | sed "s|${pkgdir}||g" | sort
echo "--- End show files that will be packaged ---"
}