summaryrefslogtreecommitdiff
path: root/libyajl.spec
blob: 913c447168c2030b6c36d7caeca0fa0fc4387913 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
#
# spec file for package libyajl
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define soname 2
Name:           libyajl
Version:        2.1.0
Release:        150000.4.3.1
Summary:        Yet Another JSON Library
License:        ISC
Group:          System/Libraries
Url:            http://lloyd.github.com/yajl/
Source0:        https://github.com/lloyd/yajl/archive/%{version}.tar.gz
Source1:        baselibs.conf
Source2:        json_reformat.1
Source3:        json_verify.1
Source99:       %{name}-rpmlintrc
Patch1:         libyajl-optflags.patch
Patch2:         libyajl-lib_suffix.patch
Patch3:         libyajl-CVE-2022-24795.patch
BuildRequires:  bison
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  flex
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
small validating JSON generator.

%package -n %{name}%{soname}
Summary:        Yet Another JSON Library
Group:          System/Libraries

%description -n %{name}%{soname}
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
small validating JSON generator.

%package -n %{name}-devel
Summary:        Yet Another JSON Library (Development Environment)
Group:          Development/Libraries/C and C++
Requires:       %{name}%{soname} = %{version}

%description -n %{name}-devel
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
small validating JSON generator.

This package provides the necessary environment for compiling and linking
against %{name}.

%package -n %{name}-devel-static
Summary:        Yet Another JSON Library (Static Library)
Group:          Development/Libraries/C and C++
Requires:       %{name}-devel = %{version}

%description -n %{name}-devel-static
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
small validating JSON generator.

This package provides the necessary environment for linking statically
against %{name}.

%package -n yajl
Summary:        Yet Another JSON Library Tools
Group:          Productivity/Text/Utilities
Requires:       %{name}%{soname} = %{version}

%description -n yajl
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
small validating JSON generator.

This package provides a few command-line utilities for processing JSON files.

%prep
%setup -q -n yajl-%{version}
%patch1 -p1 -b .optflags
%patch2 -p1 -b .lib_suffix
%patch3 -p1

%build
%cmake
make %{?_smp_mflags}

%install
%cmake_install
install -d -m 0755 %{buildroot}%{_mandir}/man1
install -m644 %{SOURCE2} %{SOURCE3} %{buildroot}/%{_mandir}/man1

%check
make %{?_smp_mflags} test

%post   -n %{name}%{soname} -p /sbin/ldconfig

%postun -n %{name}%{soname} -p /sbin/ldconfig

%files -n %{name}%{soname}
%defattr(-,root,root)
%license COPYING
%{_libdir}/libyajl.so.%{soname}
%{_libdir}/libyajl.so.%{soname}.*

%files -n %{name}-devel
%defattr(-,root,root)
%doc README TODO
%{_includedir}/yajl
%{_libdir}/libyajl.so
%{_datadir}/pkgconfig/yajl.pc

%files -n %{name}-devel-static
%defattr(-,root,root)
%{_libdir}/libyajl_s.a

%files -n yajl
%defattr(-,root,root)
%{_mandir}/man1/json_reformat.1*
%{_mandir}/man1/json_verify.1*
%{_bindir}/json_reformat
%{_bindir}/json_verify

