File BoCA.spec of Package BoCA
#
# spec file for package BoCA
#
# Copyright (c) 2019 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/
#
%define _lver 1.0
%define _uver 1_0
%define sover 3
Name: BoCA
Version: 1.0.7
Release: 0
Summary: A component library used by the fre:ac audio converter
License: GPL-2.0-or-later
Group: Productivity/Multimedia/Sound/Utilities
URL: https://github.com/enzo1982/BoCA
Source0: https://github.com/enzo1982/BoCA/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: dos2unix
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: smooth-devel >= 0.9.9
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(libcdio)
BuildRequires: pkgconfig(libcdio_paranoia)
BuildRequires: pkgconfig(liburiparser)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(xspf)
BuildRequires: pkgconfig(zlib)
%description
BoCA is the component framework behind the fre:ac audio converter.
It provides unified interfaces for components like encoders,
decoders, taggers and extensions as well as code to support
communication between the application and its components.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: libboca-%{_uver}-%{sover} = %{version}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package plugins
Summary: Plugins for %{name}
Group: Productivity/Multimedia/Sound/Utilities
%description plugins
The %{name}-plugins package contains various plugins for %{name}
%package -n libboca-%{_uver}-%{sover}
Summary: A component library used by the fre:ac audio converter
Group: System/Libraries
%description -n libboca-%{_uver}-%{sover}
BoCA is the component framework behind the fre:ac audio converter.
It provides unified interfaces for components like encoders,
decoders, taggers and extensions as well as code to support
communication between the application and its components.
%prep
%autosetup
dos2unix Readme.md
find include -type f -name *.h -exec chmod -x {} \;
%build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
make %{?_smp_mflags} config=systemlibxspf prefix=%{_prefix}
%install
%make_install libdir=%{_libdir} includedir=%{_includedir}
find %{buildroot} -type f -name "*.la" -delete -print
# If plugins under %%{_libdir} it does not work
mkdir -p %{buildroot}/usr/lib/boca
mv %{buildroot}%{_libdir}/boca/boca_* %{buildroot}/usr/lib/boca
mv %{buildroot}%{_libdir}/boca/boca.dsp.rnnoise %{buildroot}/usr/lib/boca
%post -n libboca-%{_uver}-%{sover} -p /sbin/ldconfig
%postun -n libboca-%{_uver}-%{sover} -p /sbin/ldconfig
%files devel
%license COPYING
%doc Readme.md
%{_includedir}/boca
%{_includedir}/boca.h
%{_libdir}/libboca-%{_lver}.so
%files plugins
%license COPYING
%exclude %{_libdir}/boca/boca.%{_lver}.so
/usr/lib/boca
%files -n libboca-%{_uver}-%{sover}
%license COPYING
%dir %{_libdir}/boca
%{_libdir}/boca/boca.%{_lver}.so
%{_libdir}/libboca-%{_lver}.so.%{sover}
%changelog