lmdb/lmdb.spec
Klaus Kämpf 3e15d2383b Accepting request 640693 from home:StefanBruens:branches:systemsmanagement
- Fix occasional crash when freed pages landed on the dirty list twice
  * Add 0001-ITS-8756-remove-loose-pg-from-dirty-list-in-freelist.patch

OBS-URL: https://build.opensuse.org/request/show/640693
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/lmdb?expand=0&rev=29
2018-10-09 06:37:10 +00:00

129 lines
4.4 KiB
RPMSpec

#
# spec file for package lmdb
#
# Copyright (c) 2018 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 https://bugs.opensuse.org/
#
Name: lmdb
Summary: Lightning Memory-Mapped Database Manager
License: OLDAP-2.8
Group: Productivity/Databases/Tools
%define lname liblmdb-0_9_22
Version: 0.9.22
Release: 0
Url: http://symas.com/mdb/
#Git-Clone: git://git.openldap.org/openldap mdb.master
Source: https://github.com/LMDB/lmdb/archive/LMDB_%version.tar.gz
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM - debugging tools (https://github.com/kacfengine/lmdb)
Patch1: 0001-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
# PATCH-FIX-OPENSUSE - Implicit declaration of atol()
Patch2: liblmdb-implicit-decl.patch
# PATCH-FIX-OPENSUSE - Build and link to shared library
Patch3: Makefile-build-use-shared-lib.patch
# PATCH-FIX-UPSTREAM - Fix crash due to failed assertion, freed pages ended up on the dirty page list twice
Patch4: 0001-ITS-8756-remove-loose-pg-from-dirty-list-in-freelist.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?rhel_version} == 700
BuildRequires: perl-Exporter
%endif
%description
LMDB is a Btree-based database management library with an API similar
to BerkeleyDB. The library is thread-aware and supports concurrent
read/write access from multiple processes and threads. The DB
structure is multi-versioned, and data pages use a copy-on-write
strategy, which also provides resistance to corruption and eliminates
the need for any recovery procedures. The database is exposed in a
memory map, requiring no page cache layer of its own.
%package -n %lname
Summary: Shared library for Lightning Memory-Mapped Database (LMDB)
Group: System/Libraries
%description -n %lname
LMDB is a Btree-based database management library with an API similar
to BerkeleyDB. The library is thread-aware and supports concurrent
read/write access from multiple processes and threads. The DB
structure is multi-versioned, and data pages use a copy-on-write
strategy, which also provides resistance to corruption and eliminates
the need for any recovery procedures. The database is exposed in a
memory map, requiring no page cache layer of its own.
This package contains the shared library.
%package devel
Summary: Development package for lmdb
Group: Development/Libraries/C and C++
Requires: %lname = %version
%description devel
LMDB is a Btree-based database management library with an API similar
to BerkeleyDB. The library is thread-aware and supports concurrent
read/write access from multiple processes and threads. The DB
structure is multi-versioned, and data pages use a copy-on-write
strategy, which also provides resistance to corruption and eliminates
the need for any recovery procedures. The database is exposed in a
memory map, requiring no page cache layer of its own.
This package contains the files needed to compile programs that use
the liblmdb library.
%prep
%setup -qn lmdb-LMDB_%version
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
cd libraries/liblmdb
make %{?_smp_mflags} V=1 SOVERSION=%{version} CFLAGS="%{optflags}"
%install
cd libraries/liblmdb
make install DESTDIR="%buildroot" SOVERSION=%{version} \
bindir=%{_bindir} \
libdir=%{_libdir} \
mandir=%{_mandir} \
includedir=%{_includedir} \
datarootdir=%{_datadir}
ln -s %{_libdir}/liblmdb-%{version}.so %{buildroot}%{_libdir}/liblmdb.so
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc libraries/liblmdb/CHANGES
%doc libraries/liblmdb/COPYRIGHT
%doc libraries/liblmdb/LICENSE
%{_bindir}/*
%doc %{_mandir}/man1/*.1.gz
%files -n %lname
%defattr(-,root,root)
%_libdir/liblmdb-%version.so
%files devel
%defattr(-,root,root)
%_includedir/*
%_libdir/liblmdb.so
%changelog