2021-10-06 19:33:17 +02:00
|
|
|
#
|
2021-11-07 05:17:43 +01:00
|
|
|
# spec file for package broadvoice32
|
2021-10-06 19:33:17 +02:00
|
|
|
#
|
2021-11-07 05:17:43 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2021-10-06 19:33:17 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2021-11-07 05:17:43 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2021-10-06 19:33:17 +02:00
|
|
|
#
|
|
|
|
|
2021-11-07 05:17:43 +01:00
|
|
|
|
2021-10-06 19:33:17 +02:00
|
|
|
%define static 0
|
|
|
|
%define shared 1
|
|
|
|
%define tools 1
|
|
|
|
|
|
|
|
Name: broadvoice32
|
|
|
|
Version: 1.2
|
|
|
|
Release: 0
|
|
|
|
Summary: BroadVoice 32 Speech Codec
|
|
|
|
License: LGPL-2.1-only
|
|
|
|
Group: Productivity/Multimedia/Sound/Utilities
|
|
|
|
URL: https://www.broadcom.com/site-search?q=broadvoice
|
|
|
|
Source0: BroadVoice32OpenSource.v%{version}.zip
|
|
|
|
Source1: COPYING
|
|
|
|
Source2: README
|
|
|
|
Source3: README.SUSE
|
|
|
|
Source4: meson_options.txt
|
|
|
|
Source5: meson.build
|
2021-11-07 05:17:43 +01:00
|
|
|
Source6: baselibs.conf
|
2021-10-06 19:33:17 +02:00
|
|
|
BuildRequires: meson
|
2021-11-07 05:17:43 +01:00
|
|
|
BuildRequires: unzip
|
2021-10-06 19:33:17 +02:00
|
|
|
|
|
|
|
%description
|
2021-10-08 15:44:09 +02:00
|
|
|
BroadVoice is a family of speech coding algorithms created by
|
|
|
|
Broadcom and standardized by CableLabs, SCTE, and ANSI for Voice over
|
|
|
|
IP applications in cable telephony. BroadVoice is also part of the
|
|
|
|
ITU-T Recommendations J.161 and J.361.
|
2021-10-06 19:33:17 +02:00
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: BroadVoice 32 development files
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
%if !0%{?static}
|
|
|
|
Requires: %{name}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Header files for the libbv32 library.
|
|
|
|
%if 0%{?static}
|
|
|
|
This package also includes the static library.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%prep
|
2021-10-08 15:44:09 +02:00
|
|
|
%autosetup -n BroadVoice32
|
2021-10-06 19:33:17 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
cp %{SOURCE1} %{SOURCE2} %{SOURCE3} .
|
|
|
|
cp %{SOURCE4} %{SOURCE5} FloatingPoint
|
|
|
|
cd FloatingPoint
|
|
|
|
%meson \
|
|
|
|
%if 0%{?static}
|
|
|
|
-Dstatic_libs=true \
|
|
|
|
%endif
|
|
|
|
%if !0%{?shared}
|
|
|
|
-Dshared_libs=false \
|
|
|
|
%endif
|
|
|
|
%if !0%{?tools}
|
|
|
|
-Dbuild_tools=false \
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%meson_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
cd FloatingPoint
|
|
|
|
%meson_install
|
|
|
|
%if !0%{?static} && !0%{?shared}
|
|
|
|
rm -r %{buildroot}%{_includedir}/bv32-floatingpoint
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%check
|
|
|
|
%if 0%{?tools}
|
2021-11-07 05:17:43 +01:00
|
|
|
%ifarch s390x ppc ppc64 %sparc %sparc64
|
2021-10-13 17:15:36 +02:00
|
|
|
%define endianness BigEndian
|
|
|
|
%else
|
|
|
|
%define endianness LittleEndian
|
|
|
|
%endif
|
2021-10-06 19:33:17 +02:00
|
|
|
cd FloatingPoint/process
|
|
|
|
#return failure if TestBroadVoice32 fails
|
|
|
|
echo 'exit $checksum' >>TestBroadVoice32
|
|
|
|
#TestBroadVoice32 is setup for compilation with DG192BITSTREAM=1
|
|
|
|
#remove some tests for compilation with DG192BITSTREAM=0
|
|
|
|
grep -qF DG192BITSTREAM=0 ../meson.build && \
|
|
|
|
sed -i '/cmp tv.bv32 tv.bv32.ref/,/fi/d' TestBroadVoice32 && \
|
|
|
|
sed -i '/cmp tv.bv32.bfe10.raw tv.bv32.bfe10.ref.raw/,/fi/d' TestBroadVoice32 && \
|
|
|
|
sed -i '/cmp tvbe.bv32 tvbe.bv32.ref/,/fi/d' TestBroadVoice32 && \
|
|
|
|
sed -i '/cmp tvbe.bv32.bfe10.raw tvbe.bv32.bfe10.ref.raw/,/fi/d' TestBroadVoice32
|
|
|
|
PATH=%{buildroot}%{_bindir}:$PATH LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
|
2021-10-13 17:15:36 +02:00
|
|
|
bash TestBroadVoice32 %endianness
|
2021-10-06 19:33:17 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?shared}
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%endif
|
|
|
|
|
2021-11-07 05:17:43 +01:00
|
|
|
%files
|
2021-10-06 19:33:17 +02:00
|
|
|
%license COPYING
|
|
|
|
%doc README README.SUSE BroadVoice32.doc
|
|
|
|
%if 0%{?tools}
|
|
|
|
%{_bindir}/BroadVoice32
|
|
|
|
%endif
|
|
|
|
%if 0%{?shared}
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?static} || 0%{?shared}
|
|
|
|
%files devel
|
|
|
|
%dir %{_includedir}/bv32-floatingpoint
|
|
|
|
%dir %{_includedir}/bv32-floatingpoint/*
|
|
|
|
%{_includedir}/*/*/*.h
|
|
|
|
%if 0%{?static}
|
|
|
|
%{_libdir}/*.a
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|