# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gst-plugins-good
pkgver=1.12.3
pkgrel=0
pkgdesc="GStreamer Multimedia Framework Good Plugins"
url="https://gstreamer.freedesktop.org/"
arch="all"
license="LGPL"
subpackages="$pkgname-lang $pkgname-doc"
depends=
replaces="gst-plugins-good1"
depends_dev="gstreamer-dev gst-plugins-base-dev"
makedepends="$depends_dev
	flac-dev
	gdk-pixbuf-dev
	glib-dev
	jack-dev
	libavc1394-dev
	libdv-dev
	libgudev-dev
	libice-dev
	libiec61883-dev
	libjpeg-turbo-dev
	libogg-dev
	liboil-dev
	libpng-dev
	libshout-dev
	libsm-dev
	libsoup-dev
	libvpx-dev
	libxdamage-dev
	libxext-dev
	libxv-dev
	linux-headers
	orc-dev
	taglib-dev
	v4l-utils-dev
	wavpack-dev
	zlib-dev
	"
replaces=
ldpath="/usr/lib/gstreamer-.0"
source="https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-$pkgver.tar.xz
	"
builddir="$srcdir"/gst-plugins-good-$pkgver

# secfixes:
#   1.10.4-r0:
#   - CVE-2017-5840
#   - CVE-2017-5841
#   - CVE-2017-5845
#   - CVE-2016-9634
#   - CVE-2016-9635
#   - CVE-2016-9636
#   - CVE-2016-9808
#   - CVE-2016-10198
#   - CVE-2016-10199

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-static \
		--enable-experimental \
		--disable-fatal-warnings \
		--with-package-name="GStreamer Good Plugins (Alpine Linux)" \
		--with-package-origin="http://alpinelinux.org/" \
		|| return 1
	make
}

package() {
	cd "$builddir"
	export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
	make DESTDIR="$pkgdir" install || return 1
}

doc() {
	default_doc
	replaces="${pkgname}1-doc"
}
sha512sums="8ed96d2b2c8724659cf8163be5246ec30c8a92d70fc6632e207ad258cff5624d6fc03576e6e674011bb88a4825c8ce225545bc7e60cdf66a173d9e1d4bfbbaa4  gst-plugins-good-1.12.3.tar.xz"
