# Generated by go2rpm 1.14.0 %bcond check 1 # https://github.com/gokcehan/lf %global goipath github.com/gokcehan/lf Version: r35 %global tag %{version} %gometa -L -f %global common_description %{expand: lf (as in "list files") is a terminal file manager written in Go with a heavy inspiration from the ranger file manager. Features: - Single binary without any runtime dependencies - Asynchronous IO operations to avoid UI locking - Server/client architecture and remote commands to manage multiple instances - Extendable and configurable with shell commands - Customizable keybindings (vi and readline defaults)} %global golicenses LICENSE %global godocs CONTRIBUTING.md README.md doc.md doc.txt Name: lf Release: %autorelease Summary: Terminal file manager License: MIT URL: %{gourl} Source: %{gosource} BuildRequires: desktop-file-utils # Provided as script in /etc/profile.d Provides: lfcd %description %{common_description} %prep %goprep -A %generate_buildrequires %go_generate_buildrequires %build export LDFLAGS="$LDFLAGS -X main.gVersion=%{version}" %gobuild -o %{gobuilddir}/%{name} %{goipath} %install install -m 0755 -Dvp %{gobuilddir}/%{name} %{buildroot}%{_bindir}/%{name} desktop-file-install %{name}.desktop --dir=%{buildroot}%{_datadir}/applications # docs install -m 0644 -Dvp %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 install -m 0644 -Dvp doc.txt %{buildroot}%{_pkgdocdir}/doc.txt install -m 0644 -Dvp etc/%{name}rc.example %{buildroot}%{_pkgdocdir}/%{name}rc.example install -m 0644 -Dvp etc/colors.example %{buildroot}%{_pkgdocdir}/colors.example install -m 0644 -Dvp etc/icons.example %{buildroot}%{_pkgdocdir}/icons.example # shell completions install -m 0644 -Dvp etc/%{name}.bash %{buildroot}%{bash_completions_dir}/%{name} install -m 0644 -Dvp etc/%{name}.zsh %{buildroot}%{zsh_completions_dir}/_%{name} install -m 0644 -Dvp etc/%{name}.fish %{buildroot}%{fish_completions_dir}/%{name}.fish # lfcd install -m 0644 -Dvp etc/%{name}cd.sh %{buildroot}%{_sysconfdir}/profile.d/%{name}cd.sh install -m 0644 -Dvp etc/%{name}cd.sh %{buildroot}%{zsh_completions_dir}/%{name}cd install -m 0644 -Dvp etc/%{name}cd.fish %{buildroot}%{_datadir}/fish/vendor_functions.d/%{name}cd.fish # lf.vim install -m 0644 -Dvp etc/%{name}.vim %{buildroot}%{_datadir}/vim/vimfiles/plugin/%{name}.vim %if %{with check} %check %gocheck %endif %files %license %{golicenses} %dir %{_pkgdocdir} %doc %{_pkgdocdir}/* %doc %{_mandir}/man1/{%name}.1* %{_bindir}/%{name} # directories provides by 'filesystem' and 'setup' %{_datadir}/applications/%{name}.desktop %{bash_completions_dir}/%{name} %{_sysconfdir}/profile.d/%{name}cd.sh # zsh %dir %{_datadir}/zsh %dir %{zsh_completions_dir} %{zsh_completions_dir}/_%{name} %{zsh_completions_dir}/%{name}cd # fish %dir %{_datadir}/fish %dir %{fish_completions_dir} %dir %{_datadir}/fish/vendor_functions.d %{fish_completions_dir}/%{name}.fish %{_datadir}/fish/vendor_functions.d/%{name}cd.fish # lf.vim %dir %{_datadir}/vim %dir %{_datadir}/vim/vimfiles %dir %{_datadir}/vim/vimfiles/plugin %{_datadir}/vim/vimfiles/plugin/%{name}.vim %changelog %autochangelog