aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mediastreamer2/APKBUILD
blob: 1b4674684ba61a738dfea6db5e80529282d5e540 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname="mediastreamer2"
_pkgname=${pkgname/2/}
pkgver="2.16.1"
pkgrel=0
pkgdesc="A library written in C that allows you to create and run audio and video streams"
url="https://www.linphone.org/technical-corner/mediastreamer2/overview"
arch="" # Fails to find bctoolbox-4.3.0
license="GPL-2.0-or-later"
options="!check" # no test available
makedepends="cmake gettext-dev ffmpeg-dev ortp-dev
	libxv-dev speex-dev speexdsp-dev libsrtp-dev
	v4l-utils-dev bctoolbox-dev mesa-dev glew-dev
	opus-dev libpcap-dev spandsp-dev tiff-dev libtheora-dev
	alsa-lib-dev python3-dev gsm-dev
	libpcap-dev jpeg-dev"
subpackages="$pkgname-dev"
source="https://www.linphone.org/releases/sources/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake \
		-DCMAKE_SKIP_INSTALL_RPATH=ON \
		-DENABLE_STRICT=NO \
		-DENABLE_ALSA=YES \
		-DENABLE_STATIC=NO \
		-DENABLE_RESAMPLE=YES \
		-DENABLE_JPEG=YES \
		-DENABLE_PCAP=YES \
		-DENABLE_FFMPEG=YES \
		-DENABLE_SPEEX_CODEC=YES \
		-DENABLE_SPEEX_DSP=YES \
		-DENABLE_SHARED=YES .
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

dev()  {
	default_dev
	mkdir -p "$subpkgdir"/usr/lib/cmake/Mediastreamer2
	mv "$pkgdir"/usr/share/Mediastreamer2/cmake/* "$subpkgdir"/usr/lib/cmake/Mediastreamer2
	# Remove empty dirs
	rmdir "$pkgdir"/usr/share/Mediastreamer2/cmake
	rmdir "$pkgdir"/usr/share/Mediastreamer2
}

sha512sums="44b3a5092aedf65b5503c7843c88e4acc2d0e72093a4f057440355c281135a17c898c1c01438e372bf7c8ae2f30a79ad8a59315f3f3d9b914599a185e90fbe81  mediastreamer-2.16.1.tar.gz"