void-packages/srcpkgs/baresip/template

62 lines
2.0 KiB
Bash

# Template file for 'baresip'
pkgname=baresip
version=2.7.0
revision=2
build_style=gnu-makefile
make_build_args="LIBRE_MK=${XBPS_CROSS_BASE}/usr/share/re/re.mk
DESTDIR=${DESTDIR} V=1 LIBRE_INC=${XBPS_CROSS_BASE}/usr/include/re
SYSROOT=${XBPS_CROSS_BASE}/usr SYSROOT_LOCAL=${XBPS_CROSS_BASE}/usr
LIBRE_SO=${XBPS_CROSS_BASE}/usr/lib LIBDIR=/usr/lib${XBPS_TARGET_WORDSIZE}
USE_ALSA=y USE_GST=y USE_GST_VIDEO=y USE_OSS=y USE_SDL=y"
make_install_args="$make_build_args"
make_use_env=1
hostmakedepends="pkg-config glib-devel"
makedepends="libgsm-devel libpng-devel openssl-devel libsndfile-devel
opus-devel re-devel rem-devel spandsp-devel speex-devel speexdsp-devel
tiff-devel twolame-devel sndio-devel"
short_desc="Modular SIP User-Agent with audio and video support"
maintainer="John <me@johnnynator.dev>"
license="BSD-3-Clause"
homepage="https://github.com/baresip/baresip"
changelog="https://raw.githubusercontent.com/baresip/baresip/main/CHANGELOG.md"
distfiles="https://github.com/baresip/baresip/archive/refs/tags/v${version}.tar.gz"
checksum=6bc3ac1b2a301b6de91a40079a9ec44545a00c57662ca0bdf2518fbb932ff181
# Package build options
build_options="gtk3 video"
build_options_default="gtk3 video"
desc_option_video="Enable support for video calling"
if [ "$build_option_video" ]; then
make_build_args+=" USE_SNAPSHOT=y USE_AVCODEC=y USE_AVFORMAT=y
USE_SDL2=y USE_V4L2=y USE_VIDEO=y USE_VPX=y USE_X11=y"
makedepends+=" SDL2-devel ffmpeg-devel libvpx-devel libX11-devel
v4l-utils-devel x265-devel libXext-devel"
fi
if [ "$build_option_gtk3" ]; then
make_build_args+=" USE_GST1=y USE_GST_VIDEO1=y USE_GTK=y"
makedepends+=" cairo-devel gst-plugins-base1-devel gstreamer1-devel
gtk+3-devel mpg123-devel"
fi
case $XBPS_TARGET_MACHINE in
i686*) arch="i686";;
x86_64*) arch="x86_64";;
armv6*) arch="arm6";;
aarch64*) arch="arm64";;
arm*) arch="arm";;
mips*) arch="mips";;
esac
make_build_args+=" ARCH=$arch"
make_install_args+=" ARCH=$arch"
pre_build() {
make ${make_build_args} info
}
post_install() {
vlicense docs/COPYING
}