Blob Blame History Raw
Name:           cppformat
Version:        2.0.0
Release:        1%{?dist}
Summary:        Small, safe and fast formatting library for C++

License:        BSD
URL:            https://github.com/cppformat/cppformat
Source0:        https://github.com/cppformat/cppformat/releases/download/%{version}/%{name}-%{version}.zip

BuildRequires:  cmake

%description
C++ Format is an open-source formatting library for C++. It can be used as a
safe alternative to printf or as a fast alternative to IOStreams.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    devel
This package contains the header file for using %{name}.

%package        doc
Summary:        Documentation files for %{name}
License:        Python
BuildArch:      noarch

%description    doc
This package contains documentation for developer documentation for %{name}.

%prep
%setup -q

%build
cmakeopts="-DFMT_LIB_DIR=%{_lib}"
# NOTE: Specifying CMAKE_SKIP_RPATH=OFF is so it will link properly on RHEL 6
# See https://bugzilla.redhat.com/show_bug.cgi?id=640672
%if 0%{?rhel}%{?fedora} == 6
cmakeopts="$cmakeopts -DCMAKE_SKIP_RPATH=OFF"
%endif
%cmake $cmakeopts .
make %{?_smp_mflags} all

%install
make install DESTDIR=%{buildroot}

%check
make test

%files
%{_libdir}/libcppformat.so.*
%{!?_licensedir:%global license %%doc}
%license LICENSE.rst

%files devel
%{_includedir}/cppformat/format.h
%{_libdir}/libcppformat.so

%files doc
%doc doc/html/
%license doc/python-license.txt

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%changelog
* Tue Dec 01 2015 Dave Johansen <davejohansen@gmail.com> - 2.0.0-1
- Update to 2.0.0 (#1287332)

* Thu Sep 10 2015 Dave Johansen <davejohansen@gmail.com> - 1.1.0-2
- Fixes for tests on non-x86

* Tue Apr 28 2015 Dave Johansen <davejohansen@gmail.com> - 1.1.0-1
- Initial RPM release