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/stedolan/jq/releases
20 Source0: https://github.com/stedolan/jq/releases/download/%{name}-%{version}/jq-%{version}.tar.gz
21 # Source0-md5: 0933532b086bd8b6a41c1b162b1731f9
23 URL: https://stedolan.github.io/jq/
24 BuildRequires: autoconf >= 2.64
25 BuildRequires: automake >= 1:1.11.2
26 BuildRequires: bison >= 3
28 BuildRequires: libtool >= 2:2
29 BuildRequires: oniguruma-devel
30 %if %{with tests_valgrind}
31 BuildRequires: valgrind
33 Requires: %{name}-libs = %{version}-%{release}
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 lightweight and flexible command-line JSON processor.
39 jq is like sed for JSON data - you can use it to slice and filter and
40 map and transform structured data with the same ease that sed, awk,
41 grep and friends let you play with text.
43 It is written in portable C, and it has zero runtime dependencies.
45 %description -l pl.UTF-8
46 Lekki i elastyczny procesor JSON działający z linii poleceń.
48 jq jest odpowiednikiem seda dla danych JSON - można go używać do
49 podziału, filtrowania, odwzorowywania i przekształceń danych
50 strukturalnych tak samo łatwo, jak programy sed, awk, grep i podobne
51 pozwalają bawić się tekstem.
53 Jest napisany w przenośnym C i nie ma dodatkowych zależności.
56 Summary: Shared jq library
57 Summary(pl.UTF-8): Biblioteka współdzielona jq
63 %description libs -l pl.UTF-8
64 Biblioteka współdzielona jq.
67 Summary: Header files for jq library
68 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki jq
69 Group: Development/Libraries
70 Requires: %{name}-libs = %{version}-%{release}
73 Header files for jq library.
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe biblioteki jq.
79 Summary: Static jq library
80 Summary(pl.UTF-8): Statyczna biblioteka jq
81 Group: Development/Libraries
82 Requires: %{name}-devel = %{version}-%{release}
87 %description static -l pl.UTF-8
88 Statyczna biblioteka jq.
96 %{__aclocal} -I config/m4
101 %{!?with_static_libs:--disable-static} \
102 --disable-all-static \
103 --disable-silent-rules \
104 %{!?with_tests_valgrind:--disable-valgrind}
106 echo -e '#!/bin/sh\necho "'%{version}'"' > scripts/version
110 # Docs already shipped in jq's tarball.
111 # In order to build the manual page, it
112 # is necessary to install rake, rubygem-ronn, bonsai
113 # and do the following steps:
115 # # yum install rake rubygem-ronn
117 # $ curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3
118 # $ source $HOME/.rvm/scripts/rvm
129 rm -rf $RPM_BUILD_ROOT
131 DESTDIR=$RPM_BUILD_ROOT
133 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
134 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libjq.la
137 rm -rf $RPM_BUILD_ROOT
139 %post libs -p /sbin/ldconfig
140 %postun libs -p /sbin/ldconfig
143 %defattr(644,root,root,755)
144 %doc README README.md AUTHORS COPYING
145 %attr(755,root,root) %{_bindir}/jq
146 %{_mandir}/man1/jq.1*
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_libdir}/libjq.so.*.*.*
151 %attr(755,root,root) %ghost %{_libdir}/libjq.so.1
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_libdir}/libjq.so
159 %if %{with static_libs}
161 %defattr(644,root,root,755)