- 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, OBS-URL: https://build.opensuse.org/request/show/78636 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libyajl?expand=0&rev=13
183 lines
5.0 KiB
RPMSpec
183 lines
5.0 KiB
RPMSpec
#
|
|
# spec file for package libyajl
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products 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/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: libyajl
|
|
Version: 2.0.1
|
|
Release: 0
|
|
#
|
|
# NB, upstream does not provide pre-built tar.gz downloads. Instead
|
|
# they make you use the 'on the fly' generated tar.gz from GITHub's
|
|
# web interface
|
|
#
|
|
# The Source for any version is obtained by a URL
|
|
#
|
|
# http://github.com/lloyd/yajl/tarball/1.0.7
|
|
#
|
|
# Which causes a download of a archive named after
|
|
# the GIT hash corresponding to the version tag
|
|
#
|
|
# eg lloyd-yajl-45a1bdb.tar.gz
|
|
#
|
|
# NB even though the tar.gz is generated on the fly by GITHub it
|
|
# will always have identical md5sum
|
|
#
|
|
# So for new versions, update 'githash' to match the hash of the
|
|
# GIT tag associated with updated 'Version:' field just above
|
|
%global githash f4b2b1a
|
|
|
|
%define soname 1
|
|
Summary: Yet Another JSON Library
|
|
# http://download.github.com/lloyd-yajl-%{version}-0-g%{githash}.tar.gz
|
|
Source: lloyd-yajl-%{version}-0-g%{githash}.tar.gz
|
|
Source1: baselibs.conf
|
|
Source2: json_reformat.1
|
|
Source3: json_verify.1
|
|
Patch1: libyajl-optflags.patch
|
|
Patch2: libyajl-lib_suffix.patch
|
|
Source99: %{name}-rpmlintrc
|
|
Url: http://lloyd.github.com/yajl/
|
|
Group: System/Libraries
|
|
License: ISC
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: bison flex
|
|
BuildRequires: cmake
|
|
BuildRequires: gcc-c++ libstdc++-devel
|
|
BuildRequires: glibc-devel make
|
|
|
|
%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 "lloyd-yajl-%{githash}"
|
|
%patch1
|
|
%patch2
|
|
|
|
%build
|
|
LIBSUFFIX=$(echo "%{_lib}" | %__sed 's|^lib||')
|
|
%__mkdir build
|
|
pushd build
|
|
OPTFLAGS="%{optflags}" \
|
|
cmake \
|
|
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
|
|
-DCMAKE_INSTALL_PREFIX:PATH="%{_prefix}" \
|
|
-DLIB_INSTALL_DIR="%{_libdir}" \
|
|
-DCMAKE_SKIP_RPATH=TRUE \
|
|
-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
|
|
-DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
|
|
-DCMAKE_BUILD_TYPE=release \
|
|
-DCMAKE_STRIP="/usr/bin/touch" \
|
|
-DLIB_SUFFIX="$LIBSUFFIX" \
|
|
..
|
|
|
|
%__make %{?_smp_flags}
|
|
popd build
|
|
|
|
%install
|
|
pushd build
|
|
%makeinstall
|
|
popd build
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_mandir}/man1
|
|
install -m644 %SOURCE2 %SOURCE3 $RPM_BUILD_ROOT/%{_mandir}/man1
|
|
|
|
%check
|
|
cd test
|
|
./run_tests.sh
|
|
|
|
%post -n %{name}%{soname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{name}%{soname} -p /sbin/ldconfig
|
|
|
|
%clean
|
|
%{?buildroot:%__rm -rf "%{buildroot}"}
|
|
|
|
%files -n %{name}%{soname}
|
|
%defattr(-,root,root)
|
|
%doc COPYING README TODO
|
|
%{_libdir}/libyajl.so.%{soname}
|
|
%{_libdir}/libyajl.so.%{soname}.*
|
|
|
|
%files -n %{name}-devel
|
|
%defattr(-,root,root)
|
|
%{_includedir}/yajl
|
|
%{_libdir}/libyajl.so
|
|
|
|
%files -n %{name}-devel-static
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libyajl_s.a
|
|
|
|
%files -n yajl
|
|
%defattr(-,root,root)
|
|
%doc %{_mandir}/man1/json_reformat.1*
|
|
%doc %{_mandir}/man1/json_verify.1*
|
|
%{_bindir}/json_reformat
|
|
%{_bindir}/json_verify
|
|
|
|
%changelog
|