%global svn_release 475
# code does not compile with -fno-common
%global _legacy_common_support 1

Summary: Musepack audio decoding library
Name:	 libmpcdec
Version: 1.3.0
Release: 0.2.20110810svn%{svn_release}%{?dist}

License: BSD 
URL: 	 https://www.musepack.net/
Source0: https://files.musepack.net/source/musepack_src_r%{svn_release}.tar.gz
Patch0:  r475-cmake.patch

BuildRequires: gcc
BuildRequires: sed
BuildRequires: cmake
BuildRequires: libcuefile-devel
BuildRequires: libreplaygain-devel

%description
Musepack is an audio compression format with a strong emphasis on high quality.
It's not lossless, but it is designed for transparency, so that you won't be
able to hear differences between the original wave file and the much smaller
MPC file.
It is based on the MPEG-1 Layer-2 / MP2 algorithms, but has rapidly developed
and vastly improved and is now at an advanced stage in which it contains
heavily optimized and patentless code.

%package devel
Summary: Development files for the Musepack audio decoding library
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
%{summary}.

%package -n musepack-tools
Summary: Musepack audio decoding and encoding tools
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n musepack-tools
%{summary}.


%prep
%autosetup -p1 -n musepack_src_r%{svn_release}

# Correct permissions and end of line
find -type f -exec chmod 0644 '{}' +
sed -ibackup 's/\r$//' libwavformat/*


%build
%cmake -Wno-dev .
%cmake_build


%install
%cmake_install


%files
%doc libmpcdec/AUTHORS libmpcdec/ChangeLog libmpcdec/README
%license libmpcdec/COPYING
%{_libdir}/libmpcdec.so.6{,.*}

%files devel
%{_includedir}/mpc/
%{_libdir}/libmpcdec.so

%files -n musepack-tools
%license libmpcdec/COPYING
%{_bindir}/mpc*
%{_bindir}/wavcmp


%changelog
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-0.2.20110810svn475
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Tue Feb 07 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 1.3.0-0.1.20110810svn475
- Update to latest SV8 version (#1014468)

* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Mar 07 2018 Rex Dieter <rdieter@fedoraproject.org> - 1.2.6-21
- .spec cleanup
- BR: gcc
- use %%ldconfig_scriptlets %%license %%make_build %%make_install
- drop undesirable cflags

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Tue Jun 04 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.6-11
- -devel: tighten dep using %%{?_isa}
- %%files: tighten file lists

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Feb 08 2008 Rex Dieter <rdieter@fedoraproject.org> 1.2.6-4
- respin (gcc43)

* Sat Aug 25 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.2.6-3
- respin (BuildID)

* Wed Jun 06 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.2.6-2
- fix %%files (docs/html is no more)

* Wed Jun 06 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.2.6-1
- libmpcdec-1.2.6

* Tue Aug 29 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.2.2-4
- fc6 respin

* Wed Aug 09 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.2.2-3
- fc6 respin

* Sat Apr 01 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.2.2-2
- License: BSD

* Thu Jan 19 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.2.2-1
- libmpcdec-1.2.2

* Thu Jan 19 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.1-2
- cleanup

* Fri Jun 17 2005 Mihai Maties <mihai@xcyb.org> 1.1-1
- update to 1.1
- changed license to BSD
- updated the spec to use autotools

* Fri Nov 26 2004 Matthias Saou <http://freshrpms.net/> 1.0.2-1
- Initial RPM release.
- Include the mandatory copy of the LGPL (there is none in the sources...).

