lmdb/lmdb.spec

129 lines
3.3 KiB
RPMSpec
Raw Normal View History

2014-05-27 13:40:26 +00:00
Name: lmdb
Version: 0.9.30
2023-02-09 10:47:38 +00:00
Release: %autorelease
2014-05-27 13:40:26 +00:00
Summary: Memory-mapped key-value database
License: OpenLDAP
URL: https://www.symas.com/lmdb
# Main source is retrieved from OpenLDAP GitLab
%global forgeurl https://git.openldap.org/openldap/openldap
%global tag LMDB_%{version}
%global archivename openldap-%{tag}
%global archiveext tar.gz
%global archiveurl %{forgeurl}/-/archive/%{tag}/%{archivename}.%{archiveext}
%forgemeta
Source: %{forgesource}
Source: lmdb.pc.in
2014-05-27 13:40:26 +00:00
# Patch description in the corresponding file
Patch: lmdb-make.patch
Patch: lmdb-s390-check.patch
2014-05-27 13:40:26 +00:00
BuildRequires: make
BuildRequires: gcc
BuildRequires: doxygen
2014-05-27 13:40:26 +00:00
%description
LMDB is an ultra-fast, ultra-compact key-value embedded data
store developed by Symas for the OpenLDAP Project. By using memory-mapped files,
2018-04-10 14:50:29 +00:00
it provides the read performance of a pure in-memory database while still
2014-05-27 13:40:26 +00:00
offering the persistence of standard disk-based databases, and is only limited
to the size of the virtual address space.
%package libs
Summary: Shared libraries for %{name}
%description libs
The %{name}-libs package contains shared libraries necessary for running
applications that use %{name}.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package doc
Summary: Documentation files for %{name}
BuildArch: noarch
%description doc
The %{name}-doc package contains automatically generated documentation for %{name}.
%prep
# forgeautosetup does not pass the -n argument
%autosetup -n %{archivename} -p1
2014-05-27 13:40:26 +00:00
# The files themselves are in several subdirectories and need to be prefixed wit this.
%global archive_path libraries/lib%{name}
2014-05-27 13:40:26 +00:00
%build
2015-08-14 09:55:38 +00:00
pushd %{archive_path}
2020-06-15 10:23:11 +00:00
%set_build_flags
%make_build XCFLAGS="%{build_cflags}"
2014-05-27 13:40:26 +00:00
# Build doxygen documentation
doxygen
# remove unpackaged files
rm -f Doxyfile
rm -rf man # Doxygen generated manpages
2015-08-14 09:55:38 +00:00
popd
2014-05-27 13:40:26 +00:00
%install
2015-08-14 09:55:38 +00:00
pushd %{archive_path}
2014-05-27 13:40:26 +00:00
# make install expects existing directory tree
2017-03-20 09:17:59 +00:00
mkdir -m 0755 -p %{buildroot}{%{_bindir},%{_includedir}}
mkdir -m 0755 -p %{buildroot}{%{_libdir}/pkgconfig,%{_mandir}/man1}
%make_install prefix=%{_prefix} libdir=%{_libdir} mandir=%{_mandir}
2015-08-14 09:55:38 +00:00
popd
2014-05-27 13:40:26 +00:00
2017-03-20 09:34:53 +00:00
# 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
2014-05-27 13:40:26 +00:00
%check
2020-04-02 11:01:26 +00:00
%if 0%{?rhel} == 6 && "%{_arch}" == "ppc64"
2016-02-15 09:42:33 +00:00
# rhel6 ppc64: skip unit tests
exit 0
%endif
2015-08-14 09:55:38 +00:00
pushd %{archive_path}
2014-05-27 13:40:26 +00:00
rm -rf testdb
LD_LIBRARY_PATH=$PWD make test
2015-08-14 09:55:38 +00:00
popd
2014-05-27 13:40:26 +00:00
%ldconfig_scriptlets libs
2014-05-27 13:40:26 +00:00
%files
%{_bindir}/*
%{_mandir}/man1/*
%files libs
2015-08-14 09:55:38 +00:00
%doc %{archive_path}/COPYRIGHT
%doc %{archive_path}/CHANGES
%license %{archive_path}/LICENSE
2014-05-27 13:40:26 +00:00
%{_libdir}/*.so.*
%files devel
%{_includedir}/*
%{_libdir}/*.so
2017-03-20 09:34:53 +00:00
%{_libdir}/pkgconfig/*.pc
2014-05-27 13:40:26 +00:00
%files doc
2015-08-14 09:55:38 +00:00
%doc %{archive_path}/html
%doc %{archive_path}/COPYRIGHT
%doc %{archive_path}/CHANGES
%license %{archive_path}/LICENSE
2014-05-27 13:40:26 +00:00
%changelog
2023-02-09 10:47:38 +00:00
%autochangelog