aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-gst/APKBUILD
blob: 5aee6c35016ac68bfe5a711c1c4b29910bc1d25a (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
62
63
64
65
66
67
68
69
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=py-gst
pkgver=1.12.3
pkgrel=0
pkgdesc="GStreamer Python binding"
url="https://cgit.freedesktop.org/gstreamer/gst-python/"
arch="all"
license="LGPL-2.1"
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="http://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="f4d0d09a5b068e79496aa5e0d73f09af2d1e929cf6f80874dba8396950952b795a30f5a33c18b42a650f173c80ce342f959d497aa0d9d281bbe36507a71d1b4a  gst-python-1.12.3.tar.xz"