aboutsummaryrefslogtreecommitdiffstats
path: root/community/live-media/APKBUILD
blob: 50b47860a74bdef6d5ce06e05a5c93fa593d1a79 (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
55
56
57
58
59
60
61
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=live-media
pkgver=2020.04.06
pkgrel=0
pkgdesc="A set of C++ libraries for multimedia streaming"
url="http://live555.com/liveMedia"
arch="all"
license="LGPL-3.0-or-later"
subpackages="$pkgname-dev $pkgname-utils"
options="!check"
source="http://live555.com/liveMedia/public/live.$pkgver.tar.gz
	0001-Add-a-pkg-config-file-for-the-shared-libraries.patch
	0003-Link-shared-libraries-with-g-instead-of-gcc-to-fix-b.patch
	0004-Reduce-number-of-unresolved-symbols-by-linking-libra.patch
	0005-Build-without-OpenSSL.patch
"
builddir="$srcdir"/live

prepare() {
	chmod -R 775 *
	default_prepare
}

build() {
	./genMakefiles linux-with-shared-libraries
	make PREFIX=/usr LIBDIR=/usr/lib
}

package() {
	local testprog f so
	mkdir -p "$pkgdir"/usr/lib
	for f in BasicUsageEnvironment UsageEnvironment liveMedia groupsock; do
		mkdir -p "$pkgdir"/usr/include/$f
		cp $f/include/*.h* "$pkgdir"/usr/include/$f
		for so in $f/lib*.so.*; do
			soname=$(scanelf -B --format "#F%S" $so)
			cp $so "$pkgdir"/usr/lib/
			so=${so##*/}
			ln -s $so "$pkgdir"/usr/lib/$soname
			ln -s $so "$pkgdir"/usr/lib/${soname%.so.*}.so
		done
	done

	mkdir -p "$pkgdir"/usr/bin
	for testprog in $(find testProgs -type f -perm 755); do
		install $testprog "$pkgdir"/usr/bin
	done
}

utils() {
	pkgdesc="multimedia RTSP streaming tools"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="f9016a3c5bbbe990da5a012a425b3869951e211327bb66c8b6c368e30d01366789a9eec5dba7802d85bd7383870956dd42680e09063a3be3251eb8be7b9906ad  live.2020.04.06.tar.gz
d542668dfe9386dc31389db6dfe9ed20a8395ede5d1dabfee40f49ad0db67d0b3665c8dcd59d48e4761ba00beeecc3197b2d25cb3a04ef40988f949269e7c9ef  0001-Add-a-pkg-config-file-for-the-shared-libraries.patch
5cf4a6159531e126bee83f981bd8583a1cef68cde2129f0d255b2f2d73055a21b7bf2bbcc822aa0265f1df7c32add6b95c57f59c5e08060750567fc268643612  0003-Link-shared-libraries-with-g-instead-of-gcc-to-fix-b.patch
d5be57357d3c04356aac41804ee3d13434f754c7f86936e24a39c5e966a902628d9570afb37aa96a7c33a45fa5787182bec0441394d114e59d5a1f25250ea0c5  0004-Reduce-number-of-unresolved-symbols-by-linking-libra.patch
cb737f55844773a0ad13bb17c1ab236c880a3eebe9ac11cef30bccd949cc7a144cc73a9b81ead6b011c8664c2863f57e1b8255790fe6652146a1b094f879761a  0005-Build-without-OpenSSL.patch"