## START: Set by rpmautospec
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

Name:           ttyd
Version:        1.7.7
Release:        %autorelease
Summary:        Share your terminal over HTTP
License:        MIT
URL:            https://github.com/tsl0922/ttyd
Source:         https://github.com/tsl0922/ttyd/archive/refs/tags/%{version}.tar.gz

Patch0:         ttyd-CMakeLists.txt.patch

BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  json-c-devel
BuildRequires:  libuv-devel
BuildRequires:  libwebsockets-devel
BuildRequires:  ninja-build
BuildRequires:  pkgconf
BuildRequires:  zlib-devel

%description
ttyd is a simple command-line tool for sharing terminal over the web, inspired
by GoTTY.

%prep
%autosetup

%build
%cmake
%cmake_build

%install
%cmake_install

%files
%{_bindir}/ttyd
%{_mandir}/man1/ttyd.1.*
%license LICENSE

%changelog
## START: Generated by rpmautospec
* Tue Jul 30 2024 John Doe <packager@example.com> - 1.7.7-1
- Uncommitted changes
## END: Generated by rpmautospec