Files
gojq/gojq.spec
Arnav Singh 2e7fc97100 - Update to v0.12.18
* Implement `trimstr/1`, `toboolean/0` function
  * Fix `last/1` to be included in builtins/0
  * Fix `--indent 0` to preserve newlines
  * Fix string repetition to emit error when the result is too large
  * Increase the array index limit to 536870912 (`2^29`)
  * Stop numeric normalization for concurrent execution
  * Support binding expressions with binary operators (`1 + 2 as $x | -$x`)
  * Improve `gojq.NewIter` to be a generic function
  * Improve logic for getting file contents on JSON parse error
  * Improve JSON parsing to preserve the precision of floating-point numbers
  * Improve YAML parsing performance and preserve the precision of large integers
  * Improve performance and reduce memory allocation of long-running queries

OBS-URL: https://build.opensuse.org/package/show/utilities/gojq?expand=0&rev=18
2025-12-02 02:00:19 +00:00

62 lines
1.6 KiB
RPMSpec

#
# spec file for package gojq
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: gojq
Version: 0.12.18
Release: 0
Summary: Pure Go implementation of jq
License: MIT
URL: https://github.com/itchyny/gojq
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.zst
Source2: gojq.rpmlintrc
BuildRequires: go >= 1.21
BuildRequires: golang-packaging
BuildRequires: zstd
%description
Pure Go implementation of jq.
%prep
%autosetup -p1 -a1
%build
%ifarch ppc64
BUILDMODE=''
%else
BUILDMODE='-buildmode=pie'
%endif
go build -a -v -x -mod=vendor $BUILDMODE ./cmd/gojq
%install
install -D -m0755 %{name} %{buildroot}%{_bindir}/%{name}
install -D -m0644 _%{name} %{buildroot}%{_datadir}/zsh/site-functions/_%{name}
%check
%gotest ./...
%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_%{name}
%changelog