File mingw64-mpg123.spec of Package mingw64-mpg123

#
# spec file for package mingw64-mpg123
#
# Copyright (c) 2015-2024, Martin Hauke <mardnh@gmx.de>
#
# 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/
#

%define sover 0
%define realname mpg123
Name:           mingw64-%{realname}
Version:        1.32.10
Release:        0
Summary:        Console MPEG audio player and decoder library
License:        LGPL-2.1-only
Group:          Productivity/Multimedia/Sound/Players
Url:            https://mpg123.org/
Source:         https://mpg123.org/download/%{realname}-%{version}.tar.bz2
BuildRequires:  automake
BuildRequires:  autoconf
BuildRequires:  libtool
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-SDL2-devel
%{_mingw64_package_header_debug}
BuildArch:      noarch

%description
The mpg123 distribution contains an MPEG 1.0/2.0/2.5 audio player/decoder for
layers 1, 2 and 3 (most commonly MPEG 1.0 Layer 3 aka MP3), as well as re-usable decoding
and output libraries.

%package -n mingw64-libmpg123-%{sover}
Summary:        MPEG audio decoder library

%description -n mingw64-libmpg123-%{sover}
MPEG 1.0/2.0/2.5 audio decoder library for layers 1, 2 and 3 (most
commonly MPEG 1.0 Layer 3 aka MP3).

%package -n mingw64-libout123-%{sover}
Summary:        MPEG audio decoder library

%description -n mingw64-libout123-%{sover}
The mpg123 distribution contains a real time MPEG 1.0/2.0/2.5 audio player/decoder for
layers 1,2 and 3 (most commonly MPEG 1.0 layer 3 aka MP3), as well as re-usable decoding
and output libraries.

%package -n mingw64-libsyn123-%{sover}
Summary:        MPEG audio decoder library

%description -n mingw64-libsyn123-%{sover}
The mpg123 distribution contains a real time MPEG 1.0/2.0/2.5 audio player/decoder for
layers 1,2 and 3 (most commonly MPEG 1.0 layer 3 aka MP3), as well as re-usable decoding
and output libraries.

%package -n mingw64-%{realname}-devel
Summary:        Files to develop against libmpg123
Group:          Development/Libraries/C and C++
Requires:       mingw64-libmpg123-%{sover} = %{version}
Requires:       mingw64-libout123-%{sover} = %{version}
Requires:       mingw64-libsyn123-%{sover} = %{version}

%description -n mingw64-%{realname}-devel
This package contains the files needed to compile programs that use
the mpg123 library.

%{_mingw64_debug_package}

%prep
%setup -q -n %{realname}-%{version}

%build
%{_mingw64_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
    --enable-modules=no

%{_mingw64_make} %{?_smp_mflags}


%install
%makeinstall
rm %{buildroot}/%{_mingw64_libdir}/libmpg123.la

%files
%license COPYING
%doc AUTHORS ChangeLog NEWS NEWS.libmpg123 NEWS.libout123 NEWS.libsyn123 README
%{_mingw64_bindir}/mpg123-id3dump.exe
%{_mingw64_bindir}/mpg123-strip.exe
%{_mingw64_bindir}/mpg123.exe
%{_mingw64_bindir}/out123.exe
%{_mingw64_mandir}/man1/mpg123.1%{?ext_man}
%{_mingw64_mandir}/man1/out123.1%{?ext_man}

%files -n mingw64-lib%{realname}-%{sover}
%{_mingw64_bindir}/libmpg123-%{sover}.dll

%files -n mingw64-libout123-%{sover}
%{_mingw64_bindir}/libout123-%{sover}.dll

%files -n mingw64-libsyn123-%{sover}
%{_mingw64_bindir}/libsyn123-%{sover}.dll

%files -n mingw64-%{realname}-devel
%{_mingw64_includedir}/fmt123.h
%{_mingw64_includedir}/mpg123.h
%{_mingw64_includedir}/out123.h
%{_mingw64_includedir}/syn123.h
%{_mingw64_libdir}/libmpg123.dll.a
%{_mingw64_libdir}/libout123.dll.a
%{_mingw64_libdir}/libsyn123.dll.a
%{_mingw64_libdir}/pkgconfig/libmpg123.pc
%{_mingw64_libdir}/pkgconfig/libout123.pc
%{_mingw64_libdir}/pkgconfig/libsyn123.pc

%changelog
openSUSE Build Service is sponsored by