2011-04-11 08:02:11 +00:00
|
|
|
# vim: set sw=4 ts=4 et nu:
|
|
|
|
|
|
|
|
Name: libyajl
|
|
|
|
Version: 1.0.11
|
2011-01-16 03:43:02 +00:00
|
|
|
%define soname 1
|
|
|
|
%define tag f4baae0
|
2011-04-11 08:02:11 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Yet Another JSON Library
|
2011-01-16 03:43:02 +00:00
|
|
|
# http://download.github.com/lloyd-yajl-%{version}-0-g%{tag}.tar.gz
|
2011-04-11 08:02:11 +00:00
|
|
|
Source: lloyd-yajl-%{version}-0-g%{tag}.tar.bz2
|
|
|
|
Source1: baselibs.conf
|
|
|
|
Patch1: libyajl-optflags.patch
|
|
|
|
Patch2: libyajl-lib_suffix.patch
|
|
|
|
Source99: %{name}-rpmlintrc
|
|
|
|
URL: http://lloyd.github.com/yajl/
|
|
|
|
Group: System/Libraries
|
|
|
|
License: BSD3c
|
|
|
|
BuildRoot: %{_tmppath}/build-%{name}-%{version}
|
|
|
|
BuildRequires: bison flex
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: gcc-c++ libstdc++-devel
|
|
|
|
BuildRequires: make glibc-devel
|
2011-01-16 03:43:02 +00:00
|
|
|
|
|
|
|
%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}
|
2011-04-11 08:02:11 +00:00
|
|
|
Summary: Yet Another JSON Library
|
|
|
|
Group: System/Libraries
|
2011-01-16 03:43:02 +00:00
|
|
|
|
|
|
|
%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
|
2011-04-11 08:02:11 +00:00
|
|
|
Summary: Yet Another JSON Library (Development Environment)
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name}%{soname} = %{version}
|
2011-01-16 03:43:02 +00:00
|
|
|
|
|
|
|
%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
|
2011-04-11 08:02:11 +00:00
|
|
|
Summary: Yet Another JSON Library (Static Library)
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name}-devel = %{version}
|
2011-01-16 03:43:02 +00:00
|
|
|
|
|
|
|
%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
|
2011-04-11 08:02:11 +00:00
|
|
|
Summary: Yet Another JSON Library Tools
|
|
|
|
Group: Productivity/Text/Utilities
|
|
|
|
Requires: %{name}%{soname} = %{version}
|
2011-01-16 03:43:02 +00:00
|
|
|
|
|
|
|
%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-%{tag}"
|
|
|
|
%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 %{?jobs:-j%{jobs}}
|
|
|
|
popd build
|
|
|
|
|
|
|
|
%install
|
|
|
|
pushd build
|
|
|
|
%makeinstall
|
|
|
|
popd build
|
|
|
|
|
|
|
|
%check
|
|
|
|
%__make test
|
|
|
|
|
|
|
|
%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)
|
|
|
|
%{_bindir}/json_reformat
|
|
|
|
%{_bindir}/json_verify
|
2011-04-11 08:02:11 +00:00
|
|
|
|