%changelog
* Fri May 13 2022 jtomasiak@suse.com
- add libyajl-CVE-2022-24795.patch (CVE-2022-24795, bsc#1198405)
* Tue Mar 27 2018 kukuk@suse.de
- Use %%license instead of %%doc [bsc#1082318]
- Move other docu to -devel package where it better fits
* Sun Apr 26 2015 mpluskal@suse.com
- Use correct url for download
- Add dependency on doxygen for doc generation
- Cleanup spec file with spec-clener
* Wed Nov  5 2014 ku.b@gmx.de
- update to 2.1.0
- 2.1.0
  - @nonodename, @patperry - fixed some compiler warnings
  - @yep, @emaste - documentation improvements
  - @sgravrock - build fix for NetBSD (and whenever sh != bash)
  - @rotty, @brimstone3, @lloyd - allow client to reset generator
  - @sgravrock - remove bash dependencies
  - @lloyd - add api tests
  - @rflynn - remove ruby dependency
  - @cloderic - nmake install works on windows
  - @shahbag - build fix for qnx
  - @breese - debugging improvements
  - @lloyd - json_verify supports -s flag for stream processing
  - @lloyd - json_reformat supports -s flag for stream processing
- 2.0.4
  - @jcekstrom - additional checking in integer parsing
  - @jcekstrom - fix a bug in yajl_tree that would cause valid json integersto fail to parse
  - @plaguemorin - fix a memory leak in yajl_tree (error strings were being leaked)
  - @7AC - reset errno
  - @ConradIrwin - include flags to reformatter to allow toggling of escape solidus option
- 2.0.3
  - John Stamp generation of a pkgconfig file at build time.
  - @robzuber bugfix in yajl_tree_get()
  - @lloyd - fix for compilation on 64 bit windows
- 2.0.2
  - lth fix typos in yajl_tree.h macros YAJL_IS_INTEGER and YAJL_IS_DOUBLE,
    contributed by Artem S Vybornov.
  - lth add #ifdef __cplusplus wrappers to yajl_tree to allow proper
    usage from many populer C++ compilers.
- fix array access
* Sun Jan 29 2012 jengelh@medozas.de
- Remove redundant tags/sections per specfile guideline suggestions
* Fri Sep 16 2011 jengelh@medozas.de
- Add libyajl-devel to baselibs
* Tue Aug 16 2011 mrueckert@suse.de
- bump baselibs.conf
* Fri Aug 12 2011 mrueckert@suse.de
- update to 2.0.1
  - lth generator flag to allow client to specify they want escaped
    solidi '/'.  issue #28
  - lth crash fix when yajl_parse() is never called. issue #27
- additional changes from 2.0.0
  - lth YAJL is now ISC licensed:
    http://en.wikipedia.org/wiki/ISC_license
  - lth 20-35%% (osx and linux respectively) parsing performance
    improvement attained by tweaking string scanning (idea:
    @michaelrhanson).
  - Florian Forster & lth - yajl_tree interface introduced as a
    higher level interface to the parser (eats JSON, poops a memory
    representation)
  - lth require a C99 compiler
  - lth integers are now represented with long long (64bit+) on all
    platforms.
  - lth size_t now used throughout to represent buffer lengths, so
    you can safely manage buffers greater than 4GB.
  - gno semantic improvements to yajl's API regarding partial value
    parsing and trailing garbage
  - lth new configuration mechanism for yajl, see yajl_config() and
    yajl_gen_config()
  - gno more allocation checking in more places
  - gno remove usage of strtol, replace with custom implementation
    that cares not about your locale.
  - lth yajl_parse_complete renamed to yajl_complete_parse.
  - lth add a switch to validate utf8 strings as they are
    generated.
  - lth tests are a lot quieter in their output.
  - lth addition of a little in tree performance benchmark,
    `perftest` in perf/perftest.c
- additional changes from 1.0.12
  - Conrad Irwin - Parse null bytes correctly
  - Mirek Rusin - fix LLVM warnings
  - gno - Don't generate numbers for keys. closes #13
  - lth - various win32 fixes, including build documentation
    improvements
  - John Stamp - Don't export private symbols.
  - John Stamp - Install yajl_version.h, not the template.
  - John Stamp - Don't use -fPIC for static lib.  Cmake will
    automatically add it for the shared.
  - lth 0 fix paths embedded in dylib upon installation on osx.
    closes #11
- refreshed optflags patch
* Thu Jun  2 2011 jfehlig@novell.com
- Add man pages for json_{reformat,verify}
* Wed Apr 13 2011 jfehlig@novell.com
- Add filters to rpmlintrc
- spec file: Document githash usage in tarbal name
* Wed Apr 13 2011 jfehlig@novell.com
- Add filters to rpmlintrc
- spec file: Document githash usage in tarbal name
* Fri Apr  8 2011 coolo@novell.com
- add baselibs.conf for 32bit library support
* Wed Feb  9 2011 pascal.bleser@opensuse.org
- revert last change, it is BSD3c indeed, and totally unrelated to
  bnc#670525
* Wed Feb  9 2011 pascal.bleser@opensuse.org
- fix license, changed from erroneous BSD3c to MIT, as stated on
  http://pyyaml.org/wiki/LibYAML, sort of fixes bnc#670525
* Tue Dec 21 2010 pascal.bleser@opensuse.org
- merge yajl package from darix:
  * lib -> LIBDIR patch
  * -devel-static subpackage
* Wed Dec  1 2010 pascal.bleser@opensuse.org
- update to 1.0.11: no user-visible changes
- changes from 1.0.10:
  * yajl version number now programatically accessible
* Mon Jul 12 2010 pascal.bleser@opensuse.org
- initial package (1.0.9)