%global commitdate 20201214
%global commit 976d8f6eb3dd38b090cfd086eac9686534b4fc44
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global debug_package %{nil}

Name:       remote-input
Version:    %{commitdate}.%{shortcommit}
Release:    1%{?dist}
Summary:    Mouse and keyboard input forwarding over a TCP connection
License:    GPL-3
URL:        https://github.com/ingemaradahl/remote-input
Source:     https://github.com/ingemaradahl/remote-input/archive/%{commit}/%{name}-%{version}.tar.gz

BuildRequires: gcc
BuildRequires: glibc-devel
BuildRequires: libX11-devel
BuildRequires: make

%description
Simple tool for forwarding mouse and keyboard input over a TCP connection

%prep
%setup -n %{name}-%{commit}

%build
%make_build all

%install
install -d %{buildroot}%{_bindir}
for x in \
	"xforward-input" \
	"remote-inputd"
do
	install -m 0755 ${x} %{buildroot}%{_bindir}/${x}
done

%files
%license COPYING
%doc README.md
%defattr(-,root,root,-)
%{_bindir}/*

%changelog
* Thu Dec 17 2020 Yury Martynov <email@linxon.ru> 20201214.976d8f6-1
- Update to latest commit at 20201214.976d8f6
* Sat Oct 17 2020 Yury Martynov <email@linxon.ru> 20190804-1
- Initial packaging.