137 lines
3.9 KiB
RPMSpec
137 lines
3.9 KiB
RPMSpec
|
#
|
||
|
# spec file for package broadvoice16
|
||
|
#
|
||
|
# Copyright (c) 2021 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 http://bugs.opensuse.org/
|
||
|
#
|
||
|
|
||
|
%define static 0
|
||
|
%define shared 1
|
||
|
%define tools 1
|
||
|
|
||
|
Name: broadvoice16
|
||
|
Version: 1.2
|
||
|
Release: 0
|
||
|
Summary: BroadVoice 16 Speech Codec
|
||
|
License: LGPL-2.1-only
|
||
|
Group: Productivity/Multimedia/Sound/Utilities
|
||
|
URL: https://www.broadcom.com/site-search?q=broadvoice
|
||
|
Source0: BroadVoice16OpenSource.v%{version}.zip
|
||
|
Source1: COPYING
|
||
|
Source2: README
|
||
|
Source3: README.SUSE
|
||
|
Source4: meson_options.txt
|
||
|
Source5: meson.build
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||
|
BuildRequires: unzip
|
||
|
BuildRequires: meson
|
||
|
|
||
|
%description
|
||
|
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. To encourage wide-spread use of BroadVoice in diverse speech compression applications, Broadcom is providing the C source code of BroadVoice on a royalty-free basis under the GNU Lesser General Public License (LGPL), version 2.1, as published by the Free Software Foundation.
|
||
|
|
||
|
%if 0%{?static} || 0%{?shared}
|
||
|
%package devel
|
||
|
Summary: BroadVoice 16 development files
|
||
|
Group: Development/Libraries/C and C++
|
||
|
%if !0%{?static}
|
||
|
Requires: %{name}
|
||
|
%endif
|
||
|
|
||
|
%description devel
|
||
|
Header files for the libbv16 library.
|
||
|
%if 0%{?static}
|
||
|
This package also includes the static library.
|
||
|
%endif
|
||
|
%endif
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n BroadVoice16
|
||
|
|
||
|
%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}/bv16-floatingpoint
|
||
|
%endif
|
||
|
|
||
|
%check
|
||
|
%if 0%{?tools}
|
||
|
cd FloatingPoint/process
|
||
|
#return failure if TestBroadVoice16 fails
|
||
|
echo 'exit $checksum' >>TestBroadVoice16
|
||
|
#TestBroadVoice16 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.bv16 tv.bv16.ref/,/fi/d' TestBroadVoice16 && \
|
||
|
sed -i '/cmp tv.bv16.bfe10.raw tv.bv16.bfe10.ref.raw/,/fi/d' TestBroadVoice16 && \
|
||
|
sed -i '/cmp tvbe.bv16 tvbe.bv16.ref/,/fi/d' TestBroadVoice16 && \
|
||
|
sed -i '/cmp tvbe.bv16.bfe10.raw tvbe.bv16.bfe10.ref.raw/,/fi/d' TestBroadVoice16
|
||
|
%ifarch %ix86 x86_64 ppc64le aarch64 %arm
|
||
|
PATH=%{buildroot}%{_bindir}:$PATH LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
|
||
|
bash TestBroadVoice16 LittleEndian
|
||
|
%endif
|
||
|
%ifarch s390x ppc64
|
||
|
PATH=%{buildroot}%{_bindir}:$PATH LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
|
||
|
bash TestBroadVoice16 BigEndian
|
||
|
%endif
|
||
|
%endif
|
||
|
|
||
|
%if 0%{?shared}
|
||
|
%post -p /sbin/ldconfig
|
||
|
|
||
|
%postun -p /sbin/ldconfig
|
||
|
%endif
|
||
|
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root,-)
|
||
|
%license COPYING
|
||
|
%doc README README.SUSE BroadVoice16.doc
|
||
|
%if 0%{?tools}
|
||
|
%{_bindir}/BroadVoice16
|
||
|
%endif
|
||
|
%if 0%{?shared}
|
||
|
%{_libdir}/*.so
|
||
|
%endif
|
||
|
|
||
|
%if 0%{?static} || 0%{?shared}
|
||
|
%files devel
|
||
|
%defattr(-,root,root,-)
|
||
|
%dir %{_includedir}/bv16-floatingpoint
|
||
|
%dir %{_includedir}/bv16-floatingpoint/*
|
||
|
%{_includedir}/*/*/*.h
|
||
|
%if 0%{?static}
|
||
|
%{_libdir}/*.a
|
||
|
%endif
|
||
|
%endif
|
||
|
|
||
|
%changelog
|
||
|
|