Blame SPECS/lmdb.spec

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