# fzf packaged with fully-bundled (vendored) Go dependencies so the koji build # behind Copr can build completely offline (no module proxy / no internet). # Vendor blob (Source1) generated with go-vendor-tools (go_vendor_archive). %bcond_with check # https://github.com/junegunn/fzf %global goipath github.com/junegunn/fzf Version: 0.73.1 %gometa -L -f Name: fzf Release: 1%{?dist} Summary: A command-line fuzzy finder # fzf: MIT ; bundled deps add Apache-2.0 and BSD-3-Clause License: Apache-2.0 AND BSD-3-Clause AND MIT URL: %{gourl} Source0: %{gosource} Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: go-rpm-macros BuildRequires: go-vendor-tools BuildRequires: golang %description fzf is a general-purpose command-line fuzzy finder. It is an interactive filter usable with any list: files, command history, processes, hostnames, bookmarks, git commits, etc. All Go module dependencies are bundled (vendored) in the source RPM for fully offline builds. %prep %goprep -p1 # Unpack the vendored dependency archive (go.mod, go.sum, vendor/) on top of the tree tar -xf %{S:1} # Bake the packaged version (built outside git, so upstream defaults to "devel") sed -i 's/^var version = .*/var version = "%{version}"/' main.go sed -i 's/^var revision = .*/var revision = ""/' main.go %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on %gobuild -o %{gobuilddir}/bin/fzf %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/fzf %{buildroot}%{_bindir}/fzf install -m 0755 -vp bin/fzf-tmux %{buildroot}%{_bindir}/fzf-tmux install -m 0755 -vd %{buildroot}%{_mandir}/man1 install -m 0644 -vp man/man1/fzf.1 %{buildroot}%{_mandir}/man1/fzf.1 install -m 0644 -vp man/man1/fzf-tmux.1 %{buildroot}%{_mandir}/man1/fzf-tmux.1 # Shell integration (completions + key bindings) install -m 0755 -vd %{buildroot}%{_datadir}/fzf/shell install -m 0644 -vp shell/completion.bash %{buildroot}%{_datadir}/fzf/shell/ install -m 0644 -vp shell/completion.zsh %{buildroot}%{_datadir}/fzf/shell/ install -m 0644 -vp shell/key-bindings.bash %{buildroot}%{_datadir}/fzf/shell/ install -m 0644 -vp shell/key-bindings.zsh %{buildroot}%{_datadir}/fzf/shell/ install -m 0644 -vp shell/key-bindings.fish %{buildroot}%{_datadir}/fzf/shell/ install -m 0644 -vp shell/completion.fish %{buildroot}%{_datadir}/fzf/shell/ %check %go_vendor_license_check -c %{S:2} %if %{with check} %gotest ./... %endif %files -f %{go_vendor_license_filelist} %doc CHANGELOG.md README.md README-VIM.md ADVANCED.md %{_bindir}/fzf %{_bindir}/fzf-tmux %{_mandir}/man1/fzf.1* %{_mandir}/man1/fzf-tmux.1* %dir %{_datadir}/fzf %dir %{_datadir}/fzf/shell %{_datadir}/fzf/shell/* %changelog * Fri Jul 03 2026 yxwang5db2 - 0.73.1-1 - Initial package for AL-Stream-2023 with fully bundled (vendored) Go deps