yq/yq.spec
Jean-Philippe Pialasse f857693cdc * Thu Feb 13 2025 Jean-Philippe Pialasse <jpp@koozali.org> 4.43.1-6.sme
- first SME 11 import
- update spec to build in koji
- add bash completion
- build debugsource
2025-02-13 02:07:32 -05:00

75 lines
2.6 KiB
RPMSpec

%bcond_with check
%global golicenses LICENSE
%global godocs examples CODE_OF_CONDUCT.md how-it-works.md project-\\\
words.txt release_instructions.txt CONTRIBUTING.md\\\
README.md release_notes.txt
Name: yq
Version: 4.43.1
Release: 6%{dist}
Summary: Yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor
License: MIT
URL: https://github.com/mikefarah/yq
Source0: https://github.com/mikefarah/yq/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.gz
Patch1: https://github.com/mikefarah/yq/commit/6908161f1fb6713db8259909c606109770fe7673.patch#/yq-go1_24-replace_error_creation.diff
BuildRequires: go-srpm-macros, golang
%description
A lightweight and portable command-line YAML processor. yq uses jq like syntax
but works with yaml files as well as json. It doesn't yet support everything
jq does - but it does support the most common operations and functions, and more
is being added continuously.
%prep
%setup -qa1
%build
go build -buildmode=pie -mod=vendor -o bin/%{name} -ldflags=-compressdwarf=false
%install
install -m 0755 -vd %{buildroot}%{_bindir}
install -D -m 0755 ./bin/%{name} "%{buildroot}/%{_bindir}/%{name}"
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
%{buildroot}/%{_bindir}/%{name} shell-completion bash > %{buildroot}%{_datadir}/bash-completion/completions/%{name}
%if %{with check}
%check
%gocheck
%endif
%files
%license LICENSE
%doc examples CODE_OF_CONDUCT.md how-it-works.md project-words.txt
%doc release_instructions.txt CONTRIBUTING.md README.md release_notes.txt
%{_bindir}/yq
%{_datadir}/bash-completion/completions/%{name}
%changelog
* Thu Feb 13 2025 Jean-Philippe Pialasse <jpp@koozali.org> 4.43.1-6.sme
- first SME 11 import
- update spec to build in koji
- add bash completion
- build debugsource
* Sun Jan 26 2025 Michel Lind <salimma@fedoraproject.org> - 4.43.1-5
- Fix building with Go 1.24; Resolves: RHBZ#2341595
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.43.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.43.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Apr 23 2024 Michel Lind <salimma@fedoraproject.org> - 4.43.1-2
- Fix goipath and remove gopkg, thanks mikelo2
* Tue Apr 23 2024 Michel Lind <salimma@fedoraproject.org> - 4.43.1-1
- Initial package (rhbz#2276522)
## END: Generated by rpmautospec