mirror of
https://abf.rosa.ru/djam/libtgvoip.git
synced 2025-02-23 09:52:51 +00:00
sync with omv
This commit is contained in:
parent
d89070f571
commit
70866a9b33
4 changed files with 129 additions and 85 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,2 +1,2 @@
|
|||
sources:
|
||||
"2.2.tar.gz": 81606f56859bd38be48d4c0db4da84bca27a4e7f
|
||||
2.4.4.tar.gz: 485f97aa6d827401827a2621e46cc35defa14a2e
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
--- libtgvoip.gyp
|
||||
+++ libtgvoip.gyp
|
||||
@@ -4,7 +4,8 @@
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'libtgvoip',
|
||||
- 'type': 'static_library',
|
||||
+ 'type': 'shared_library',
|
||||
+ 'product_extension': 'so.<!(echo -n "$VERSION")',
|
||||
'dependencies': [],
|
||||
'defines': [
|
||||
'WEBRTC_APM_DEBUG_DUMP=0',
|
||||
@@ -17,7 +18,7 @@
|
||||
},
|
||||
'include_dirs': [
|
||||
'<(tgvoip_src_loc)/webrtc_dsp',
|
||||
- '<(linux_path_opus_include)',
|
||||
+ '<!(rpm --eval "%{_includedir}/opus")',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
@@ -386,6 +387,7 @@
|
||||
'defines': [
|
||||
'WEBRTC_POSIX',
|
||||
],
|
||||
+ 'cflags_cc': [ '-std=gnu++11' ],
|
||||
'conditions': [
|
||||
[ '"<!(uname -m)" == "i686"', {
|
||||
'cflags_cc': [
|
37
libtgvoip-build-fixes.patch
Normal file
37
libtgvoip-build-fixes.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
From e94437a0f3444da9f42022090ba797725998928a Mon Sep 17 00:00:00 2001
|
||||
From: Vitaly Zaitsev <vitaly@easycoding.org>
|
||||
Date: Thu, 6 Jul 2017 17:27:01 +0200
|
||||
Subject: [PATCH] Fixed build of libtgvoip under Fedora as shared library.
|
||||
|
||||
---
|
||||
libtgvoip.gyp | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/libtgvoip.gyp b/libtgvoip.gyp
|
||||
index 8c62b56..8fe9c5b 100644
|
||||
--- a/libtgvoip.gyp
|
||||
+++ b/libtgvoip.gyp
|
||||
@@ -4,7 +4,8 @@
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'libtgvoip',
|
||||
- 'type': 'static_library',
|
||||
+ 'type': 'shared_library',
|
||||
+ 'product_extension': 'so.<!(echo -n "$VOIPVER")',
|
||||
'dependencies': [],
|
||||
'defines': [
|
||||
'WEBRTC_APM_DEBUG_DUMP=0',
|
||||
@@ -14,11 +15,11 @@
|
||||
'variables': {
|
||||
'tgvoip_src_loc': '.',
|
||||
'official_build_target%': '',
|
||||
- 'linux_path_opus_include%': '<(DEPTH)/../../../Libraries/opus/include',
|
||||
},
|
||||
'include_dirs': [
|
||||
'<(tgvoip_src_loc)/webrtc_dsp',
|
||||
- '<(linux_path_opus_include)',
|
||||
+ '<!(rpm --eval "%{_includedir}")',
|
||||
+ '<!(rpm --eval "%{_includedir}/opus")',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
146
libtgvoip.spec
146
libtgvoip.spec
|
@ -1,75 +1,111 @@
|
|||
%define debug_package %{nil}
|
||||
%define major 2
|
||||
%define libname %mklibname tgvoip %{version}
|
||||
%define devname %mklibname -d tgvoip
|
||||
%define date 20180529
|
||||
%define alpha alpha4
|
||||
|
||||
%define major 2.2
|
||||
%define libname %mklibname tgvoip %{major}
|
||||
%define develname %mklibname -d tgvoip
|
||||
Summary: VoIP library for Telegram clients
|
||||
Name: libtgvoip
|
||||
Version: 2.4.4
|
||||
Release: 2
|
||||
Group: System/Libraries
|
||||
|
||||
Name: libtgvoip
|
||||
Version: 2.2
|
||||
Release: 1
|
||||
Summary: VoIP library for Telegram clients
|
||||
Source0: %{url}/archive/%{version}.tar.gz
|
||||
Patch0: fix_gyp.patch
|
||||
License: Public Domain
|
||||
Group: Networking/Instant messaging
|
||||
Url: https://github.com/grishka/%{name}
|
||||
BuildRequires: libalsa-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: opus-devel
|
||||
BuildRequires: pulseaudio-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: make
|
||||
BuildRequires: gyp
|
||||
# Libtgvoip shared library - Public Domain.
|
||||
# Bundled webrtc library - BSD with patented echo cancellation algorithms.
|
||||
License: Public Domain and BSD
|
||||
URL: https://github.com/grishka/%{name}
|
||||
|
||||
# git archive --format=tar --prefix libtgvoip-2.0-alpha4-$(date +%Y%m%d)/ HEAD | xz -vf > ../libtgvoip-2.0-alpha4-$(date +%Y%m%d).tar.xz
|
||||
#Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
#Source0: libtgvoip-%{version}-%{alpha}-%{date}.tar.xz
|
||||
Source0: https://github.com/grishka/libtgvoip/archive/%{version}.tar.gz
|
||||
Patch0: %{name}-build-fixes.patch
|
||||
|
||||
Provides: bundled(webrtc-audio-processing) = 0.3
|
||||
BuildRequires: pkgconfig(libpulse)
|
||||
BuildRequires: alsa-oss-devel
|
||||
BuildRequires: pkgconfig(alsa)
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: opus-devel
|
||||
BuildRequires: gyp
|
||||
BuildRequires: cmake
|
||||
BuildRequires: ninja
|
||||
BuildRequires: python3-pkg-resources
|
||||
%ifarch x86_64
|
||||
BuildRequires: llvm-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
%{summary}
|
||||
Provides VoIP library for Telegram clients.
|
||||
|
||||
#--------------------------------------------------------
|
||||
%package -n %{libname}
|
||||
Summary: VoIP library for Telegram clients
|
||||
Group: System/Libraries
|
||||
|
||||
%package -n %{libname}
|
||||
Summary: VoIP library for Telegram clients
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %{libname}
|
||||
%description -n %{libname}
|
||||
VoIP library for Telegram clients
|
||||
|
||||
%files -n %{libname}
|
||||
%doc UNLICENSE
|
||||
%{_libdir}/*.so*
|
||||
%files -n %{libname}
|
||||
%{_libdir}/%{name}.so.*
|
||||
|
||||
#--------------------------------------------------------
|
||||
%package -n %{devname}
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{libname} = %{EVRD}
|
||||
Provides: tgvoip-devel = %{EVRD}
|
||||
|
||||
%package -n %{develname}
|
||||
Summary: VoIP library for Telegram clients
|
||||
Group: System/Libraries
|
||||
%description -n %{devname}
|
||||
%{summary}.
|
||||
|
||||
%description -n %{develname}
|
||||
This package provides headers files for development.
|
||||
|
||||
%files -n %{develname}
|
||||
%doc UNLICENSE
|
||||
%files -n %{devname}
|
||||
%{_includedir}/%{name}
|
||||
|
||||
#--------------------------------------------------------
|
||||
%{_libdir}/%{name}.so
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0
|
||||
%setup -n %{name}-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
export VERSION="%{version}"
|
||||
gyp --format=cmake --depth=. --generator-output=. -Goutput_dir=out -Gconfig=Release %{name}.gyp
|
||||
export VOIPVER="%{version}"
|
||||
export SOVER=%{version}
|
||||
export CXXFLAGS="%{optflags} -std=gnu++11 -ldl -lpthread -lopus -lssl -lcrypto"
|
||||
%{_bindir}/gyp --format=cmake --depth=. --generator-output=. -Goutput_dir=out -Gconfig=Release %{name}.gyp
|
||||
|
||||
cd out/Release
|
||||
cmake .
|
||||
%make
|
||||
cd ../..
|
||||
pushd out/Release
|
||||
%cmake -G Ninja
|
||||
%ninja_build
|
||||
popd
|
||||
|
||||
%install
|
||||
mkdir --parents %{buildroot}%{_libdir}
|
||||
install --mode 0755 -p out/Release/lib.target/%{name}.so.%{version} %{buildroot}%{_libdir}
|
||||
ln --symbolic %{name}.so.%{version} %{buildroot}%{_libdir}/%{name}.so.2
|
||||
# Installing shared library...
|
||||
mkdir -p "%{buildroot}%{_libdir}"
|
||||
install -m 0755 -p out/Release/build/lib.target/%{name}.so.%{version} "%{buildroot}%{_libdir}/%{name}.so.%{version}"
|
||||
ln -s %{name}.so.%{version} "%{buildroot}%{_libdir}/%{name}.so.%{major}"
|
||||
ln -s %{name}.so.%{version} "%{buildroot}%{_libdir}/%{name}.so"
|
||||
|
||||
# Installing additional development files...
|
||||
mkdir -p "%{buildroot}%{_includedir}/%{name}"
|
||||
find . -maxdepth 1 -type f -name "*.h" -exec install -m 0644 -p '{}' %{buildroot}%{_includedir}/%{name} \;
|
||||
mkdir -p "%{buildroot}%{_includedir}/%{name}/audio"
|
||||
find audio -maxdepth 1 -type f -name "*.h" -exec install -m 0644 -p '{}' %{buildroot}%{_includedir}/%{name}/audio \;
|
||||
mkdir -p "%{buildroot}%{_includedir}/%{name}/video"
|
||||
find video -maxdepth 1 -type f -name "*.h" -exec install -m 0644 -p '{}' %{buildroot}%{_includedir}/%{name}/video \;
|
||||
pwd
|
||||
mkdir -p "%{buildroot}%{_libdir}/pkgconfig"
|
||||
|
||||
cat <<EOF >tgvoip.pc
|
||||
includedir=%_includedir
|
||||
|
||||
Name: tgvoip
|
||||
Description: %summary
|
||||
URL: %url
|
||||
Version: %version
|
||||
Requires: opus
|
||||
Conflicts:
|
||||
Libs: -ltgvoip
|
||||
Libs.private: -ldl -lpthread -lopus -lcrypto
|
||||
Cflags: -I\${includedir}/%{name}
|
||||
EOF
|
||||
|
||||
install -m 0644 tgvoip.pc %{buildroot}%{_libdir}/pkgconfig
|
||||
|
||||
mkdir --parents "%{buildroot}%{_includedir}/%{name}/audio"
|
||||
find . -maxdepth 1 -type f -name "*.h" -exec install --mode 0644 --preserve-timestamps '{}' %{buildroot}%{_includedir}/%{name} \;
|
||||
find audio -maxdepth 1 -type f -name "*.h" -exec install --mode 0644 --preserve-timestamps '{}' %{buildroot}%{_includedir}/%{name}/audio \;
|
||||
|
|
Loading…
Add table
Reference in a new issue