Blame SPECS/lmdb.spec

bc2a32
# The files themselves are in several subdirectories and need to be prefixed wit this.
bc2a32
%global archive_path libraries/lib%{name}
bc2a32
bc2a32
Name:           lmdb
bc2a32
Version:        0.9.24
65a59a
Release:        2%{?dist}
bc2a32
Summary:        Memory-mapped key-value database
bc2a32
bc2a32
License:        OpenLDAP
bc2a32
URL:            http://symas.com/mdb/
bc2a32
Source0:        https://github.com/LMDB/lmdb/archive/LMDB_%{version}.tar.gz#/%{name}-LMDB_%{version}.tar.gz
bc2a32
Source1:        lmdb.pc.in
bc2a32
bc2a32
BuildRequires: make
bc2a32
BuildRequires: gcc
bc2a32
BuildRequires: doxygen
bc2a32
bc2a32
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
bc2a32
bc2a32
# Patch description in the corresponding file
bc2a32
Patch0: lmdb-make.patch
bc2a32
Patch1: lmdb-s390-check.patch
bc2a32
Patch2: lmdb-covscan.patch
bc2a32
bc2a32
%description
bc2a32
LMDB is an ultra-fast, ultra-compact key-value embedded data
bc2a32
store developed by Symas for the OpenLDAP Project. By using memory-mapped files,
bc2a32
it provides the read performance of a pure in-memory database while still
bc2a32
offering the persistence of standard disk-based databases, and is only limited
bc2a32
to the size of the virtual address space.
bc2a32
bc2a32
%package        libs
bc2a32
Summary:        Shared libraries for %{name}
bc2a32
bc2a32
%description    libs
bc2a32
The %{name}-libs package contains shared libraries necessary for running
bc2a32
applications that use %{name}.
bc2a32
bc2a32
%package        devel
bc2a32
Summary:        Development files for %{name}
bc2a32
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
bc2a32
bc2a32
%description    devel
bc2a32
The %{name}-devel package contains libraries and header files for
bc2a32
developing applications that use %{name}.
bc2a32
bc2a32
%package        doc
bc2a32
Summary:        Documentation files for %{name}
bc2a32
BuildArch:      noarch
bc2a32
bc2a32
%description    doc
bc2a32
The %{name}-doc package contains automatically generated documentation for %{name}.
bc2a32
bc2a32
bc2a32
%prep
bc2a32
%setup -q -n %{name}-LMDB_%{version}
bc2a32
%patch0 -p1 -b .make
bc2a32
%patch1 -p1 -b .s390-check
bc2a32
%patch2 -p1 -b .covscan
bc2a32
bc2a32
%build
bc2a32
pushd %{archive_path}
bc2a32
make LDFLAGS="%{build_ldflags}" XCFLAGS="%{optflags}" %{?_smp_mflags}
bc2a32
# Build doxygen documentation
bc2a32
doxygen
bc2a32
# remove unpackaged files
bc2a32
rm -f Doxyfile
bc2a32
rm -rf man # Doxygen generated manpages
bc2a32
popd
bc2a32
bc2a32
%install
bc2a32
pushd %{archive_path}
bc2a32
# make install expects existing directory tree
bc2a32
mkdir -m 0755 -p %{buildroot}{%{_bindir},%{_includedir}}
bc2a32
mkdir -m 0755 -p %{buildroot}{%{_libdir}/pkgconfig,%{_mandir}/man1}
bc2a32
make DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} mandir=%{_mandir} install
bc2a32
popd
bc2a32
bc2a32
# Install pkgconfig file
bc2a32
sed -e 's:@PREFIX@:%{_prefix}:g' \
bc2a32
    -e 's:@EXEC_PREFIX@:%{_exec_prefix}:g' \
bc2a32
    -e 's:@LIBDIR@:%{_libdir}:g' \
bc2a32
    -e 's:@INCLUDEDIR@:%{_includedir}:g' \
bc2a32
    -e 's:@PACKAGE_VERSION@:%{version}:g' \
bc2a32
    %{SOURCE1} >lmdb.pc
bc2a32
install -Dpm 0644 -t %{buildroot}%{_libdir}/pkgconfig lmdb.pc
bc2a32
bc2a32
%check
65a59a
%if 0%{?rhel} == 6 && "%{_arch}" == "ppc64"
bc2a32
  # rhel6 ppc64: skip unit tests
bc2a32
  exit 0
bc2a32
%endif
bc2a32
bc2a32
pushd %{archive_path}
bc2a32
rm -rf testdb
bc2a32
LD_LIBRARY_PATH=$PWD make test
bc2a32
popd
bc2a32
bc2a32
%ldconfig_scriptlets libs
bc2a32
bc2a32
bc2a32
%files
bc2a32
%{_bindir}/*
bc2a32
%{_mandir}/man1/*
bc2a32
bc2a32
%files libs
bc2a32
%doc %{archive_path}/COPYRIGHT
bc2a32
%doc %{archive_path}/CHANGES
bc2a32
%license %{archive_path}/LICENSE
bc2a32
%{_libdir}/*.so.*
bc2a32
bc2a32
%files devel
bc2a32
%{_includedir}/*
bc2a32
%{_libdir}/*.so
bc2a32
%{_libdir}/pkgconfig/*.pc
bc2a32
bc2a32
%files doc
bc2a32
%doc %{archive_path}/html
bc2a32
%doc %{archive_path}/COPYRIGHT
bc2a32
%doc %{archive_path}/CHANGES
bc2a32
%license %{archive_path}/LICENSE
bc2a32
bc2a32
bc2a32
%changelog
65a59a
* Wed Nov 02 2022 Radovan Sroka <rsroka@redhat.com> - 0.9.24-2
65a59a
RHEL 8.8.0 ERRATUM
65a59a
- Please put lmdb in RHEL 8 CRB
65a59a
- Rebuild
65a59a
- Resolves: rhbz#1972979
65a59a
bc2a32
* Thu May 07 2020 Radovan Sroka <rsroka@redhat.com> - 0.9.24-1
bc2a32
- RHEL 8.3.0 ERRATUM
bc2a32
- rebase to 0.9.24
bc2a32
- Resolves: rhbz#1817421
bc2a32
bc2a32
* Tue Jun 18 2019 Radovan Sroka <rsroka@redhat.com> - 0.9.23-5
bc2a32
- fixed resolves from RPMDIFF
bc2a32
- fixed some covscan issues
bc2a32
bc2a32
* Wed Jun 12 2019 Radovan Sroka <rsroka@redhat.com> - 0.9.23-4
bc2a32
- propagate ldflags for makefile
bc2a32
- added explicit Requires for -libs
bc2a32
bc2a32
* Wed May 15 2019 Radovan Sroka <rsroka@redhat.com> - 0.9.23-3
bc2a32
- rebuild
bc2a32
bc2a32
* Mon Apr 29 2019 Radovan Sroka <rsroka@redhat.com> - 0.9.23-2
bc2a32
- Initial Package
bc2a32
- Resolves: rhbz#1692264