%bcond_without qt

Name:		gstreamer1-plugins-good
Summary:	GStreamer Streaming-media framework good plugins
Summary(ja):	GStreamer ストリーミングメディアフレームワーク用優良プラグイン
Version:	1.20.3
Release:	1%{?_dist_release}
Group:		system,multimedia
Vendor:		Project Vine
Distribution:	Vine Linux

License:	LGPL
URL:		https://gstreamer.freedesktop.org/
Source:		https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.xz

%define major 1.0

%define _gst_ver	1.20.3
%define _gstpb_ver	1.20.3
%define _glib2_ver	2.38.0
%define _gtk3_ver	3.10.0
%define _check_ver	0.9.2
%define _cairo_ver	1.0.0
%define _flac_ver	1.2.0
%define _libdv_ver	0.100
%define _libpng_ver	1.2.0
%define _speex_ver	1.1.5
%define _taglib_ver	1.5
%define _dbus_ver	1.0
%define _soup_ver	2.26.0
%define _pulse_ver	0.9.20

%define po_package	gst-plugins-good-%{major}

BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	gstreamer1-devel >= %{_gst_ver}
BuildRequires:	gstreamer1-plugins-base-devel >= %{_gstpb_ver}
BuildRequires:	glib2-devel >= %{_glib2_ver}
BuildRequires:	check-devel >= %{_check_ver}
BuildRequires:	gtk3-devel >= %{_gtk3_ver}
BuildRequires:	cairo-devel >= %{_cairo_ver}
BuildRequires:	flac-devel >= %{_flac_ver}
BuildRequires:	libjpeg-devel
BuildRequires:	libdv-devel >= %{_libdv_ver}
BuildRequires:	libpng >= %{_libpng_ver}
BuildRequires:	libavc1394-devel libraw1394-devel libiec61883-devel
BuildRequires:	speex-devel >= %{_speex_ver}
BuildRequires:	zlib-devel
BuildRequires:	taglib-devel >= %{_taglib_ver}
BuildRequires:	dbus-devel >= %{_dbus_ver}
BuildRequires:	libsoup-devel >= %{_soup_ver}
BuildRequires:  pulseaudio-libs-devel >= %{_pulse_ver}
BuildRequires:  orc-devel
BuildRequires:  libgudev1-devel
BuildRequires:  libv4l-devel
BuildRequires:  libvpx-devel
BuildRequires:  libSM-devel
BuildRequires:  libXext-devel
BuildRequires:  libXv-devel
BuildRequires:  bzip2-devel
BuildRequires:  jack-audio-connection-kit-devel
BuildRequires:  libuuid-devel
BuildRequires:  lame-devel
BuildRequires:  nasm
BuildRequires:  meson
%if %{with qt}
BuildRequires:	pkgconfig(Qt5Gui)
BuildRequires:	pkgconfig(Qt5Qml)
BuildRequires:	pkgconfig(Qt5Quick)
BuildRequires:	pkgconfig(Qt5X11Extras)
BuildRequires:	pkgconfig(Qt5WaylandClient)
%endif

Requires:	gstreamer1 >= %{_gst_ver}
Requires:	gstreamer1-plugins-base >= %{_gstpb_ver}
Obsoletes:	%{name}-doc < 1.18.0
Obsoletes:	%{name}-aa < 1.18.0

%description
GStreamer is a streaming-media framework, based on graphs of filters which
operate on media data. Applications using this library can do anything
from real-time sound processing to playing videos, and just about anything
else media-related.  Its plugin-based architecture means that new data
types or processing capabilities can be added simply by installing new
plugins.

This package contains a set of well-supported plugins of good quality and
under the LGPL license.


%package flac
Summary:	GStreamer plugin for de/encoding FLAC files
Summary(ja):	GStreamer FLAC ファイルデコード/エンコードプラグイン
Group:		system,multimedia
Requires:	%{name} = %{version}-%{release}
Requires:	flac >= %{_flac_ver}

