From 4d1c8792ff5a04b20373c94ee984572cfbde9e3a Mon Sep 17 00:00:00 2001 From: CHENYUAO Date: Wed, 12 Apr 2023 14:34:56 +0800 Subject: [PATCH] change spec file format --- lmdb.spec | 91 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/lmdb.spec b/lmdb.spec index b13e8e2..0a477e4 100644 --- a/lmdb.spec +++ b/lmdb.spec @@ -1,77 +1,74 @@ -%define anolis_release 3 +%define anolis_release 4 Name: lmdb Version: 0.9.29 Release: %{anolis_release}%{?dist} -Summary: Memory-mapped key-value database +Summary: An ultra-fast, ultra-compact, crash-proof, key-value, embedded data store License: OpenLDAP URL: http://symas.com/mdb - -%global archive_path libraries/lib%{name} - Source0: lmdb-LMDB_%{version}.tar.gz Source1: lmdb.pc.in Patch0: lmdb-make.patch -BuildRequires: make -BuildRequires: gcc +BuildRequires: gcc gcc-c++ make autoconf BuildRequires: doxygen %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, -it provides the read performance of a pure in-memory database while still -offering the persistence of standard disk-based databases, and is only limited -to the size of the virtual address space. +LMDB is a Btree-based database management library modeled loosely on the BerkeleyDB API, +but much simplified. The entire database is exposed in a memory map, +and all data fetches return data directly from the mapped memory, so no malloc's +or memcpy's occur during data fetches. As such, the library is extremely simple +because it requires no page caching layer of its own, and it is extremely high performance +and memory-efficient. It is also fully transactional with full ACID semantics, +and when the memory map is read-only, the database integrity cannot be corrupted by +stray pointer writes from application code. + %package libs -Summary: Shared libraries for %{name} +Summary: Shared libraries for lmdb %description libs -The %{name}-libs package contains shared libraries necessary for running -applications that use %{name}. +The lmdb-libs package contains shared libraries necessary for running +applications that use lmdb. %package devel -Summary: Development files for %{name} +Summary: Development files for lmdb Requires: %{name} = %{version}-%{release} %description devel -The %{name}-devel package contains libraries and header files for -developing applications that use %{name}. +The lmdb-devel package contains libraries and header files for +developing applications that use lmdb. %package doc -Summary: Documentation files for %{name} +Summary: Documentation files for lmdb BuildArch: noarch %description doc -The %{name}-doc package contains automatically generated documentation for %{name}. +The lmdb-doc package contains automatically generated documentation for lmdb. %prep -%autosetup -p1 -n lmdb-LMDB_%{version} +%autosetup -n %{name}-LMDB_%{version} -p1 %build -pushd %{archive_path} +pushd libraries/lib%{name} %set_build_flags %make_build XCFLAGS="%{build_cflags}" -# Build doxygen documentation doxygen -# remove unpackaged files rm -f Doxyfile -rm -rf man # Doxygen generated manpages +rm -rf man popd + %install -pushd %{archive_path} -# make install expects existing directory tree +pushd libraries/lib%{name} mkdir -m 0755 -p %{buildroot}{%{_bindir},%{_includedir}} mkdir -m 0755 -p %{buildroot}{%{_libdir}/pkgconfig,%{_mandir}/man1} %make_install prefix=%{_prefix} libdir=%{_libdir} mandir=%{_mandir} popd -# Install pkgconfig file sed -e 's:@PREFIX@:%{_prefix}:g' \ -e 's:@EXEC_PREFIX@:%{_exec_prefix}:g' \ -e 's:@LIBDIR@:%{_libdir}:g' \ @@ -83,39 +80,43 @@ install -Dpm 0644 -t %{buildroot}%{_libdir}/pkgconfig lmdb.pc %generate_compatibility_deps %check -pushd %{archive_path} +pushd libraries/lib%{name} rm -rf testdb LD_LIBRARY_PATH=$PWD make test popd -%ldconfig_scriptlets libs - %files -%{_bindir}/* -%{abidir}/*-option.list -%{_mandir}/man1/* +%{_bindir}/mdb_copy +%{_bindir}/mdb_dump +%{_bindir}/mdb_load +%{_bindir}/mdb_stat +%{_mandir}/man1/mdb* %files libs +%{_libdir}/liblmdb.so.* %dir %{abidir} -%doc %{archive_path}/COPYRIGHT -%doc %{archive_path}/CHANGES -%license %{archive_path}/LICENSE -%{_libdir}/*.so.* +%doc libraries/lib%{name}/COPYRIGHT +%doc libraries/lib%{name}/CHANGES +%license libraries/lib%{name}/LICENSE %{abidir}/*.dump %files devel -%{_includedir}/* -%{_libdir}/*.so -%{_libdir}/pkgconfig/*.pc +%{_includedir}/lmdb.h +%{_libdir}/liblmdb.so +%{_libdir}/pkgconfig/lmdb.pc %files doc -%doc %{archive_path}/html -%doc %{archive_path}/COPYRIGHT -%doc %{archive_path}/CHANGES -%license %{archive_path}/LICENSE +%license libraries/lib%{name}/LICENSE +%doc libraries/lib%{name}/html +%doc libraries/lib%{name}/CHANGES +%doc libraries/lib%{name}/COPYRIGHT + %changelog +* Wed Apr 12 2023 chen_yu_ao - 0.9.29-4 +- change spec file format + * Tue Oct 18 2022 mgb01105731 - 0.9.29-3 - optimise spec file -- Gitee