]> git.pld-linux.org Git - packages/jq.git/blob - jq.spec
- release 5 (by relup.sh)
[packages/jq.git] / jq.spec
1 #
2 # Conditional build:
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)
6
7 %ifnarch %{ix86} %{x8664}
8 # valgrind required
9 %undefine       with_tests
10 %endif
11
12 Summary:        Command-line JSON processor
13 Summary(pl.UTF-8):      Procesor JSON działający z linii poleceń
14 Name:           jq
15 Version:        1.5
16 Release:        5
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
22 Patch0:         static.patch
23 URL:            https://stedolan.github.io/jq/
24 BuildRequires:  autoconf >= 2.64
25 BuildRequires:  automake >= 1:1.11.2
26 BuildRequires:  bison >= 3
27 BuildRequires:  flex
28 BuildRequires:  libtool >= 2:2
29 BuildRequires:  oniguruma-devel
30 %if %{with tests_valgrind}
31 BuildRequires:  valgrind
32 %endif
33 Requires:       %{name}-libs = %{version}-%{release}
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 lightweight and flexible command-line JSON processor.
38
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.
42
43 It is written in portable C, and it has zero runtime dependencies.
44
45 %description -l pl.UTF-8
46 Lekki i elastyczny procesor JSON działający z linii poleceń.
47
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.
52
53 Jest napisany w przenośnym C i nie ma dodatkowych zależności.
54
55 %package libs
56 Summary:        Shared jq library
57 Summary(pl.UTF-8):      Biblioteka współdzielona jq
58 Group:          Libraries
59
60 %description libs
61 Shared jq library.
62
63 %description libs -l pl.UTF-8
64 Biblioteka współdzielona jq.
65
66 %package devel
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}
71
72 %description devel
73 Header files for jq library.
74
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe biblioteki jq.
77
78 %package static
79 Summary:        Static jq library
80 Summary(pl.UTF-8):      Statyczna biblioteka jq
81 Group:          Development/Libraries
82 Requires:       %{name}-devel = %{version}-%{release}
83
84 %description static
85 Static jq library.
86
87 %description static -l pl.UTF-8
88 Statyczna biblioteka jq.
89
90 %prep
91 %setup -q
92 %patch0 -p1
93
94 %build
95 %{__libtoolize}
96 %{__aclocal} -I config/m4
97 %{__autoconf}
98 %{__automake}
99 %configure \
100         --disable-docs \
101         %{!?with_static_libs:--disable-static} \
102         --disable-all-static \
103         --disable-silent-rules \
104         %{!?with_tests_valgrind:--disable-valgrind}
105
106 echo -e '#!/bin/sh\necho "'%{version}'"' > scripts/version
107
108 %{__make}
109
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:
114 #
115 # # yum install rake rubygem-ronn
116 # $ cd docs/
117 # $ curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3
118 # $ source $HOME/.rvm/scripts/rvm
119 # $ bundle install
120 # $ cd ..
121 # $ ./configure
122 # $ make real_docs
123
124 %if %{with tests}
125 %{__make} check
126 %endif
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130 %{__make} install \
131         DESTDIR=$RPM_BUILD_ROOT
132
133 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
134 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libjq.la
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %post   libs -p /sbin/ldconfig
140 %postun libs -p /sbin/ldconfig
141
142 %files
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*
147
148 %files libs
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_libdir}/libjq.so.*.*.*
151 %attr(755,root,root) %ghost %{_libdir}/libjq.so.1
152
153 %files devel
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_libdir}/libjq.so
156 %{_includedir}/jq.h
157 %{_includedir}/jv.h
158
159 %if %{with static_libs}
160 %files static
161 %defattr(644,root,root,755)
162 %{_libdir}/libjq.a
163 %endif
This page took 0.080431 seconds and 3 git commands to generate.