3 %bcond_without static_libs # static library
4 %bcond_without tests # check target
5 %bcond_with tests_valgrind # use valgrind for tests (suspectible to glibc false positives)
7 %ifnarch %{ix86} %{x8664}
12 Summary: Command-line JSON processor
13 Summary(pl.UTF-8): Procesor JSON działający z linii poleceń
17 License: MIT, Apache, CC-BY, GPL v3
18 Group: Applications/Text
19 #Source0Download: https://github.com/jqlang/jq/releases
20 Source0: https://github.com/jqlang/jq/releases/download/%{name}-%{version}/jq-%{version}.tar.gz
21 # Source0-md5: 974a340105ecb43add8c55601525f9fc
23 Patch1: tests-no-pty.patch
24 URL: https://jqlang.github.io/jq/
25 BuildRequires: autoconf >= 2.65
26 BuildRequires: automake >= 1:1.11.2
27 BuildRequires: bison >= 3
29 BuildRequires: libtool >= 2:2
30 BuildRequires: oniguruma-devel
31 %if %{with tests_valgrind}
32 BuildRequires: valgrind
34 Requires: %{name}-libs = %{version}-%{release}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 lightweight and flexible command-line JSON processor.
40 jq is like sed for JSON data - you can use it to slice and filter and
41 map and transform structured data with the same ease that sed, awk,
42 grep and friends let you play with text.
44 It is written in portable C, and it has zero runtime dependencies.
46 %description -l pl.UTF-8
47 Lekki i elastyczny procesor JSON działający z linii poleceń.
49 jq jest odpowiednikiem seda dla danych JSON - można go używać do
50 podziału, filtrowania, odwzorowywania i przekształceń danych
51 strukturalnych tak samo łatwo, jak programy sed, awk, grep i podobne
52 pozwalają bawić się tekstem.
54 Jest napisany w przenośnym C i nie ma dodatkowych zależności.
57 Summary: Shared jq library
58 Summary(pl.UTF-8): Biblioteka współdzielona jq
64 %description libs -l pl.UTF-8
65 Biblioteka współdzielona jq.
68 Summary: Header files for jq library
69 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki jq
70 Group: Development/Libraries
71 Requires: %{name}-libs = %{version}-%{release}
74 Header files for jq library.
76 %description devel -l pl.UTF-8
77 Pliki nagłówkowe biblioteki jq.
80 Summary: Static jq library
81 Summary(pl.UTF-8): Statyczna biblioteka jq
82 Group: Development/Libraries
83 Requires: %{name}-devel = %{version}-%{release}
88 %description static -l pl.UTF-8
89 Statyczna biblioteka jq.
98 %{__aclocal} -I m4 -I config/m4
103 %{!?with_static_libs:--disable-static} \
104 --disable-all-static \
105 --disable-silent-rules \
106 %{!?with_tests_valgrind:--disable-valgrind}
108 echo -e '#!/bin/sh\necho "'%{version}'"' > scripts/version
112 # Docs already shipped in jq's tarball.
113 # In order to build the manual page, it
114 # is necessary to install rake, rubygem-ronn, bonsai
115 # and do the following steps:
117 # # yum install rake rubygem-ronn
119 # $ curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3
120 # $ source $HOME/.rvm/scripts/rvm
131 rm -rf $RPM_BUILD_ROOT
133 DESTDIR=$RPM_BUILD_ROOT
135 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
136 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libjq.la
139 rm -rf $RPM_BUILD_ROOT
141 %post libs -p /sbin/ldconfig
142 %postun libs -p /sbin/ldconfig
145 %defattr(644,root,root,755)
146 %doc AUTHORS COPYING NEWS.md README.md
147 %attr(755,root,root) %{_bindir}/jq
148 %{_mandir}/man1/jq.1*
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/libjq.so.*.*.*
153 %attr(755,root,root) %ghost %{_libdir}/libjq.so.1
156 %defattr(644,root,root,755)
157 %attr(755,root,root) %{_libdir}/libjq.so
160 %{_pkgconfigdir}/libjq.pc
162 %if %{with static_libs}
164 %defattr(644,root,root,755)