%global debug_package %{nil}
%global archive_name master
Name:           screencast
Version:        1.5.0.next
Release:        1%{?dist}
Summary:        screencast is a command line interface to record a X11 desktop using FFmpeg

License:        GPLv2
URL:            https://github.com/dbermond/screencast
#Source0:        https://github.com/dbermond/screencast/archive/v%{version}.tar.gz
Source0:        https://github.com/dbermond/screencast/archive/%{name}-%{archive_name}.zip

Requires:       ffmpeg
Requires:       libnotify
Requires:       bc
Requires:       ImageMagick
Requires:       optipng
Requires:       slop
Requires:       sound-theme-freedesktop

%description
screencast is a command line interface to record a X11 desktop using FFmpeg,
having support for offline recording and live streaming. It's designed to make
desktop recording a simple task, eliminating the somewhat complex FFmpeg
command line arguments and the need of multiple commands.


%prep
%setup -q -n %{name}-%{archive_name}


%build
make %{?_smp_mflags}
gzip -9 -n doc/%{name}.1
chmod 644  doc/%{name}.1.gz


%install
install -p -d -m 755 %{buildroot}/%{_bindir}
install -p -d -m 755 %{buildroot}/%{_mandir}/man1
install -p -d -m 755 %{buildroot}/%{_datadir}/bash-completion/completions
install -p -m 755 %{name} %{buildroot}/%{_bindir}
install -p -m 644 doc/%{name}.1.gz %{buildroot}/%{_mandir}/man1
install -p -m 644 bash-completion/%{name} %{buildroot}/%{_datadir}/bash-completion/completions

%files
%doc README.md
%license COPYING
%{_bindir}/%{name}
%{_datadir}/bash-completion/completions/%{name}
%{_mandir}/man1/%{name}.1.gz


%changelog
* Fri Sep 11 2020 Rajeesh K V <rajeeshknambiar@fedoraproject.org> - 1.2-1
- Initial packaging