2011-04-11 08:02:19 +00:00
|
|
|
#
|
|
|
|
# spec file for package libyajl
|
|
|
|
#
|
2012-01-29 21:47:57 +00:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-04-11 08:02:19 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2011-06-02 14:23:27 +00:00
|
|
|
Name: libyajl
|
2011-08-12 11:11:28 +00:00
|
|
|
Version: 2.0.1
|
2012-01-29 21:47:57 +00:00
|
|
|
Release: 0
|
2011-04-13 22:38:19 +00:00
|
|
|
#
|
|
|
|
# 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
|
2011-08-12 11:11:28 +00:00
|
|
|
%global githash f4b2b1a
|
2011-04-11 08:02:19 +00:00
|
|
|
|
2011-08-12 13:55:07 +00:00
|
|
|
%define soname 2
|
2011-06-02 14:23:27 +00:00
|
|
|
Summary: Yet Another JSON Library
|
2012-01-29 21:47:57 +00:00
|
|
|
License: ISC
|
|
|
|
Group: System/Libraries
|
2011-04-13 22:38:19 +00:00
|
|
|
# http://download.github.com/lloyd-yajl-%{version}-0-g%{githash}.tar.gz
|
2011-08-12 11:11:28 +00:00
|
|
|
Source: lloyd-yajl-%{version}-0-g%{githash}.tar.gz
|
2011-06-02 14:23:27 +00:00
|
|
|
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/
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-01-29 21:47:57 +00:00
|
|
|
BuildRequires: bison
|
2011-06-02 14:23:27 +00:00
|
|
|
BuildRequires: cmake
|
2012-01-29 21:47:57 +00:00
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: libstdc++-devel
|
|
|
|
BuildRequires: make
|
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-06-02 14:23:27 +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-06-02 14:23:27 +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-06-02 14:23:27 +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-08-15 08:40:49 +00:00
|
|
|
|
2011-06-02 14:23:27 +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
|
2011-04-13 22:38:19 +00:00
|
|
|
%setup -q -n "lloyd-yajl-%{githash}"
|
2011-01-16 03:43:02 +00:00
|
|
|
%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" \
|
|
|
|
..
|
|
|
|
|
2011-06-13 07:20:43 +00:00
|
|
|
%__make %{?_smp_flags}
|
2011-01-16 03:43:02 +00:00
|
|
|
popd build
|
|
|
|
|
|
|
|
%install
|
|
|
|
pushd build
|
|
|
|
%makeinstall
|
|
|
|
popd build
|
2011-06-02 14:23:03 +00:00
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_mandir}/man1
|
|
|
|
install -m644 %SOURCE2 %SOURCE3 $RPM_BUILD_ROOT/%{_mandir}/man1
|
2011-01-16 03:43:02 +00:00
|
|
|
|
|
|
|
%check
|
2011-04-13 22:38:19 +00:00
|
|
|
cd test
|
|
|
|
./run_tests.sh
|
2011-01-16 03:43:02 +00:00
|
|
|
|
|
|
|
%post -n %{name}%{soname} -p /sbin/ldconfig
|
2011-06-02 14:23:27 +00:00
|
|
|
|
2011-01-16 03:43:02 +00:00
|
|
|
%postun -n %{name}%{soname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%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)
|
2011-06-02 14:23:03 +00:00
|
|
|
%doc %{_mandir}/man1/json_reformat.1*
|
|
|
|
%doc %{_mandir}/man1/json_verify.1*
|
2011-01-16 03:43:02 +00:00
|
|
|
%{_bindir}/json_reformat
|
|
|
|
%{_bindir}/json_verify
|
2011-06-13 07:20:43 +00:00
|
|
|
|
2011-06-02 14:23:27 +00:00
|
|
|
%changelog
|