%define namePackager Ivan Razzhivin
%define addressPackager underwit@altlinux.org
%define dateFormated Tue Jun 26 2018

Name:           micro
Version:        1.4.0
Release:        alt1
Summary:        Micro is a terminal-based text editor

Group:          Editors
License:        MIT
URL:            https://micro-editor.github.io/
Source0:        %{name}-%{version}.tar.gz

Requires:       xclip

%description
Micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the full capabilities of modern terminals. It comes as one single, batteries-included, static binary with no dependencies, and you can download and use it right now.

As the name indicates, micro aims to be somewhat of a successor to the nano editor by being easy to install and use in a pinch, but micro also aims to be enjoyable to use full time, whether you work in the terminal because you prefer it (like me), or because you need to (over ssh).

%prep
%setup -q

%build

%install
mkdir -p %{buildroot}/%{_bindir}
install -D -m 0755 %{name} %{buildroot}/%{_bindir}/%{name}
install -D -m 0744 %{name}.1 %{buildroot}/%{_mandir}/man1/%{name}.1
install -D -m 0744 %{name}.svg %{buildroot}/%{_iconsdir}/hicolor/scalable/apps/%{name}.svg
desktop-file-install --dir=%{buildroot}%{_desktopdir} %{name}.desktop

%files
%doc LICENSE LICENSE-THIRD-PARTY README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_iconsdir}/hicolor/scalable/apps/%{name}.svg
%{_desktopdir}/%{name}.desktop

%changelog
* %{dateFormated} %{namePackager} <%{addressPackager}> %{version}-%{release}
- Initial build
