https://bugzilla.redhat.com/show_bug.cgi?id=2439344



--- Comment #2 from Mikel Olasagasti Uranga <[email protected]> ---
Spec is mostly correct, but there are some minor changes I would like to
propose to improve it or make it more similar to go2rpm template.

- Order alphabetically:

> Requires:       accountsservice
> # This is built on QuickShell
> Requires:       quickshell
> 
> Requires:       hicolor-icon-theme


- Order alphabetically:

> Recommends:     cava
> Recommends:     cliphist
> Recommends:     danksearch
> Recommends:     dgop
> Recommends:     matugen
> Recommends:     wl-clipboard
> Recommends:     NetworkManager
> Recommends:     qt6-qtmultimedia
> Recommends:     qt6ct

- Why use _vpath_builddir?

> mkdir -p %{_vpath_builddir}/bin
> %gobuild -o %{_vpath_builddir}/bin/dms ./cmd/dms

%gobuild -o %{gobuilddir}/bin/dms ./cmd/dms

- Install using default template:

> # Install dms cli
> mkdir -p %{buildroot}%{_bindir}
> install -pm0755 core/%{_vpath_builddir}/bin/dms %{buildroot}%{_bindir}/dms


install -m 0755 -vd                     %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/



> mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
> mkdir -p %{buildroot}%{_datadir}/zsh/site-functions
> mkdir -p %{buildroot}%{_datadir}/fish/vendor_completions.d
> core/%{_vpath_builddir}/bin/dms completion bash > 
> %{buildroot}%{_datadir}/bash-completion/completions/dms
> core/%{_vpath_builddir}/bin/dms completion zsh > 
> %{buildroot}%{_datadir}/zsh/site-functions/_dms
> core/%{_vpath_builddir}/bin/dms completion fish > 
> %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish

You can simplify with:

%{gobuilddir}/bin/%{name} completion bash > %{name}.bash
%{gobuilddir}/bin/%{name} completion fish > %{name}.fish
%{gobuilddir}/bin/%{name} completion zsh  > %{name}.zsh
install -Dpm 0644 %{name}.bash %{buildroot}%{bash_completions_dir}/%{name}
install -Dpm 0644 %{name}.fish %{buildroot}%{fish_completions_dir}/%{name}.fish
install -Dpm 0644 %{name}.zsh  %{buildroot}%{zsh_completions_dir}/_%{name}

And this part:

> %{_datadir}/bash-completion/completions/dms
> %{_datadir}/zsh/site-functions/_dms
> %{_datadir}/fish/vendor_completions.d/dms.fish

With:

%{bash_completions_dir}/dms
%{fish_completions_dir}/dms.fish
%{zsh_completions_dir}/_dms


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
https://bugzilla.redhat.com/show_bug.cgi?id=2439344

Report this comment as SPAM: 
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202439344%23c2

-- 
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to