lmdb/lmdb.spec

132 lines
4.5 KiB
RPMSpec
Raw Normal View History

#
# spec file for package lmdb
#
# Copyright (c) 2021 SUSE LLC
#
# 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_29
Version: 0.9.29
Release: 0
URL: https://symas.com/mdb/
Source: https://git.openldap.org/openldap/openldap/-/archive/LMDB_%{version}/openldap-LMDB_%{version}.tar.gz
Source1: lmdb.pc.in
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()
Accepting request 613819 from home:StefanBruens:branches:openSUSE:Factory - LMDB 0.9.22 Release (2018-03-22) * Fix MDB_DUPSORT alignment bug (ITS#8819) * Fix regression with new db from 0.9.19 (ITS#8760) * Fix liblmdb to build on Solaris (ITS#8612) * Fix delete behavior with DUPSORT DB (ITS#8622) * Fix mdb_cursor_get/mdb_cursor_del behavior (ITS#8722) - LMDB 0.9.21 Release (2017/06/01) * Fix xcursor after cursor_del (ITS#8622) - LMDB 0.9.20 (Withdrawn) * Fix mdb_load with escaped plaintext (ITS#8558) * Fix mdb_cursor_last / mdb_put interaction (ITS#8557) - LMDB 0.9.19 Release (2016/12/28) * Fix mdb_env_cwalk cursor init (ITS#8424) * Fix robust mutexes on Solaris 10/11 (ITS#8339) * Tweak Win32 error message buffer * Fix MDB_GET_BOTH on non-dup record (ITS#8393) * Optimize mdb_drop * Fix xcursors after mdb_cursor_del (ITS#8406) * Fix MDB_NEXT_DUP after mdb_cursor_del (ITS#8412) * Fix mdb_cursor_put resetting C_EOF (ITS#8489) * Fix mdb_env_copyfd2 to return EPIPE on SIGPIPE (ITS#8504) * Fix mdb_env_copy with empty DB (ITS#8209) * Fix behaviors with fork (ITS#8505) * Fix mdb_dbi_open with mainDB cursors (ITS#8542) * Fix robust mutexes on kFreeBSD (ITS#8554) * Fix utf8_to_utf16 error checks (ITS#7992) * Fix F_NOCACHE on MacOS, error is non-fatal (ITS#7682) * Build Make shared lib suffix overridable (ITS#8481) * Documentation + Cleanup doxygen nits + Note reserved vs actual mem/disk usage - LMDB 0.9.18 Release (2016/02/05) * Fix robust mutex detection on glibc 2.10-11 (ITS#8330) * Fix page_search_root assert on FreeDB (ITS#8336) * Fix MDB_APPENDDUP vs. rewrite(single item) (ITS#8334) * Fix mdb_copy of large files on Windows * Fix subcursor move after delete (ITS#8355) * Fix mdb_midl_shirnk off-by-one (ITS#8363) * Check for utf8_to_utf16 failures (ITS#7992) * Catch strdup failure in mdb_dbi_open * Build + Additional makefile var tweaks (ITS#8169) * Documentation + Add Getting Started page + Update WRITEMAP description - Drop 0002-Autoconf-files.patch, soname-configurable.patch and add Makefile-build-use-shared-lib.patch instead. Instead of replacing the Makefile with a libtool/automake based one, just patch the relevant parts of the upstream Makefile. OBS-URL: https://build.opensuse.org/request/show/613819 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/lmdb?expand=0&rev=27
2018-06-04 09:07:20 +02:00
Patch2: liblmdb-implicit-decl.patch
# PATCH-FIX-OPENSUSE - Build and link to shared library
Patch3: Makefile-build-use-shared-lib.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 openldap-LMDB_%version
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
cd libraries/liblmdb
Accepting request 613819 from home:StefanBruens:branches:openSUSE:Factory - LMDB 0.9.22 Release (2018-03-22) * Fix MDB_DUPSORT alignment bug (ITS#8819) * Fix regression with new db from 0.9.19 (ITS#8760) * Fix liblmdb to build on Solaris (ITS#8612) * Fix delete behavior with DUPSORT DB (ITS#8622) * Fix mdb_cursor_get/mdb_cursor_del behavior (ITS#8722) - LMDB 0.9.21 Release (2017/06/01) * Fix xcursor after cursor_del (ITS#8622) - LMDB 0.9.20 (Withdrawn) * Fix mdb_load with escaped plaintext (ITS#8558) * Fix mdb_cursor_last / mdb_put interaction (ITS#8557) - LMDB 0.9.19 Release (2016/12/28) * Fix mdb_env_cwalk cursor init (ITS#8424) * Fix robust mutexes on Solaris 10/11 (ITS#8339) * Tweak Win32 error message buffer * Fix MDB_GET_BOTH on non-dup record (ITS#8393) * Optimize mdb_drop * Fix xcursors after mdb_cursor_del (ITS#8406) * Fix MDB_NEXT_DUP after mdb_cursor_del (ITS#8412) * Fix mdb_cursor_put resetting C_EOF (ITS#8489) * Fix mdb_env_copyfd2 to return EPIPE on SIGPIPE (ITS#8504) * Fix mdb_env_copy with empty DB (ITS#8209) * Fix behaviors with fork (ITS#8505) * Fix mdb_dbi_open with mainDB cursors (ITS#8542) * Fix robust mutexes on kFreeBSD (ITS#8554) * Fix utf8_to_utf16 error checks (ITS#7992) * Fix F_NOCACHE on MacOS, error is non-fatal (ITS#7682) * Build Make shared lib suffix overridable (ITS#8481) * Documentation + Cleanup doxygen nits + Note reserved vs actual mem/disk usage - LMDB 0.9.18 Release (2016/02/05) * Fix robust mutex detection on glibc 2.10-11 (ITS#8330) * Fix page_search_root assert on FreeDB (ITS#8336) * Fix MDB_APPENDDUP vs. rewrite(single item) (ITS#8334) * Fix mdb_copy of large files on Windows * Fix subcursor move after delete (ITS#8355) * Fix mdb_midl_shirnk off-by-one (ITS#8363) * Check for utf8_to_utf16 failures (ITS#7992) * Catch strdup failure in mdb_dbi_open * Build + Additional makefile var tweaks (ITS#8169) * Documentation + Add Getting Started page + Update WRITEMAP description - Drop 0002-Autoconf-files.patch, soname-configurable.patch and add Makefile-build-use-shared-lib.patch instead. Instead of replacing the Makefile with a libtool/automake based one, just patch the relevant parts of the upstream Makefile. OBS-URL: https://build.opensuse.org/request/show/613819 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/lmdb?expand=0&rev=27
2018-06-04 09:07:20 +02:00
make %{?_smp_mflags} V=1 SOVERSION=%{version} CFLAGS="%{optflags}"
%install
cd libraries/liblmdb
Accepting request 613819 from home:StefanBruens:branches:openSUSE:Factory - LMDB 0.9.22 Release (2018-03-22) * Fix MDB_DUPSORT alignment bug (ITS#8819) * Fix regression with new db from 0.9.19 (ITS#8760) * Fix liblmdb to build on Solaris (ITS#8612) * Fix delete behavior with DUPSORT DB (ITS#8622) * Fix mdb_cursor_get/mdb_cursor_del behavior (ITS#8722) - LMDB 0.9.21 Release (2017/06/01) * Fix xcursor after cursor_del (ITS#8622) - LMDB 0.9.20 (Withdrawn) * Fix mdb_load with escaped plaintext (ITS#8558) * Fix mdb_cursor_last / mdb_put interaction (ITS#8557) - LMDB 0.9.19 Release (2016/12/28) * Fix mdb_env_cwalk cursor init (ITS#8424) * Fix robust mutexes on Solaris 10/11 (ITS#8339) * Tweak Win32 error message buffer * Fix MDB_GET_BOTH on non-dup record (ITS#8393) * Optimize mdb_drop * Fix xcursors after mdb_cursor_del (ITS#8406) * Fix MDB_NEXT_DUP after mdb_cursor_del (ITS#8412) * Fix mdb_cursor_put resetting C_EOF (ITS#8489) * Fix mdb_env_copyfd2 to return EPIPE on SIGPIPE (ITS#8504) * Fix mdb_env_copy with empty DB (ITS#8209) * Fix behaviors with fork (ITS#8505) * Fix mdb_dbi_open with mainDB cursors (ITS#8542) * Fix robust mutexes on kFreeBSD (ITS#8554) * Fix utf8_to_utf16 error checks (ITS#7992) * Fix F_NOCACHE on MacOS, error is non-fatal (ITS#7682) * Build Make shared lib suffix overridable (ITS#8481) * Documentation + Cleanup doxygen nits + Note reserved vs actual mem/disk usage - LMDB 0.9.18 Release (2016/02/05) * Fix robust mutex detection on glibc 2.10-11 (ITS#8330) * Fix page_search_root assert on FreeDB (ITS#8336) * Fix MDB_APPENDDUP vs. rewrite(single item) (ITS#8334) * Fix mdb_copy of large files on Windows * Fix subcursor move after delete (ITS#8355) * Fix mdb_midl_shirnk off-by-one (ITS#8363) * Check for utf8_to_utf16 failures (ITS#7992) * Catch strdup failure in mdb_dbi_open * Build + Additional makefile var tweaks (ITS#8169) * Documentation + Add Getting Started page + Update WRITEMAP description - Drop 0002-Autoconf-files.patch, soname-configurable.patch and add Makefile-build-use-shared-lib.patch instead. Instead of replacing the Makefile with a libtool/automake based one, just patch the relevant parts of the upstream Makefile. OBS-URL: https://build.opensuse.org/request/show/613819 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/lmdb?expand=0&rev=27
2018-06-04 09:07:20 +02:00
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
# Install pkgconfig file
sed -e 's:@PREFIX@:%{_prefix}:g' \
-e 's:@EXEC_PREFIX@:%{_exec_prefix}:g' \
-e 's:@LIBDIR@:%{_libdir}:g' \
-e 's:@INCLUDEDIR@:%{_includedir}:g' \
-e 's:@PACKAGE_VERSION@:%{version}:g' \
%{SOURCE1} >lmdb.pc
install -Dpm 0644 -t %{buildroot}%{_libdir}/pkgconfig lmdb.pc
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files
%doc libraries/liblmdb/CHANGES
%doc libraries/liblmdb/COPYRIGHT
%license libraries/liblmdb/LICENSE
%{_bindir}/*
%doc %{_mandir}/man1/*.1.gz
%files -n %lname
%_libdir/liblmdb-%version.so
%files devel
%_includedir/*
%_libdir/liblmdb.so
%_libdir/pkgconfig/lmdb.pc
%changelog