# Generated by go2rpm 1.19.0 %bcond check 1 %global debug_package %{nil} # https://github.com/gokcehan/lf %global goipath github.com/gokcehan/lf Version: r42 %global tag %{version} %gometa -L -f %global common_description %{expand: lf (as in "list files") is a terminal file manager written in Go.} Name: lf Release: %autorelease -e 4 Summary: Terminal file manager # Generated by go-vendor-tools License: Apache-2.0 AND BSD-3-Clause AND MIT URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: https://github.com/RebornRider/copr-packages/releases/download/source-artefacts/%{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools BuildRequires: desktop-file-utils # Provided as script in /etc/profile.d Provides: lfcd = %{version}-%{release} %description %{common_description} %prep %goprep -p1 tar -xf %{S:1} %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on export LDFLAGS="$LDFLAGS -X main.gVersion=%{version}" %gobuild -o %{gobuilddir}/bin/%{name} %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/%{name} %{buildroot}%{_bindir}/ 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 # ruler.default install -m 0644 -Dvp etc/ruler.default %{buildroot}%{_pkgdocdir}/ruler.default %check %go_vendor_license_check -c %{S:2} %if %{with check} desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop %gotest ./... %endif %files -f %{go_vendor_license_filelist} %dir %{_pkgdocdir} %doc %{_pkgdocdir}/* %doc CHANGELOG.md CONTRIBUTING.md README.md doc.md %{_mandir}/man1/%{name}.1* %{_bindir}/%{name} # directories provided 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