# Generated by go2rpm 1.8.2 %bcond_without check # https://github.com/gokcehan/lf %global goipath github.com/gokcehan/lf Version: r30 %global tag %{version} %gometa -f %global common_description %{expand: lf (as in "list files") is a terminal file manager written in Go with a heavy inspiration from ranger file manager} %global golicenses LICENSE %global godocs README.md Name: lf Release: 1%{?dist} Summary: A terminal file manager inspired by ranger License: MIT URL: %{gourl} Source: %{gosource} Requires: %{_sysconfdir}/profile.d Requires: %{bash_completions_dir} # Provided as script in /etc/profile.d Provides: lfcd # Suggests subpackages with integrations for non-default programs Suggests: %{name}-zsh-integration Suggests: %{name}-fish-integration Suggests: %{name}-vim-plugin %description %{common_description} %package zsh-integration Requires: %{name}%{?_isa} = %{version}-%{release} Requires: zsh Summary: Completion for %{name} and %{name}cd script for ZSH BuildArch: noarch %description zsh-integration Zsh integrations for lf terminal file manager %package fish-integration Requires: %{name}%{?_isa} = %{version}-%{release} Requires: fish Summary: Completion for %{name} and %{name}cd script for fish BuildArch: noarch %description fish-integration fish integrations for lf terminal file manager %package vim-plugin Provides: vim-lf-plugin = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: vim-filesystem Summary: Vim plugin for %{name} BuildArch: noarch %description vim-plugin Vim plugin for lf terminal file manager %gopkg %prep %goprep %generate_buildrequires %go_generate_buildrequires %build %gobuild -o %{name} %{goipath} %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{name} %{buildroot}%{_bindir}/%{name} # docs install -m 0755 -vd %{buildroot}%{_mandir}/man1 install -m 0755 -vd %{buildroot}%{_docdir}/%{name} install -m 0644 -vp %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 install -m 0644 -vp etc/%{name}rc.example %{buildroot}%{_pkgdocdir}/%{name}rc.example install -m 0644 -vp etc/colors.example %{buildroot}%{_pkgdocdir}/colors.example install -m 0644 -vp etc/icons.example %{buildroot}%{_pkgdocdir}/icons.example # shell completions install -m 0755 -vd %{buildroot}%{bash_completions_dir} install -m 0755 -vd %{buildroot}%{_datadir}/zsh/site-functions install -m 0755 -vd %{buildroot}%{_datadir}/fish/vendor_completions.d install -m 0644 -vp etc/%{name}.bash %{buildroot}%{bash_completions_dir}/%{name} install -m 0644 -vp etc/%{name}.zsh %{buildroot}%{_datadir}/zsh/site-functions/_%{name} install -m 0644 -vp etc/%{name}.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish # lfcd install -m 0755 -vd %{buildroot}%{_sysconfdir}/profile.d install -m 0755 -vd %{buildroot}%{_datadir}/fish/vendor_functions.d install -m 0644 -vp etc/%{name}cd.sh %{buildroot}%{_sysconfdir}/profile.d/%{name}cd.sh install -m 0644 -vp etc/%{name}cd.sh %{buildroot}%{_datadir}/zsh/site-functions/%{name}cd install -m 0644 -vp etc/%{name}cd.fish %{buildroot}%{_datadir}/fish/vendor_functions.d/%{name}cd.fish # lf.vim install -m 0755 -vd %{buildroot}%{_datadir}/vim/vimfiles/plugin install -m 0644 -vp etc/%{name}.vim %{buildroot}%{_datadir}/vim/vimfiles/plugin/%{name}.vim %if %{with check} %check %gocheck %endif %files %license %{golicenses} %dir %{_docdir}/{%name} %doc %{_mandir}/man1/{%name}.1* %doc %{_pkgdocdir}/* %{_bindir}/%{name} %{bash_completions_dir}/%{name} %{_sysconfdir}/profile.d/%{name}cd.sh %gopkgfiles %files zsh-integration %{_datadir}/zsh/site-functions/_%{name} %{_datadir}/zsh/site-functions/%{name}cd %files fish-integration %{_datadir}/fish/vendor_completions.d/%{name}.fish %{_datadir}/fish/vendor_functions.d/%{name}cd.fish %files vim-plugin %{_datadir}/vim/vimfiles/plugin/%{name}.vim %changelog %autochangelog