summaryrefslogtreecommitdiffstats
path: root/main/sngtc_client/APKBUILD
blob: d0f9dbf6bdc88ea1a528ed95114df923b1dce10b (plain)
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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sngtc_client
pkgver=1.3.2
pkgrel=1
pkgdesc="Sangoma Media Transcode client and lib"
url="http://wiki.sangoma.com/Transcoding-distributed-install"
arch="all"
license="LGPL"
depends=""
makedepends="ortp-dev"
install=""
subpackages="$pkgname-dev"
# they ship firmware updater and server lib as precompiled closed source
# thats why the source package holds <arch>. The client code appears to
# be equal on both i686 an x86_64 so we just pick i686 package for all
# our archs.
source="ftp://ftp.sangoma.com/linux/transcoding/sng-tc-linux-$pkgver.i686.tgz
	sngtc_client-dynamic-ortp.patch"

_builddir="$srcdir"/sng-tc-linux-$pkgver.i686
prepare() {
	local i
	cd "$_builddir"

	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	# use dynamic ortp from system
	rm -r client/sngtc_client/*ortp*
}

build() {
	cd "$_builddir"
	make libsngtc libsngtc_node sngtc_client || return 1 
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" libsngtc_node-install sngtc_client-install || return 1
	mkdir -p "$pkgdir"/usr/include/sng_tc
	cp server/libsngtc/*.h "$pkgdir"/usr/include/sng_tc/
}

md5sums="6db4f71d2cd798f7802b71300d476e5a  sng-tc-linux-1.3.2.i686.tgz
2c6b702af7ec9adc144823000012336c  sngtc_client-dynamic-ortp.patch"