File gst-fluendo-mp3.spec of Package gst-fluendo-mp3

#
# spec file for package gst-fluendo-mp3
#
# Copyright (c) 2013 SUSE LINUX Products 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/
#


%ifarch x86_64
%define bit64 (64bit)
%endif

Name:           gst-fluendo-mp3
Version:        18
Release:        0
Summary:        GStreamer plug-in from Fluendo for MP3 support
License:        SUSE-NonFree and MIT
Group:          Productivity/Multimedia/Other
Url:            http://shop.fluendo.com
Source:         gst-fluendo-mp3-20130324.tar.bz2
Source1:        fluendo-mp3-18.i386.tar.bz2
Source2:        fluendo-mp3-18.x86_64.tar.bz2
Source3:        fluendo-mp3-12.ppc.tar.bz2
# We don't use the lpia architecture, afaik. Still, ship the binary in the source in case it's useful later on
Source4:        fluendo-mp3-18.lpia.tar.bz2
Source5:        getsource.sh
NoSource:       1
NoSource:       2
NoSource:       3
NoSource:       4
BuildRequires:  gstreamer-0_10-plugins-base-devel
BuildRequires:  gstreamer-plugins-base-devel
BuildRequires:  gstreamer-utils
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64 ppc
%define gst_0_10_libdir %{_libdir}/gstreamer-0.10
%define gst_1_0_libdir %{_libdir}/gstreamer-1.0

%package -n gstreamer-0_10-fluendo-mp3
Summary:        GStreamer plug-in from Fluendo for MP3 support
Group:          Productivity/Multimedia/Other
Requires:       gstreamer010
Conflicts:      gst-fluendo-plugins
Provides:       gst-fluendo-mp3 = %{version}
Obsoletes:      gst-fluendo-mp3 < %{version}

%description -n gstreamer-0_10-fluendo-mp3
This package contains the fully licensed MP3 decoder binary as
available from http://shop.fluendo.com free of charge.

%package -n gstreamer-fluendo-mp3
Summary:        GStreamer plug-in from Fluendo for MP3 support
Group:          Productivity/Multimedia/Other
Requires:       gstreamer
Conflicts:      gst-fluendo-plugins
Provides:       gst-fluendo-mp3 = %{version}
Obsoletes:      gst-fluendo-mp3 < %{version}
Provides:       gstreamer1(decoder-audio/mpeg)(mpegaudioversion=1)(mpegversion=1)(layer=3)()%{?bit64}

%description -n gstreamer-fluendo-mp3
This package contains the fully licensed MP3 decoder binary as
available from http://shop.fluendo.com free of charge.

%description
This package contains the fully licensed MP3 decoder binary as
available from http://shop.fluendo.com free of charge.

%prep
%ifarch x86_64
echo    x86_64
%setup -c -T -a 2
%else
%ifarch ppc
echo    ppc
%setup -c -T -a 3
%else
echo    i386
%setup -c -T -a 1
%endif
%endif

%build

%install
install -d %{buildroot}%{gst_0_10_libdir}
install -d %{buildroot}%{gst_1_0_libdir}
install -m 755 codecs/gstreamer-0.10/libgst*.so %{buildroot}%{gst_0_10_libdir}
install -m 755 codecs/gstreamer-1.0/libgst*.so %{buildroot}%{gst_1_0_libdir}
# test section
gst-inspect-0.10 --gst-plugin-path=%{buildroot}%{gst_0_10_libdir} flump3dec
gst-inspect-1.0 --gst-plugin-path=%{buildroot}%{gst_1_0_libdir} flump3dec

%clean
rm -rf "%{buildroot}"

%files -n gstreamer-0_10-fluendo-mp3
%defattr(-,root,root)
%doc LICENSE.txt README.txt
%{gst_0_10_libdir}/libgst*.so

%files -n gstreamer-fluendo-mp3
%defattr(-,root,root)
%doc LICENSE.txt README.txt
%{gst_1_0_libdir}/libgst*.so

%changelog