libtgvoip/libtgvoip.spec

56 lines
1.4 KiB
RPMSpec
Raw Normal View History

2018-07-27 22:20:42 +03:00
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: python-gyp
%description
%{summary}
%package devel
%description devel
%{summary}
This package provides headers files for development.
%prep
%setup -q
%patch0 -p0
%build
export VERSION="%{version}"
gyp --format=cmake --depth=. --generator-output=. -Goutput_dir=out -Gconfig=Release %{name}.gyp
cd out/Release
cmake .
make
cd ../..
%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
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 \;
%files
%doc UNLICENSE
%{_libdir}/*.so*
%files devel
%doc UNLICENSE
%{_includedir}/%{name}