Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 68263e458787fc71439b9d467c3a6a9b > files > 7

leveldb-1.20-2.mga7.src.rpm

%define major   1
%define libname %mklibname %{name} %{major}
%define devname %mklibname %{name} -d

Name:           leveldb
Version:        1.20
Release:        %mkrel 2
Summary:        A fast and lightweight key/value database library by Google
Group:          Databases
License:        BSD
URL:            http://code.google.com/p/leveldb/
Source0:        https://github.com/google/leveldb/archive/v%{version}/%{name}-%{version}.tar.gz

# available in https://github.com/fusesource/leveldbjni/blob/leveldb.patch
Patch0001:      https://pkgs.fedoraproject.org/cgit/rpms/leveldb.git/plain/0001-Allow-leveldbjni-build.patch
# https://github.com/fusesource/leveldbjni/issues/34
# https://code.google.com/p/leveldb/issues/detail?id=184
# Add DB::SuspendCompactions() and DB:: ResumeCompactions() methods
Patch0002:      https://pkgs.fedoraproject.org/cgit/rpms/leveldb.git/plain/0002-Added-a-DB-SuspendCompations-and-DB-ResumeCompaction.patch
# Cherry-picked from Basho's fork
Patch0003:      https://pkgs.fedoraproject.org/cgit/rpms/leveldb.git/plain/0003-allow-Get-calls-to-avoid-copies-into-std-string.patch
# https://groups.google.com/d/topic/leveldb/SbVPvl4j4vU/discussion
Patch0004:      https://pkgs.fedoraproject.org/cgit/rpms/leveldb.git/plain/0004-bloom_test-failure-on-big-endian-archs.patch
# Don't try to do SSE on ARM
Patch0005:      leveldb-1.20-no-sse-on-ARM.patch

BuildRequires:  snappy-devel

%description
LevelDB is a fast key-value storage library written at Google that provides an
ordered mapping from string keys to string values.

#----------------------------------------------------------------------------

%package -n     %{libname}
Summary:        %{summary}
Group:          System/Libraries

%description -n %{libname}
LevelDB is a fast key-value storage library written at Google that provides an
ordered mapping from string keys to string values.

%files -n       %{libname}
%{_libdir}/lib%{name}.so.%{major}{,.*}

#----------------------------------------------------------------------------

%package -n     %{devname}
Summary:        Development files for LevelDB
Group:          System/Libraries
Requires:       %{libname} = %{version}-%{release}
Provides:       leveldb-devel = %{version}-%{release}

%description -n %{devname}
LevelDB is a fast key-value storage library written at Google that provides an
ordered mapping from string keys to string values.

This package contains additional header files for development with LevelDB.

%files -n       %{devname}
%doc doc/ AUTHORS LICENSE README.md
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

#----------------------------------------------------------------------------

%prep
%setup -q
%autopatch -p1

%build
%setup_compile_flags
%make_build

cat > %{name}.pc << EOF
prefix=%{_prefix}
exec_prefix=\${prefix}
libdir=%{_libdir}
includedir=%{_includedir}

Name: %{name}
Description: %{summary}
Version: %{version}
Libs: -l%{name}
EOF

%install
install -d %{buildroot}{%{_libdir}/pkgconfig,%{_includedir}}
cp -a out-shared/lib%{name}.so* %{buildroot}%{_libdir}/
cp -a include/%{name}/ %{buildroot}%{_includedir}/
cp -a %{name}.pc %{buildroot}%{_libdir}/pkgconfig/

%check
make check


%changelog
* Sun Sep 23 2018 umeabot <umeabot> 1.20-2.mga7
  (not released yet)
+ Revision: 1298735
- Mageia 7 Mass Rebuild

* Mon Jul 17 2017 akien <akien> 1.20-1.mga7
+ Revision: 1124213
- Version 1.20

* Sun Jan 01 2017 akien <akien> 1.19-1.mga6
+ Revision: 1079180
- Version 1.19

* Sat Apr 16 2016 tv <tv> 1.18-4.mga6
+ Revision: 1002879
- provides leveldb-devel

* Thu Feb 11 2016 umeabot <umeabot> 1.18-3.mga6
+ Revision: 955249
- Mageia 6 Mass Rebuild

* Sat Aug 29 2015 cjw <cjw> 1.18-2.mga6
+ Revision: 870791
- rebuild with gcc 5

* Tue Jun 23 2015 akien <akien> 1.18-1.mga6
+ Revision: 840369
- Version 1.18

* Wed Oct 15 2014 umeabot <umeabot> 1.17.0-3.mga5
+ Revision: 741802
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1.17.0-2.mga5
+ Revision: 681303
- Mageia 5 Mass Rebuild

* Mon Sep 08 2014 akien <akien> 1.17.0-1.mga5
+ Revision: 673599
- Version 1.17.0

* Mon Apr 28 2014 akien <akien> 1.16.0-2.mga5
+ Revision: 618779
- Update pkgconfig version

* Mon Apr 28 2014 akien <akien> 1.16.0-1.mga5
+ Revision: 618768
- Update to version 1.16.0
- Mageia-ify, customise and clean the spec file
- import source RPM from OpenMandriva


* Sat Dec 07 2013 Bernhard Rosenkraenzer <bero@bero.eu> 1.14.0-5
+ Revision: c7b543c
- MassBuild#289: Increase release tag