# # spec file for package libyajl # # Copyright (c) 2022-2023 ZhuningOS # %define soname 2 Name: libyajl Version: 2.1.0 Release: 150000.4.6.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 Patch4: libyajl-CVE-2023-33460.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 %patch4 -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