Name:           msgpack
Version:        3.2.0
Release:        1%{?_dist_release}
Summary:        Binary-based efficient object serialization library
Group:          System Environment/Libraries

Vendor:         Project Vine
Distribution:   Vine Linux
Packager:       iwaim

License:        Boost Software License 1.0
URL:            https://msgpack.org/
Source0:        https://github.com/msgpack/msgpack-c/releases/download/cpp-3.2.0/msgpack-3.2.0.tar.gz#/%{name}-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  cmake >= 2.8.6
BuildRequires:  zlib-devel
BuildRequires:  libboost-devel
BuildRequires:  libboost-timer
# for %%check
BuildRequires:  gtest-devel

%description
MessagePack is a binary-based efficient object serialization
library. It enables to exchange structured objects between many
languages like JSON. But unlike JSON, it is very fast and small.


%package devel
Summary:	Libraries and header files for %{name}
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description devel
Libraries and header files for %{name}


%prep
%setup -q


%build
%__cmake \
        -DCMAKE_VERBOSE_MAKEFILE=ON \
        -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
        -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \
        -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \
        -DLIB_INSTALL_DIR:PATH=%{_libdir} \
        -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \
        -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \
        -DMSGPACK_BOOST=ON \
        -DBoost_USE_STATIC_LIBS=OFF \
.
make %{?_smp_mflags}


%check
make test


%install
make install DESTDIR=%{buildroot}
find %{buildroot} -name '*.la' -exec rm -f '{}' ';'

rm -f %{buildroot}%{_libdir}/libmsgpackc.a

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%license COPYING LICENSE*
%doc AUTHORS CHANGELOG.md NOTICE README.md
%{_libdir}/*.so.*

%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/msgpack.pc
%{_libdir}/cmake/*

%changelog
* Tue Oct 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.0-1
- new upstream release.

* Sat Feb 25 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 2.2.1-1
- update to 2.2.1
- update License tag
- update BuildRequires
 - using cmake
 - using libboost

* Fri Sep 02 2016 Toshiaki Ara <ara_t@384.jp> 0.5.8-2
- rebuild with gcc-5.4.0

* Tue Dec 31 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 0.5.8-1
- update to 0.5.8
- drop gtest patch: upstream fixed
- add pkgconfig file in msgpack-devel package

* Fri Feb  1 2013 IWAI, Masaharu <iwai@alib.jp> 0.5.7-1
- initial build for Vine Linux

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Wed Feb 15 2012 Daiki Ueno <dueno@redhat.com> - 0.5.7-1
- initial packaging for Fedora

