2013-10-01 19:06:13 +02:00
|
|
|
|
#
|
|
|
|
|
# spec file for package jq
|
|
|
|
|
#
|
2023-09-18 12:37:22 +02:00
|
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2013-10-01 19:06:13 +02:00
|
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2022-10-06 12:14:02 +02:00
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-10-01 19:06:13 +02:00
|
|
|
|
#
|
|
|
|
|
|
2014-06-15 23:14:53 +02:00
|
|
|
|
|
2023-09-27 09:38:36 +02:00
|
|
|
|
%define jq_sover 1
|
2013-10-01 19:06:13 +02:00
|
|
|
|
Name: jq
|
2023-09-18 12:37:22 +02:00
|
|
|
|
Version: 1.7
|
2014-06-15 23:14:53 +02:00
|
|
|
|
Release: 0
|
2013-10-01 19:06:13 +02:00
|
|
|
|
Summary: A lightweight and flexible command-line JSON processor
|
2022-10-06 12:14:02 +02:00
|
|
|
|
License: CC-BY-3.0 AND MIT
|
2014-06-15 23:14:53 +02:00
|
|
|
|
Group: Productivity/Text/Utilities
|
2023-09-18 12:37:22 +02:00
|
|
|
|
URL: https://github.com/jqlang
|
2023-09-27 09:38:36 +02:00
|
|
|
|
Source: https://github.com/jqlang/jq/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
|
2014-06-27 13:08:04 +02:00
|
|
|
|
BuildRequires: chrpath
|
2023-09-27 09:38:36 +02:00
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
|
BuildRequires: pkgconfig(oniguruma)
|
|
|
|
|
# https://github.com/stedolan/jq/issues/1904
|
|
|
|
|
Requires: libjq%{jq_sover} = %{version}
|
2023-11-15 16:16:19 +01:00
|
|
|
|
%ifarch aarch64 x86_64 ppc64le s390x
|
2017-01-03 00:10:44 +01:00
|
|
|
|
BuildRequires: valgrind
|
2022-10-06 12:14:02 +02:00
|
|
|
|
%endif
|
2013-10-01 19:06:13 +02:00
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
A lightweight and flexible command-line JSON processor. jq is like sed for
|
|
|
|
|
JSON data – you can use it to slice and filter and map and transform
|
2014-06-15 23:14:53 +02:00
|
|
|
|
structured data with the same ease that sed, awk, grep and friends let
|
2013-10-01 19:06:13 +02:00
|
|
|
|
you play with text.
|
|
|
|
|
|
2023-09-27 09:38:36 +02:00
|
|
|
|
%package -n libjq%{jq_sover}
|
2014-06-15 23:14:53 +02:00
|
|
|
|
Summary: Library for a lightweight and flexible command-line JSON processor
|
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
2023-09-27 09:38:36 +02:00
|
|
|
|
%description -n libjq%{jq_sover}
|
2014-06-15 23:14:53 +02:00
|
|
|
|
Library for a lightweight and flexible command-line JSON processor.
|
|
|
|
|
|
|
|
|
|
%package -n libjq-devel
|
|
|
|
|
Summary: Development files for jq
|
|
|
|
|
Group: Development/Languages/C and C++
|
2023-09-27 09:38:36 +02:00
|
|
|
|
Requires: libjq%{jq_sover} = %{version}
|
2014-06-15 23:14:53 +02:00
|
|
|
|
|
|
|
|
|
%description -n libjq-devel
|
|
|
|
|
Development files (headers and libraries for jq).
|
|
|
|
|
|
2013-10-01 19:06:13 +02:00
|
|
|
|
%prep
|
2023-09-27 09:38:36 +02:00
|
|
|
|
%autosetup -p1
|
2013-10-01 19:06:13 +02:00
|
|
|
|
|
|
|
|
|
%build
|
2016-07-16 20:11:18 +02:00
|
|
|
|
%configure \
|
|
|
|
|
--disable-static \
|
2023-11-15 16:16:19 +01:00
|
|
|
|
%ifarch aarch64 x86_64 ppc64le s390x
|
|
|
|
|
--enable-valgrind \
|
|
|
|
|
%else
|
2022-10-06 12:14:02 +02:00
|
|
|
|
--disable-valgrind \
|
|
|
|
|
%endif
|
2023-09-27 09:38:36 +02:00
|
|
|
|
%{nil}
|
2023-09-18 12:37:22 +02:00
|
|
|
|
%make_build
|
2013-10-01 19:06:13 +02:00
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%make_install
|
|
|
|
|
|
2014-06-27 13:08:04 +02:00
|
|
|
|
# RPATH contains the builddir yucks!
|
|
|
|
|
chrpath -d %{buildroot}%{_bindir}/jq
|
|
|
|
|
|
|
|
|
|
# No static stuff
|
|
|
|
|
rm %{buildroot}%{_libdir}/libjq.la
|
|
|
|
|
|
2013-10-01 19:06:13 +02:00
|
|
|
|
# we install the documentation in a separate location using the doc macro
|
2014-06-15 23:14:53 +02:00
|
|
|
|
rm -rf %{buildroot}%{_datadir}/doc/%{name}
|
|
|
|
|
|
2016-07-16 20:11:18 +02:00
|
|
|
|
%check
|
2017-01-03 00:10:44 +01:00
|
|
|
|
%if "%{qemu_user_space_build}" == "0"
|
2023-09-18 12:37:22 +02:00
|
|
|
|
%make_build check
|
2017-01-03 00:10:44 +01:00
|
|
|
|
%endif
|
2014-06-15 23:14:53 +02:00
|
|
|
|
|
2023-09-27 09:38:36 +02:00
|
|
|
|
%ldconfig_scriptlets -n libjq%{jq_sover}
|
2013-10-01 19:06:13 +02:00
|
|
|
|
|
|
|
|
|
%files
|
2018-11-03 09:58:11 +01:00
|
|
|
|
%license COPYING
|
2023-09-18 12:37:22 +02:00
|
|
|
|
%doc AUTHORS ChangeLog NEWS.md README.md
|
2013-10-01 19:06:13 +02:00
|
|
|
|
%{_bindir}/%{name}
|
2018-11-03 09:58:11 +01:00
|
|
|
|
%{_mandir}/man1/%{name}.1%{?ext_man}
|
2013-10-01 19:06:13 +02:00
|
|
|
|
|
2023-09-27 09:38:36 +02:00
|
|
|
|
%files -n libjq%{jq_sover}
|
|
|
|
|
%license COPYING
|
|
|
|
|
%{_libdir}/libjq.so.%{jq_sover}*
|
2014-06-15 23:14:53 +02:00
|
|
|
|
|
|
|
|
|
%files -n libjq-devel
|
2023-09-27 09:38:36 +02:00
|
|
|
|
%license COPYING
|
2014-06-15 23:14:53 +02:00
|
|
|
|
%{_includedir}/jq.h
|
|
|
|
|
%{_includedir}/jv.h
|
|
|
|
|
%{_libdir}/libjq.so
|
2023-09-18 12:37:22 +02:00
|
|
|
|
%{_libdir}/pkgconfig/libjq.pc
|
2014-06-15 23:14:53 +02:00
|
|
|
|
|
2013-10-01 19:06:13 +02:00
|
|
|
|
%changelog
|