File dcadec.spec of Package dcadec

#
# spec file for package dcadec
#
# Copyright (c) 2018 SUSE LINUX Products 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 http://bugs.opensuse.org/
#

%define so_version 0

Name:           dcadec
Version:        2016.01.04
Release:        0
License:        LGPL-2.1+
Summary:        DTS Coherent Acoustics decoder with support for HD extensions
Url:            https://github.com/foo86/dcadec/
Group:          system/libraries
Source:         %{name}-%{version}.tar.xz
BuildRequires:  automake
BuildRequires:  pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
dcadec is a free DTS Coherent Acoustics decoder with support for HD extensions.

Supported features:
    Decoding of standard DTS core streams with up to 5.1 channels
    Decoding of DTS-ES streams with discrete back channel
    Decoding of High Resolution streams with up to 7.1 channels and extended bitrate
    Decoding of 96/24 core streams
    Lossless decoding of Master Audio streams with up to 7.1 channels, 192 kHz
    Downmixing to stereo and 5.1 using embedded coefficients

Features not implemented:
    Decoding of DTS Express streams
    Applying dynamic range compression and dialog normalization

%package -n lib%{name}%{so_version}
Summary:	DTS Coherent Acoustics decoder with support for HD extensions
Group:		System/Libraries

%description -n lib%{name}%{so_version}
dcadec is a free DTS Coherent Acoustics decoder with support for HD extensions.


%package devel
Summary:	Development files for dcadec
Group:		Development/Sources
Requires:	lib%{name}%{so_version} = %{version}
Requires:	pkgconfig

%description devel
Development files for dcadec.
dcadec is a free DTS Coherent Acoustics decoder with support for HD extensions.

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

%build
make %{?_smp_mflags} CONFIG_SHARED=1 LDFLAGS="-fPIC"

%install
make install DESTDIR=%{buildroot} PREFIX="/usr" LIBDIR="%{_libdir}" BINDIR="%{_bindir}" INCLUDEDIR="%{_includedir}" CONFIG_SHARED=1

%post -n lib%{name}%{so_version} -p /sbin/ldconfig
%postun -n lib%{name}%{so_version} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%license COPYING.LGPLv2.1
%doc README.md
%{_bindir}/%{name}

%files -n lib%{name}%{so_version}
%defattr(-,root,root)
%{_libdir}/libdcadec.so.*

%files devel
%defattr(-,root,root)
%license COPYING.LGPLv2.1
%doc README.md
%{_libdir}/libdcadec.so
%{_includedir}/lib%{name}
%{_libdir}/pkgconfig/%{name}.pc

%changelog