File tdlib.spec of Package tdlib
#
# spec file for package tdlib
#
# Copyright (c) 2024 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 soname 1_8_35
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
Name: tdlib
Version:
Release: 0
Summary: Cross-platform library for building Telegram clients
License: BSL-1.0
URL: https://github.com/tdlib/td
Source: td-%{version}.tar
BuildRequires: extra-cmake-modules
BuildRequires: gperf
BuildRequires: gperftools-devel
BuildRequires: libressl-devel
BuildRequires: zlib-devel
%description
TDLib (Telegram Database library) is a cross-platform library for
building Telegram clients. It can be easily used from almost any
programming language.
%package devel
Summary: Development files for %{name}
Requires: libtdapi%{soname} = %{version}
Requires: libtdclient%{soname} = %{version}
Requires: libtdjson%{soname} = %{version}
%description devel
%{summary}.
%package static
Summary: Static libraries for %{name}
Requires: %{name}-devel = %{version}
%description static
%{summary}.
%package -n libtdapi%{soname}
Summary: Telegram database API library
%description -n libtdapi%{soname}
%{summary}.
%package -n libtdclient%{soname}
Summary: Telegram database client library
%description -n libtdclient%{soname}
%{summary}.
%package -n libtdjson%{soname}
Summary: Telegram database JSON library
%description -n libtdjson%{soname}
%{summary}.
%prep
%autosetup -n td-%{version}
%build
%cmake
%cmake_build
%install
%cmake_install
%ldconfig_scriptlets -n libtdclient%{soname}
%ldconfig_scriptlets -n libtdjson%{soname}
%ldconfig_scriptlets -n libtdapi%{soname}
%files devel
%license LICENSE_1_0.txt
%doc CHANGELOG* README*
%{_includedir}/td
%{_libdir}/libtd*.so
%{_libdir}/cmake/Td
%{_libdir}/pkgconfig/td*.pc
%files -n libtdapi%{soname}
%{_libdir}/libtdapi.so.%{version}
%files -n libtdclient%{soname}
%{_libdir}/libtdclient.so.%{version}
%files -n libtdjson%{soname}
%{_libdir}/libtdjson.so.%{version}
%files static
%{_libdir}/libtd*.a
%changelog