%description flac
GStreamer is a streaming-media framework, based on graphs of filters which
operate on media data. Applications using this library can do anything
from real-time sound processing to playing videos, and just about anything
else media-related.  Its plugin-based architecture means that new data
types or processing capabilities can be added simply by installing new
plugins.

This package contains GStreamer plugin for de/encoding FLAC files.


%package speex
Summary:	GStreamer plugin for de/encoding Speex files
Summary(ja):	GStreamer Speex ファイルデコード/エンコードプラグイン
Group:		system,multimedia
Requires:	%{name} = %{version}-%{release}
Requires:	speex >= %{_speex_ver}

%description speex
GStreamer is a streaming-media framework, based on graphs of filters which
operate on media data. Applications using this library can do anything
from real-time sound processing to playing videos, and just about anything
else media-related.  Its plugin-based architecture means that new data
types or processing capabilities can be added simply by installing new
plugins.

This package contains GStreamer plugin for de/encoding Speex files.


%package dv
Summary:	GStreamer DV plugin
Summary(ja):	GStreamer DV プラグイン
Group:		system,multimedia
Requires:	%{name} = %{version}-%{release}
Requires:	libdv >= %{_libdv_ver}

%description dv
GStreamer is a streaming-media framework, based on graphs of filters which
operate on media data. Applications using this library can do anything
from real-time sound processing to playing videos, and just about anything
else media-related.  Its plugin-based architecture means that new data
types or processing capabilities can be added simply by installing new
plugins.

This package contains GStreamer plugin for digital video support using
libdv.


%package raw1394
Summary:	GStreamer raw1394 FireWire plugin
Summary(ja):	GStreamer raw1394 FireWire プラグイン
Group:		system,multimedia
Requires:	%{name} = %{version}-%{release}
Requires:	libavc1394, libraw1394, libiec61883

%description raw1394
GStreamer is a streaming-media framework, based on graphs of filters which
operate on media data. Applications using this library can do anything
from real-time sound processing to playing videos, and just about anything
else media-related.  Its plugin-based architecture means that new data
types or processing capabilities can be added simply by installing new
plugins.

This package contains GStreamer plugin for digital video support using
raw1394.


%package gtk
Summary:	GStreamer "good" plugins gtk plugin
Group:		system,multimedia
Requires:	%{name}%{?_isa} = %{version}-%{release}

%description gtk
GStreamer is a streaming media framework, based on graphs of elements which
operate on media data.

GStreamer Good Plugins is a collection of well-supported plugins of
good quality and under the LGPL license.

This package (%{name}-gtk) contains the gtksink output plugin.


%if %{with qt}
%package qt
Summary:	GStreamer "good" plugins qt qml plugin
Group:		system,multimedia
Requires:	%{name}%{?_isa} = %{version}-%{release}
Supplements:	(gstreamer1-plugins-good and qt5-qtdeclarative)

%description qt
GStreamer is a streaming media framework, based on graphs of elements which
operate on media data.

GStreamer Good Plugins is a collection of well-supported plugins of
good quality and under the LGPL license.

This package (%{name}-qt) contains the qtsink output plugin.
%endif


%package jack
Summary:	GStreamer plugins for jack-audio-connector-kit
Group:		system,multimedia
Requires:	%{name}%{?_isa} = %{version}-%{release}

%description jack
GStreamer is a streaming media framework, based on graphs of filters
which operate on media data.

GStreamer Good Plugins is a collection of well-supported plugins of
good quality and under the LGPL license.

This package contains the jack-audio-connector-kit output plugin.


%debug_package


%prep
%setup -q -n gst-plugins-good-%{version}


%build
%meson \
  -Dpackage-name='Vine Linux GStreamer-plugins-good package' \
  -Dpackage-origin='https://vinelinux.org/' \
  -Ddoc=disabled \
  -Dasm=enabled \
  -Djack=enabled \
  -Dorc=enabled \
  -Dmonoscope=disabled \
  -Dlibcaca=disabled \
  -Drpicamsrc=disabled \
  -Dshout2=disabled \
  -Dmpg123=disabled \
  -Dtwolame=disabled \
  -Daalib=disabled \
  -Dwavpack=disabled \
  -Dtests=disabled \
  %{nil}
