#
# spec file for package fdk-aac
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#


%define _sover  2
Name:           fdk-aac
Version:        2.0.2
Release:        1699.1.pm.128
Summary:        A standalone library of the Fraunhofer FDK AAC code from Android
License:        NonFree
URL:            https://github.com/mstorsjo/fdk-aac
Source0:        %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        baselibs.conf

BuildRequires:  c++_compiler
BuildRequires:  libtool
BuildRequires:  pkgconfig

%description
A standalone library of the Fraunhofer FDK AAC code from Android

For further information, read:
wiki.hydrogenaud.io/Fraunhofer_FDK_AAC

%package -n libfdk-aac%{_sover}
Summary:        A standalone library of the Fraunhofer FDK AAC code from Android

%description -n libfdk-aac%{_sover}
A standalone library of the Fraunhofer FDK AAC code from Android

For further information, read:
wiki.hydrogenaud.io/Fraunhofer_FDK_AAC

%package devel
Summary:        Development headers for Fraunhofer FDK AAC
Requires:       libfdk-aac%{_sover} = %{version}

%description devel
This package provides development headers for Fraunhofer FDK AAC code

%prep
%autosetup -p1

%build
NOCONFIGURE=1 ./autogen.sh
%configure \
	--disable-static
%make_build

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print

%post -n libfdk-aac%{_sover}  -p /sbin/ldconfig
%postun -n libfdk-aac%{_sover} -p /sbin/ldconfig

%files -n libfdk-aac%{_sover}
%license NOTICE
%{_libdir}/libfdk-aac.so.*

%files devel
%doc ChangeLog
%{_includedir}/fdk-aac
%{_libdir}/libfdk-aac.so
%{_libdir}/pkgconfig/fdk-aac.pc

%changelog
* Sun Jul 25 2021 Bjørn Lie <zaitor@opensuse.org>
- Update to version 2.0.2:
  + This version adds files for building with CMake in addition to
    autotools, and contains a small number of upstream fixes and
    local fuzzing fixes.
* Tue Mar 24 2020 Bjørn Lie <zaitor@opensuse.org>
- Update to version 2.0.1:
  * Minor release with a number of crash/fuzz fixes, primarily for
    the decoder.
- Modernize spec, replace gcc-c++ with generic c++_compiler
  BuildRequires, use current macros.
* Sat Aug 10 2019 Luigi Baldoni <aloisio@gmx.com>
- Update to version 2.0.0
  * Major update in the upstream source base, with support for
    new profiles and features, and numerous crash/fuzz fixes.
    The new upstream version is referred to as FDKv2, thus
    skipping the major version 1 and syncing the fdk-aac major
    version number to 2.
* Tue May  1 2018 zaitor@opensuse.org
- Update to version 1.6.0:
  + This version is a minor update with a number of crash/fuzz
    fixes only.
- Run spec-cleaner, modernize spec.
* Fri Jan 20 2017 zaitor@opensuse.org
- Update to proper 1.5.0 version.
- Drop _service now that there is a upstream release.
* Fri Nov  4 2016 neutrino8@opensuse.org
- Use a _service file due to no stable tag
- Add baselibs.conf
* Sat Oct 29 2016 neutrino8@gmail.com
- Update to version 0.1.5
- Drop fdk-aac-cpp98 patch. No longer needed
* Wed Nov 19 2014 i@margueirte.su
- fix __DATE__ and __TIME__ warning
* Wed Nov 12 2014 i@margueirte.su
- initial version 0.1.4