File fdk-aac.spec of Package fdk-aac

#
# spec file for package fdk-aac
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#


Name:           fdk-aac
Version:        2.0.3
Release:        0
Summary:        A standalone library of the Fraunhofer FDK-AAC code
License:        Apache-2.0 AND MIT
Group:          Productivity/Multimedia/Video/Editors and Convertors
URL:            https://github.com/mstorsjo/%{name}/
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  libtool

%define soname 2
%define libname lib%{name}%{soname}

%define description_text This is a standalone library of the Fraunhofer FDK-AAC code.

%description
%{description_text}

%package -n %{libname}
Summary:        Shared library for %{name}
Group:          System/Libraries

%description -n %{libname}
%{description_text}

This package provides shared libraries for %{name}.

%package -n lib%{name}-devel
Summary:        Development files for lib%{name}
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}

%description -n lib%{name}-devel
%{description_text}

The %{libname}-devel package contains libraries and header files for developing applications that use %{libname}.

%package doc
Summary:        Documentation for %{name}
Group:          Documentation/Man
BuildArch:      noarch
Requires:       %{name} = %{version}

%description doc
%{description_text}

This package contains the documentation for %{name}.

%prep
%setup -q

%build
./autogen.sh
%configure --docdir=%{_defaultdocdir}/%{name} --enable-silent-rules --disable-static
%make_build

%install
%make_install
%{__mkdir_p} %{buildroot}%{_defaultdocdir}/%{name}
%{__mkdir_p} %{buildroot}%{_defaultlicensedir}/%{name}
%{__install} -m 0644 -p -t %{buildroot}%{_defaultdocdir}/%{name} ChangeLog OWNERS
%{__install} -m 0644 -p -t %{buildroot}%{_defaultlicensedir}/%{name} NOTICE
%{__cp} -a documentation %{buildroot}%{_defaultdocdir}/%{name}/
find %{buildroot} -name '*.la' -exec %{__rm} -f {} ';'

%check

%post -n %{libname}
/sbin/ldconfig

%postun -n %{libname}
/sbin/ldconfig

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

%files -n lib%{name}-devel
%defattr(-,root,root,-)
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc

%files doc
%defattr(-,root,root,-)
%{_defaultdocdir}/%{name}/
%{_defaultlicensedir}/%{name}/

%changelog
openSUSE Build Service is sponsored by