LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File mpg123.spec of Package mpg123 (Project home:computersalat:devel:mlibs)

#
# spec file for package audacious-plugins
#
# Copyright (c) 2012 Scorpio IT, Deidesheim, 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:           mpg123
%define libname   lib%{name}
%define libsoname %{libname}-0
Summary:        Realtime Player for MPEG Audio Layer 1, 2, and 3 Files
Version:        1.14.4
Release:        0
License:        LGPL-2.1+,l GPL-2.0
Group:          Productivity/Multimedia/Sound/Players
Url:            http://mpg123.org/
Source:         http://mpg123.org/download/%{name}-%{version}.tar.bz2
Patch1:         %{name}-remove_reldir_fallback.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  make autoconf automake libtool
BuildRequires:  alsa-devel
BuildRequires:  esound-devel
BuildRequires:  gcc
BuildRequires:  glibc-devel
BuildRequires:  libao-devel
BuildRequires:  libaudio-devel
BuildRequires:  libjack-devel
BuildRequires:  libpulse-devel
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  portaudio-devel
%if 0%{?suse_version} > 1110
BuildRequires:  openal-soft-devel
%else
BuildRequires:  openal-devel
%endif
%if 0%{?suse_version} >= 1130
BuildRequires:  libSDL-devel
%else
BuildRequires:  SDL-devel
%endif
Requires:       %{libsoname} = %{version}

%description
Mpg123 is a fast, free and portable MPEG audio player for Unix. It supports
MPEG 1.0/2.0/2.5 layers 1, 2, and 3, with CD quality playback even on
relatively slow CPUs.

%package -n %{libsoname}
Summary:        Realtime Player Library for MPEG Audio Layer 1, 2, and 3 Files
Group:          System/Libraries

%description -n %{libsoname}
Mpg123 is a fast, free and portable MPEG audio player for Unix. It supports
MPEG 1.0/2.0/2.5 layers 1, 2, and 3, with CD quality playback even on
relatively slow CPUs.

%package devel
Summary:        Include Files and Libraries mandatory for Development
Group:          Development/Libraries/C and C++
Requires:       glibc-devel
Requires:       %{libsoname} = %{version}

%description devel
This package contains the files needed to compile programs that use
the mpg123 library.

%package esound
Summary:        Esound GNOME Sound System Daemon Support for %{name}
Group:          Productivity/Multimedia/Sound/Players

%description esound
This package contains the plugin for esound (the GNOME sound system daemon)
output support.

%package jack
Summary:        Jack Support for %{name}
Group:          Productivity/Multimedia/Sound/Players

%description jack
This package contains the plugin for JACK output support.

%package nas
Summary:        NAS Support for %{name}
Group:          Productivity/Multimedia/Sound/Players

%description nas
This package contains the plugin for NAS (Network Audio System) output
support.

%package portaudio
Summary:        Portaudio Support for %{name}
Group:          Productivity/Multimedia/Sound/Players

%description portaudio
This package contains the plugin for Portaudio output support.

%package pulse
Summary:        Pulseaudio Support for %{name}
Group:          Productivity/Multimedia/Sound/Players

%description pulse
This package contains the plugin for Pulseaudio output support.

%package sdl
Summary:        SDL Support for %{name}
Group:          Productivity/Multimedia/Sound/Players

%description sdl
This package contains the plugin for SDL output support.

%package all
Summary:        Support for all output plugins in %{name}
Group:          Productivity/Multimedia/Sound/Players
Requires:       %{name}-jack = %{version}
Requires:       %{name}-portaudio = %{version}
Requires:       %{name}-pulse = %{version}
Requires:       %{name}-sdl = %{version}

%description all
This is an empty package that installs (requires) all output plugins for
%{name} that are kept in separate subpackages, except
- %{name}-esd (esound support)
- %{name}-nas (NAS (Network Audio Server) support)
which have to be installed separately.

Install this package if you want to make sure you have all supported
output plugins (except esd and nas).

%prep
%setup -q
%patch1

%build
%configure \
%ifarch i586
    --with-cpu=i586_dither      \
%endif
%ifarch i686
    --with-cpu=mmx              \
%endif
%ifarch athlon
    --with-cpu=3dnow            \
%endif
%ifarch x86_64
    --with-cpu=x86-64_dither    \
%endif
    --with-default-audio=alsa   \
    --enable-modules=yes \
    --enable-ipv6=yes \
    --enable-network=yes \
    --enable-fifo=yes \
    --enable-gapless=yes \
    --with-optimization=0 \
    --with-module-suffix=.so

make %{?_smp_mflags}

%install
%makeinstall

# remove *.la files
find %{buildroot}%{_libdir} -name "*.la" -exec rm {} \;

# remove Makefiles from doc
%__rm -f doc/{,example/}Makefile*

%__cat >README-all <<EOF
This package is just a placeholder to install all available
%{name} plugins.
EOF

%post   -n %{libsoname} -p /sbin/ldconfig
%postun -n %{libsoname} -p /sbin/ldconfig

%clean
%__rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS* README TODO
%doc %{_mandir}/man?/*
%{_bindir}/%{name}
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/output_alsa.so
%{_libdir}/%{name}/output_dummy.so
%{_libdir}/%{name}/output_openal.so
%{_libdir}/%{name}/output_oss.so

%files -n %{libsoname}
%defattr(0644,root,root)
%{_libdir}/%{libname}.so.*

%files devel
%defattr(-,root,root)
%doc doc
%{_includedir}/%{name}.h
%{_libdir}/%{libname}.so
%{_libdir}/pkgconfig/%{libname}.pc

%files esound
%defattr(-,root,root)
%{_libdir}/%{name}/output_esd.so

%files jack
%defattr(-,root,root)
%{_libdir}/%{name}/output_jack.so

%files nas
%defattr(-,root,root)
%{_libdir}/%{name}/output_nas.so

%files portaudio
%defattr(-,root,root)
%{_libdir}/%{name}/output_portaudio.so

%files pulse
%defattr(-,root,root)
%{_libdir}/%{name}/output_pulse.so

%files sdl
%defattr(-,root,root)
%{_libdir}/%{name}/output_sdl.so

%files all
%defattr(-,root,root)
%doc README-all

%changelog