aboutsummaryrefslogtreecommitdiffstats
path: root/main/libsrtp/APKBUILD
blob: 3a2a32f40ef865ad91efae6ce8187195d49e69d0 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libsrtp
pkgver=2.2.0
pkgrel=0
pkgdesc="An implementation of the Secure Real-time Transport Protocol (SRTP)"
url="http://srtp.sourceforge.net"
arch="all"
license="BSD-3-Clause"
makedepends="automake autoconf libtool"
subpackages="$pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/cisco/libsrtp/archive/v$pkgver.tar.gz"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make all shared_library
}

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

check() {
	cd "$builddir"
	# Required for loading libsrtp2.so.1
	LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$builddir" make runtest
}

static() {
	depends=""
	pkgdesc="$pkgdesc (static library)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib
}

sha512sums="3a5214b02199ae8dff45a2ed225ed9b1dcb75a9c6b07669e23bf86f97ad26e3e22b4930acdf3c56b21b605211a89a53a17c61602195b391a5b29a09823ba868c  libsrtp-2.2.0.tar.gz"