aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-gst/APKBUILD
blob: 6e506e80b7b334a5664c2d240ae56ca686777bae (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=py-gst
pkgver=1.14.2
pkgrel=0
pkgdesc="GStreamer Python binding"
url="https://cgit.freedesktop.org/gstreamer/gst-python/"
arch="all"
license="LGPL-2.1-or-later"
depends="py-gobject3 gst-plugins-base"
depends_dev=""
makedepends="gstreamer-dev py-gobject3-dev python2-dev gst-plugins-base-dev
	python3-dev automake autoconf libtool
	"
install=""
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://gstreamer.freedesktop.org/src/gst-python/gst-python-$pkgver.tar.xz
	"
builddir="$srcdir/gst-python-$pkgver"

prepare() {
	default_prepare
	autoreconf -vif
	cp -r "$builddir" "$srcdir"/python2
	cp -r "$builddir" "$srcdir"/python3
}

build()	{
	_build python2
	_build python3
}

package() {
	mkdir -p "$pkgdir"
}

_build() {
	local python="$1"
	export PYTHON=$python
	cd "$srcdir"/$python
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

_py2() {
	depends="${depends//py-/py2-}"
	_py python2
}

_py3() {
	depends="${depends//py-/py3-}"
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	install_if="$pkgname=$pkgver-r$pkgrel $python"
	cd "$srcdir"/"$python"
	make DESTDIR="$subpkgdir" install
}

sha512sums="56c646dc754cb11857e2599877d8824883274dad5dc87c737ceaca5fd57ca910a726c47ac8e83ac99b32b3f401a32631e12d8ed4c1ff1cecf616b4d6fc18908b  gst-python-1.14.2.tar.xz"