File jerasure.spec of Package jerasure

#
# spec file for package jerasure
#
# Copyright (c) 2015 SUSE LINUX 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/
#


%define libname libJerasure2
Name:           jerasure
Version:        2.0.20141229gitff70321
Release:        0
Summary:        Forward error correction erasure channel library
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
Url:            http://jerasure.org/jerasure/jerasure
Source0:        %{name}-%{version}.tar.bz2
# NOTE: examples code produces some rpmlint errors. just skip the example build for now
Patch0:         disable-examples-build.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gf-complete-devel
BuildRequires:  libtool

%description
In information theory, an erasure code is a forward error correction (FEC)
code for the binary erasure channel, which transforms a message of symbols
into a longer message (code word) with symbols such that the original
message can be recovered from a subset of the symbols.
Jerasure is a shared library that been designed to be modular, fast and
flexible. It is used in storage systems such as Swift and Ceph to add fault
tolerance.

%package        -n %{libname}
Summary:        Forward error correction erasure channel library
Group:          Development/Libraries/C and C++

%description -n %{libname}
In information theory, an erasure code is a forward error correction (FEC)
code for the binary erasure channel, which transforms a message of symbols
into a longer message (code word) with symbols such that the original
message can be recovered from a subset of the symbols.
Jerasure is a shared library that been designed to be modular, fast and
flexible. It is used in storage systems such as Swift and Ceph to add fault
tolerance.

%package devel
Summary:        Forward error correction erasure channel library
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}

%description devel
In information theory, an erasure code is a forward error correction (FEC)
code for the binary erasure channel, which transforms a message of symbols
into a longer message (code word) with symbols such that the original
message can be recovered from a subset of the symbols.
Jerasure is a shared library that been designed to be modular, fast and
flexible. It is used in storage systems such as Swift and Ceph to add fault
tolerance.

%prep
%setup -q -n %{name}-%{version}
%patch0 -p1

%build
autoreconf --force --install -I m4
%configure \
           --disable-static \
           --disable-silent-rules \
           --disable-rpath
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING README ChangeLog

%files -n %{libname}
%defattr(-,root,root,-)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/*h
%{_libdir}/libJerasure.la
%{_libdir}/libJerasure.so

%changelog
openSUSE Build Service is sponsored by