]> git.pld-linux.org Git - packages/jq.git/blob - jq.spec
run libtool first
[packages/jq.git] / jq.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %ifnarch %{ix86} %{x8664}
6 %undefine       with_tests
7 %endif
8
9 Summary:        Command-line JSON processor
10 Name:           jq
11 Version:        1.5
12 Release:        1
13 License:        MIT and ASL 2.0 and CC-BY and GPLv3
14 Group:          Applications/Text
15 Source0:        https://github.com/stedolan/jq/releases/download/%{name}-%{version}/jq-%{version}.tar.gz
16 # Source0-md5:  0933532b086bd8b6a41c1b162b1731f9
17 Patch0:         static.patch
18 URL:            https://stedolan.github.io/jq/
19 BuildRequires:  autoconf
20 BuildRequires:  automake
21 BuildRequires:  bison
22 BuildRequires:  flex
23 BuildRequires:  libtool
24 BuildRequires:  oniguruma-devel
25 %if %{with tests}
26 BuildRequires:  valgrind
27 %endif
28 Requires:       %{name}-libs = %{version}-%{release}
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 lightweight and flexible command-line JSON processor
33
34 jq is like sed for JSON data - you can use it to slice and filter and
35 map and transform structured data with the same ease that sed, awk,
36 grep and friends let you play with text.
37
38 It is written in portable C, and it has zero runtime dependencies.
39
40 jq can mangle the data format that you have into the one that you want
41 with very little effort, and the program to do so is often shorter and
42 simpler than you'd expect.
43
44 %package libs
45 Summary:        Shared libraries for jq
46 Group:          Libraries
47
48 %description libs
49 Shared libraries for jq.
50
51 %package devel
52 Summary:        Development files for %{name}
53 Requires:       %{name}-libs = %{version}-%{release}
54
55 %description devel
56 Development files for %{name}
57
58 %prep
59 %setup -q
60 %patch0 -p1
61
62 %build
63 %{__libtoolize}
64 %{__aclocal} -I config/m4
65 %{__autoconf}
66 %{__automake}
67 %configure \
68         --disable-static \
69         --disable-all-static \
70         --disable-silent-rules
71
72 %{__make}
73
74 # Docs already shipped in jq's tarball.
75 # In order to build the manual page, it
76 # is necessary to install rake, rubygem-ronn
77 # and do the following steps:
78 #
79 # # yum install rake rubygem-ronn
80 # $ cd docs/
81 # $ curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3
82 # $ source $HOME/.rvm/scripts/rvm
83 # $ bundle install
84 # $ cd ..
85 # $ ./configure
86 # $ make real_docs
87
88 %if %{with tests}
89 %{__make} check
90 %endif
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94 %{__make} install \
95         DESTDIR=$RPM_BUILD_ROOT
96
97 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
98 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libjq.la
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post   libs -p /sbin/ldconfig
104 %postun libs -p /sbin/ldconfig
105
106 %files
107 %defattr(644,root,root,755)
108 %doc README README.md AUTHORS COPYING
109 %attr(755,root,root) %{_bindir}/jq
110 %{_mandir}/man1/jq.1*
111
112 %files libs
113 %defattr(644,root,root,755)
114 %attr(755,root,root) %{_libdir}/libjq.so.*.*.*
115 %ghost %{_libdir}/libjq.so.1
116
117 %files devel
118 %defattr(644,root,root,755)
119 %{_includedir}/jq.h
120 %{_includedir}/jv.h
121 %{_libdir}/libjq.so
This page took 0.068913 seconds and 4 git commands to generate.