%meson_build


%install
[ -n $RPM_BUILD_ROOT -a $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
%meson_install

find $RPM_BUILD_ROOT -name '*.la' -exec rm -fv {} ';'

%find_lang %{po_package}


%clean
[ -n $RPM_BUILD_ROOT -a $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT


%files -f %{po_package}.lang
%defattr(-,root,root)
%license COPYING
%doc AUTHORS ChangeLog NEWS README RELEASE REQUIREMENTS
%dir %{_datadir}/gstreamer-%{major}/presets
%{_datadir}/gstreamer-%{major}/presets/*

# base plugins without external dependencies
%{_libdir}/gstreamer-%{major}/libgstalaw.so
%{_libdir}/gstreamer-%{major}/libgstalpha.so
%{_libdir}/gstreamer-%{major}/libgstalphacolor.so
%{_libdir}/gstreamer-%{major}/libgstapetag.so
%{_libdir}/gstreamer-%{major}/libgstaudiofx.so
%{_libdir}/gstreamer-%{major}/libgstaudioparsers.so
%{_libdir}/gstreamer-%{major}/libgstauparse.so
%{_libdir}/gstreamer-%{major}/libgstautodetect.so
%{_libdir}/gstreamer-%{major}/libgstavi.so
%{_libdir}/gstreamer-%{major}/libgstcutter.so
%{_libdir}/gstreamer-%{major}/libgstdebug.so
%{_libdir}/gstreamer-%{major}/libgstdeinterlace.so
%{_libdir}/gstreamer-%{major}/libgstdtmf.so
%{_libdir}/gstreamer-%{major}/libgsteffectv.so
%{_libdir}/gstreamer-%{major}/libgstequalizer.so
%{_libdir}/gstreamer-%{major}/libgstflv.so
%{_libdir}/gstreamer-%{major}/libgstflxdec.so
%{_libdir}/gstreamer-%{major}/libgstgoom.so
%{_libdir}/gstreamer-%{major}/libgstgoom2k1.so
%{_libdir}/gstreamer-%{major}/libgsticydemux.so
%{_libdir}/gstreamer-%{major}/libgstid3demux.so
%{_libdir}/gstreamer-%{major}/libgstimagefreeze.so
%{_libdir}/gstreamer-%{major}/libgstinterleave.so
%{_libdir}/gstreamer-%{major}/libgstisomp4.so
%{_libdir}/gstreamer-%{major}/libgstlevel.so
%{_libdir}/gstreamer-%{major}/libgstmatroska.so
%{_libdir}/gstreamer-%{major}/libgstmulaw.so
%{_libdir}/gstreamer-%{major}/libgstmultifile.so
%{_libdir}/gstreamer-%{major}/libgstmultipart.so
%{_libdir}/gstreamer-%{major}/libgstnavigationtest.so
%{_libdir}/gstreamer-%{major}/libgstoss4.so
%{_libdir}/gstreamer-%{major}/libgstreplaygain.so
%{_libdir}/gstreamer-%{major}/libgstrtp.so
%{_libdir}/gstreamer-%{major}/libgstrtsp.so
%{_libdir}/gstreamer-%{major}/libgstshapewipe.so
%{_libdir}/gstreamer-%{major}/libgstsmpte.so
%{_libdir}/gstreamer-%{major}/libgstspectrum.so
%{_libdir}/gstreamer-%{major}/libgstudp.so
%{_libdir}/gstreamer-%{major}/libgstvideobox.so
%{_libdir}/gstreamer-%{major}/libgstvideocrop.so
%{_libdir}/gstreamer-%{major}/libgstvideofilter.so
%{_libdir}/gstreamer-%{major}/libgstvideomixer.so
%{_libdir}/gstreamer-%{major}/libgstwavenc.so
%{_libdir}/gstreamer-%{major}/libgstwavparse.so
%{_libdir}/gstreamer-%{major}/libgstximagesrc.so
%{_libdir}/gstreamer-%{major}/libgsty4menc.so

# base plugins with external dependencies, but in the main package
%{_libdir}/gstreamer-%{major}/libgstcairo.so
%{_libdir}/gstreamer-%{major}/libgstgdkpixbuf.so
%{_libdir}/gstreamer-%{major}/libgstjpeg.so
%{_libdir}/gstreamer-%{major}/libgstlame.so
%{_libdir}/gstreamer-%{major}/libgstossaudio.so
%{_libdir}/gstreamer-%{major}/libgstpng.so
%{_libdir}/gstreamer-%{major}/libgstpulseaudio.so
%{_libdir}/gstreamer-%{major}/libgstrtpmanager.so
%{_libdir}/gstreamer-%{major}/libgstsoup.so
%{_libdir}/gstreamer-%{major}/libgsttaglib.so
%{_libdir}/gstreamer-%{major}/libgstvideo4linux2.so
%{_libdir}/gstreamer-%{major}/libgstvpx.so

%files flac
%defattr(-,root,root)
%{_libdir}/gstreamer-%{major}/libgstflac.so

%files speex
%defattr(-,root,root)
%{_libdir}/gstreamer-%{major}/libgstspeex.so

%files dv
%defattr(-,root,root)
%{_libdir}/gstreamer-%{major}/libgstdv.so

%files raw1394
%defattr(-,root,root)
%{_libdir}/gstreamer-%{major}/libgst1394.so

%files gtk
%{_libdir}/gstreamer-%{major}/libgstgtk.so

%if %{with qt}
%files qt
%{_libdir}/gstreamer-%{major}/libgstqmlgl.so
%endif

%files jack
%{_libdir}/gstreamer-%{major}/libgstjack.so


%changelog
* Fri Jul 29 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.20.3-1
- new upstream release.
- dropped Patch0: fixed in upstream.

* Fri Apr 23 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.18.4-1
- new upstream release.
- dropped doc package.

* Fri Apr 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.16.2-1
- new upstream release.

* Sun Jun 23 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.16.0-1
- new upstream release.

* Thu Feb 22 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.12.4-1
- new upstream release.

* Fri Jul 15 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.2-1
- new upstream release

* Thu Jun 30 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.4-2
- rebuild with gcc-5.4.0

* Wed May 04 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.4-1
- new upstream release

* Sun Jan 24 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.3-1
- new upstream release

* Sat Dec 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.2-1
- new upstream release

* Sat Oct 31 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-1
- new upstream release

* Sun Mar 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.5-1
- new upstream release

* Mon Nov 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.4-1
- new upstream release

* Sun Oct 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.3-1
- new upstream release
- add BuildRequires: libuuid-devel

* Thu Jul 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.4-2
- rebuild with libpng-1.6.12

* Sat Apr 19 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.4-1
- new upstream release

* Sun Mar 16 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.3-1
- new upstream release

* Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.2-1
- new upstream release

* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.1-1
- new upstream release

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.0-1
- new upstream release

* Sat Aug 31 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.10-1
- new upstream release

* Sun Aug 11 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.9-1
- new upstream release

* Mon Jul 15 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.8-1
- new upstream release

* Sun Apr 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.7-1
- new upstream release

* Sat Mar 23 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.6-1
- new upstream release

* Wed Jan 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.5-1
- new upstream release

* Wed Jan 02 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.4-1
- new upstream release

* Fri Oct 26 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.2-1
- new upstream release

* Sat Oct 20 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.1-2
- rebuild with libraw1394-2.1.0

* Mon Oct 08 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.1-1
- new upstream release
- add BuildRequires: libvpx-devel

* Fri Sep 28 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.0-1
- initial build

