File nchat.spec of Package nchat

#
# spec file for package nchat
#
# Copyright (c) 2025 mantarimay
#
# 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/
#


Name:           nchat
Version:        5.11.32
Release:        alt1
Summary:        Terminal-based Telegram / WhatsApp client for Linux and macOS
License:        MIT
URL:            https://github.com/d99kris/nchat
Source0:        %{name}-%{version}.tar.zst
Source1:        vendor.tar.zst
BuildRequires:  cmake
BuildRequires:  ninja
BuildRequires:  gcc-c++
BuildRequires:  golang-packaging
BuildRequires:  gperf
BuildRequires:  file-devel
BuildRequires:  ncurses-devel
BuildRequires:  readline-devel
BuildRequires:  sqlite3-devel
BuildRequires:  libopenssl-devel
BuildRequires:  zlib-devel

%description
nchat is a terminal-based chat client for Linux and macOS
with support for Telegram and WhatsApp.

Features
  - Customizable color schemes and key bindings
  - Jump to unread chat
  - Message history cache with support for text export
  - Message read receipt
  - Receive / send markdown formatted messages
  - Reply / delete / edit / forward / send messages
  - List dialogs for selecting chats, contacts, emojis, files
  - Show user status (online, away, typing)
  - Toggle to view textized emojis vs. graphical
  - View / save media files (documents, photos, videos)
  - Send and display reactions

%prep
%autosetup
tar -xvf %{SOURCE1} -C lib/wmchat/go

%build
mkdir -p build
cd build

%cmake -G Ninja \
       -DHAS_DYNAMICLOAD=OFF \
       -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
       -DCMAKE_INSTALL_PREFIX=%{_prefix} \
       -DCMAKE_INSTALL_MANDIR=%{_mandir}
%cmake_build

%install
%cmake_install

%files
%license LICENSE
%doc *.md
%{_bindir}/%{name}
%{_libdir}/libtdclientshared.so
%{_libdir}/libduchat.so
%{_libdir}/libncutil.so
%{_libdir}/libtgchat.so
%{_libdir}/libwmchat.so
%{_usr}/libexec/%{name}
%{_man1dir}/%{name}.1.*
%{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by