%global debug_package %{nil}

Name:           tightvnc
Version:        1.3.10
Release:        1%{?dist}
License:        GPLv2+
Summary:        TightVNC is a free and Open Source remote desktop software
Url:            https://www.tightvnc.com/
Source0:        https://github.com/TurboVNC/%{name}/archive/refs/tags/%{version}.tar.gz

BuildRequires:  libjpeg-devel
BuildRequires:  xorg-x11-server-source
BuildRequires:  imake
BuildRequires:  libXt-devel
BuildRequires:  libXmu-devel
BuildRequires:  libXaw-devel
BuildRequires:  zlib-devel

Requires:       xdpyinfo
Provides:       vnc

Recommends:     xsetroot


%description
TightVNC is a free and Open Source remote desktop software that lets you access and control a computer over the network.
With its intuitive interface, you can interact with the remote screen as if you were sitting in front of it.
You can open files, launch applications, and perform other actions on the remote desktop almost as if you were physically there.

%prep
%setup -q -n %{name}-%{version}/vnc_unixsrc

%build
xmkmf
%__make World # CCOPTIONS="$RPM_OPT_FLAGS"
#TODO: read documentation to improve this package

%install
make DESTDIR=%{buildroot} install

%__mkdir_p -m 755  %{buildroot}%{_bindir}

%__install -D -m 751 vncviewer/vncviewer %{buildroot}%{_bindir}/vncviewer
%__install -D -m 755 vncconnect/vncconnect %{buildroot}%{_bindir}/vncconnect

%files
%license LICENCE.TXT 
%doc README
%{_bindir}/vncviewer
%{_bindir}/vncconnect

%changelog
* Wed Jun 14 2023 Xoloitzcuintle <xoloitzcuintle_god@protonmail.com> 1.3.10-1
- Initial package for Fedora