File mingw32-gstreamer.spec of Package mingw32-gstreamer

#
# spec file for package mingw32-gstreamer
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           mingw32-gstreamer
Version:        1.14.5
Release:        0
Summary:        Streaming-Media Framework Runtime
License:        LGPL-2.0-or-later
Group:          Development/Libraries
Url:            https://gstreamer.freedesktop.org/
Source0:        https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-%{version}.tar.xz
Source1000:     %{name}-rpmlintrc
Patch0:         make43.patch
BuildRequires:  bison autoconf automake libtool
BuildRequires:  flex
BuildRequires:  glib2-devel
BuildRequires:  gtk-doc
BuildRequires:  mingw32-cross-binutils
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-pkg-config
BuildRequires:  mingw32-filesystem >= 23
BuildRequires:  mingw32-glib2-devel >= 2.32.0
BuildRequires:  mingw32-libxml2-devel
BuildRequires:  python
BuildRequires:  xz
%_mingw32_package_header_debug
BuildArch:      noarch
#!BuildIgnore: post-build-checks

%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 plug-in-based architecture
means that new data types or processing capabilities can be added by
installing new plug-ins.

%package devel
Summary:        Streaming-Media Framework Runtime (development files)
Group:          Development/Libraries

%description devel
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 plug-in-based architecture
means that new data types or processing capabilities can be added by
installing new plug-ins.

This package contains all necessary include files and libraries needed
to develop applications that require these.

%package utils
Summary:        Streaming-Media Framework Runtime
Group:          Development/Libraries

%description utils
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 plug-in-based architecture
means that new data types or processing capabilities can be added by
installing new plug-ins.

%package -n mingw32-libgstreamer
Summary:        Shared libraries for gstreamer
Group:          Development/Libraries

%description -n mingw32-libgstreamer
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 plug-in-based architecture
means that new data types or processing capabilities can be added by
installing new plug-ins.

This package contains the shared libraries for gstreamer.

%lang_package

%_mingw32_debug_package

%prep
%setup -q -n gstreamer-%{version}
%patch -P 0 -p1

%build
libtoolize --force --copy
autoreconf -fi
echo "lt_cv_deplibs_check_method='pass_all'" >> %{_mingw32_cache}
echo "gst_cv_posix_timers=no" >> %{_mingw32_cache}
PATH="%{_mingw32_bindir}:$PATH"; export PATH; \
%{_mingw32_configure} \
	--enable-shared --disable-static \
	--disable-tests --disable-failing-tests
%{_mingw32_make} %{?_smp_mflags} || %{_mingw32_make}

%install

%{_mingw32_make} DESTDIR=%{buildroot} install

rm -f %{buildroot}%{_mingw32_libdir}/gstreamer-1.0/libgstcoreelements.dll.a
rm -f %{buildroot}%{_mingw32_libdir}/gstreamer-1.0/libgstcoretracers.dll.a

# Remove silly target prefix from binaries
for prefixed_file in %{buildroot}%{_mingw32_bindir}/%{_mingw32_target}-*.exe \
                     %{buildroot}%{_mingw32_libexecdir}/*/%{_mingw32_target}-*.exe \
                     %{buildroot}%{_mingw32_mandir}/*/%{_mingw32_target}-*.*
do
    f=$(echo $prefixed_file | sed -e 's/%{_mingw32_target}-//')
    mv $prefixed_file $f
done

%find_lang gstreamer-1.0

%files lang -f gstreamer-1.0.lang
%defattr(-,root,root)

%files
%defattr(-,root,root)
%{_mingw32_libdir}/gstreamer-1.0/libgstcoreelements.dll
%{_mingw32_libdir}/gstreamer-1.0/libgstcoretracers.dll
%{_mingw32_libexecdir}/gstreamer-1.0/gst-completion-helper.exe
%{_mingw32_libexecdir}/gstreamer-1.0/gst-plugin-scanner.exe
%{_mingw32_datadir}/bash-completion/completions/gst-inspect-1.0
%{_mingw32_datadir}/bash-completion/completions/gst-launch-1.0
%{_mingw32_datadir}/bash-completion/helpers/gst

%files -n mingw32-libgstreamer
%defattr(-,root,root)
%{_mingw32_bindir}/libgstbase-1.0-0.dll
%{_mingw32_bindir}/libgstcontroller-1.0-0.dll
%{_mingw32_bindir}/libgstnet-1.0-0.dll
%{_mingw32_bindir}/libgstreamer-1.0-0.dll

%files devel
%defattr(-,root,root)
%{_mingw32_includedir}/gstreamer-1.0/gst
%{_mingw32_libdir}/libgstbase-1.0.dll.a
%{_mingw32_libdir}/libgstcontroller-1.0.dll.a
%{_mingw32_libdir}/libgstnet-1.0.dll.a
%{_mingw32_libdir}/libgstreamer-1.0.dll.a
%{_mingw32_libdir}/pkgconfig/gstreamer-1.0.pc
%{_mingw32_libdir}/pkgconfig/gstreamer-base-1.0.pc
%{_mingw32_libdir}/pkgconfig/gstreamer-controller-1.0.pc
%{_mingw32_libdir}/pkgconfig/gstreamer-net-1.0.pc
%{_mingw32_datadir}/aclocal/gst-element-check-1.0.m4
%{_mingw32_datadir}/gtk-doc/html/gstreamer-1.0
%{_mingw32_datadir}/gtk-doc/html/gstreamer-libs-1.0
%{_mingw32_datadir}/gtk-doc/html/gstreamer-plugins-1.0

%files utils
%defattr(-,root,root)
%{_mingw32_bindir}/gst-inspect-1.0.exe
%{_mingw32_bindir}/gst-launch-1.0.exe
%{_mingw32_bindir}/gst-stats-1.0.exe
%{_mingw32_bindir}/gst-typefind-1.0.exe
%{_mingw32_mandir}/man1/gst-inspect-1.0.1*
%{_mingw32_mandir}/man1/gst-launch-1.0.1*
%{_mingw32_mandir}/man1/gst-stats-1.0.1*
%{_mingw32_mandir}/man1/gst-typefind-1.0.1*

%changelog
openSUSE Build Service is sponsored by