# rpmbuild options:
# --with | --without rpmem
# --define "_testconfig <path to custom testconfig.sh or 'default'>"
# --define "_check <1|0>" - run make check or not
#
# do not terminate build if files in the $RPM_BUILD_ROOT
# directory are not found in the %files (without rpmem case)
%define _unpackaged_files_terminate_build 0
# disable 'make check' on suse
%if %{defined suse_version}
%define _check 0
%define dist .suse%{suse_version}
%endif
%if (0%{?suse_version} > 1315) || (0%{?fedora} >= 27) || (0%{?rhel} >= 7)
%bcond_without rpmem
%else
%bcond_with rpmem
%endif
%define min_libfabric_ver __LIBFABRIC_MIN_VER__
Name: pmdk
Version: __VERSION__
Release: 1%{?dist}
Summary: __PACKAGE_SUMMARY__
Packager: __PACKAGE_MAINTAINER__
Group: __GROUP_SYS_LIBS__
License: __LICENSE__
URL: http://pmem.io/pmdk
Source0: %{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: make
BuildRequires: glibc-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: man
BuildRequires: pkgconfig
BuildRequires: doxygen
BuildRequires: gdb
%if %{with rpmem}
BuildRequires: libfabric-devel >= %{min_libfabric_ver}
%endif
# Debug variants of the libraries should be filtered out of the provides.
%global __provides_exclude_from ^%{_libdir}/pmdk_debug/.*\\.so.*$
# By design, PMDK does not support any 32-bit architecture.
# Due to dependency on xmmintrin.h and some inline assembly, it can be
# compiled only for x86_64 at the moment.
# Other 64-bit architectures could also be supported, if only there is
# a request for that, and if somebody provides the arch-specific
# implementation of the low-level routines for flushing to persistent
# memory.
# https://bugzilla.redhat.com/show_bug.cgi?id=1340634
# https://bugzilla.redhat.com/show_bug.cgi?id=1340635
# https://bugzilla.redhat.com/show_bug.cgi?id=1340636
# https://bugzilla.redhat.com/show_bug.cgi?id=1340637
ExclusiveArch: x86_64
%description
The Persistent Memory Development Kit is a collection of libraries for
using memory-mapped persistence, optimized specifically for persistent memory.
%package -n libpmem__PKG_NAME_SUFFIX__
Summary: Low-level persistent memory support library
Group: __GROUP_SYS_LIBS__
%description -n libpmem__PKG_NAME_SUFFIX__
The libpmem provides low level persistent memory support. In particular,
support for the persistent memory instructions for flushing changes
to pmem is provided.
%files -n libpmem__PKG_NAME_SUFFIX__
%defattr(-,root,root,-)
%dir %{_datadir}/pmdk
%{_libdir}/libpmem.so.*
%{_datadir}/pmdk/pmdk.magic
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmem-devel
Summary: Development files for the low-level persistent memory library
Group: __GROUP_DEV_LIBS__
Requires: libpmem__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n libpmem-devel
The libpmem provides low level persistent memory support. In particular,
support for the persistent memory instructions for flushing changes
to pmem is provided.
This library is provided for software which tracks every store to
pmem and needs to flush those changes to durability. Most developers
will find higher level libraries like libpmemobj to be much more
convenient.
%files -n libpmem-devel
%defattr(-,root,root,-)
%{_libdir}/libpmem.so
%{_libdir}/libpmem.a
%{_libdir}/pkgconfig/libpmem.pc
%{_includedir}/libpmem.h
%{_mandir}/man7/libpmem.7.gz
%{_mandir}/man3/pmem_*.3.gz
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmem-debug
Summary: Debug variant of the low-level persistent memory library
Group: __GROUP_DEV_LIBS__
Requires: libpmem__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n libpmem-debug
The libpmem provides low level persistent memory support. In particular,
support for the persistent memory instructions for flushing changes
to pmem is provided.
This sub-package contains debug variant of the library, providing
run-time assertions and trace points. The typical way to access the
debug version is to set the environment variable LD_LIBRARY_PATH to
/usr/lib64/pmdk_debug.
%files -n libpmem-debug
%defattr(-,root,root,-)
%dir %{_libdir}/pmdk_debug
%{_libdir}/pmdk_debug/libpmem.so
%{_libdir}/pmdk_debug/libpmem.so.*
%{_libdir}/pmdk_debug/libpmem.a
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmemblk__PKG_NAME_SUFFIX__
Summary: Persistent Memory Resident Array of Blocks library
Group: __GROUP_SYS_LIBS__
Requires: libpmem__PKG_NAME_SUFFIX__ >= %{version}-%{release}
%description -n libpmemblk__PKG_NAME_SUFFIX__
The libpmemblk implements a pmem-resident array of blocks, all the same
size, where a block is updated atomically with respect to power
failure or program interruption (no torn blocks).
%files -n libpmemblk__PKG_NAME_SUFFIX__
%defattr(-,root,root,-)
%{_libdir}/libpmemblk.so.*
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmemblk-devel
Summary: Development files for the Persistent Memory Resident Array of Blocks library
Group: __GROUP_DEV_LIBS__
Requires: libpmemblk__PKG_NAME_SUFFIX__ = %{version}-%{release}
Requires: libpmem-devel = %{version}-%{release}
%description -n libpmemblk-devel
The libpmemblk implements a pmem-resident array of blocks, all the same
size, where a block is updated atomically with respect to power
failure or program interruption (no torn blocks).
For example, a program keeping a cache of fixed-size objects in pmem
might find this library useful. This library is provided for cases
requiring large arrays of objects at least 512 bytes each. Most
developers will find higher level libraries like libpmemobj to be
more generally useful.
%files -n libpmemblk-devel
%defattr(-,root,root,-)
%{_libdir}/libpmemblk.so
%{_libdir}/libpmemblk.a
%{_libdir}/pkgconfig/libpmemblk.pc
%{_includedir}/libpmemblk.h
%{_mandir}/man7/libpmemblk.7.gz
%{_mandir}/man5/poolset.5.gz
%{_mandir}/man3/pmemblk_*.3.gz
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmemblk-debug
Summary: Debug variant of the Persistent Memory Resident Array of Blocks library
Group: __GROUP_DEV_LIBS__
Requires: libpmemblk__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n libpmemblk-debug
The libpmemblk implements a pmem-resident array of blocks, all the same
size, where a block is updated atomically with respect to power
failure or program interruption (no torn blocks).
This sub-package contains debug variant of the library, providing
run-time assertions and trace points. The typical way to access the
debug version is to set the environment variable LD_LIBRARY_PATH to
/usr/lib64/pmdk_debug.
%files -n libpmemblk-debug
%defattr(-,root,root,-)
%dir %{_libdir}/pmdk_debug
%{_libdir}/pmdk_debug/libpmemblk.so
%{_libdir}/pmdk_debug/libpmemblk.so.*
%{_libdir}/pmdk_debug/libpmemblk.a
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmemlog__PKG_NAME_SUFFIX__
Summary: Persistent Memory Resident Log File library
Group: __GROUP_SYS_LIBS__
Requires: libpmem__PKG_NAME_SUFFIX__ >= %{version}-%{release}
%description -n libpmemlog__PKG_NAME_SUFFIX__
The libpmemlog library provides a pmem-resident log file. This is
useful for programs like databases that append frequently to a log
file.
%files -n libpmemlog__PKG_NAME_SUFFIX__
%defattr(-,root,root,-)
%{_libdir}/libpmemlog.so.*
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmemlog-devel
Summary: Development files for the Persistent Memory Resident Log File library
Group: __GROUP_DEV_LIBS__
Requires: libpmemlog__PKG_NAME_SUFFIX__ = %{version}-%{release}
Requires: libpmem-devel = %{version}-%{release}
%description -n libpmemlog-devel
The libpmemlog library provides a pmem-resident log file. This
library is provided for cases requiring an append-mostly file to
record variable length entries. Most developers will find higher
level libraries like libpmemobj to be more generally useful.
%files -n libpmemlog-devel
%defattr(-,root,root,-)
%{_libdir}/libpmemlog.so
%{_libdir}/libpmemlog.a
%{_libdir}/pkgconfig/libpmemlog.pc
%{_includedir}/libpmemlog.h
%{_mandir}/man7/libpmemlog.7.gz
%{_mandir}/man5/poolset.5.gz
%{_mandir}/man3/pmemlog_*.3.gz
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmemlog-debug
Summary: Debug variant of the Persistent Memory Resident Log File library
Group: __GROUP_DEV_LIBS__
Requires: libpmemlog__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n libpmemlog-debug
The libpmemlog library provides a pmem-resident log file. This
library is provided for cases requiring an append-mostly file to
record variable length entries. Most developers will find higher
level libraries like libpmemobj to be more generally useful.
This sub-package contains debug variant of the library, providing
run-time assertions and trace points. The typical way to access the
debug version is to set the environment variable LD_LIBRARY_PATH to
/usr/lib64/pmdk_debug.
%files -n libpmemlog-debug
%defattr(-,root,root,-)
%dir %{_libdir}/pmdk_debug
%{_libdir}/pmdk_debug/libpmemlog.so
%{_libdir}/pmdk_debug/libpmemlog.so.*
%{_libdir}/pmdk_debug/libpmemlog.a
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmemobj__PKG_NAME_SUFFIX__
Summary: Persistent Memory Transactional Object Store library
Group: __GROUP_SYS_LIBS__
Requires: libpmem__PKG_NAME_SUFFIX__ >= %{version}-%{release}
%description -n libpmemobj__PKG_NAME_SUFFIX__
The libpmemobj library provides a transactional object store,
providing memory allocation, transactions, and general facilities for
persistent memory programming.
%files -n libpmemobj__PKG_NAME_SUFFIX__
%defattr(-,root,root,-)
%{_libdir}/libpmemobj.so.*
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmemobj-devel
Summary: Development files for the Persistent Memory Transactional Object Store library
Group: __GROUP_DEV_LIBS__
Requires: libpmemobj__PKG_NAME_SUFFIX__ = %{version}-%{release}
Requires: libpmem-devel = %{version}-%{release}
%description -n libpmemobj-devel
The libpmemobj library provides a transactional object store,
providing memory allocation, transactions, and general facilities for
persistent memory programming. Developers new to persistent memory
probably want to start with this library.
%files -n libpmemobj-devel
%defattr(-,root,root,-)
%{_libdir}/libpmemobj.so
%{_libdir}/libpmemobj.a
%{_libdir}/pkgconfig/libpmemobj.pc
%{_includedir}/libpmemobj.h
%{_includedir}/libpmemobj/*.h
%{_mandir}/man7/libpmemobj.7.gz
%{_mandir}/man5/poolset.5.gz
%{_mandir}/man3/pmemobj_*.3.gz
%{_mandir}/man3/pobj_*.3.gz
%{_mandir}/man3/oid_*.3.gz
%{_mandir}/man3/toid*.3.gz
%{_mandir}/man3/direct_*.3.gz
%{_mandir}/man3/d_r*.3.gz
%{_mandir}/man3/tx_*.3.gz
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmemobj-debug
Summary: Debug variant of the Persistent Memory Transactional Object Store library
Group: __GROUP_DEV_LIBS__
Requires: libpmemobj__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n libpmemobj-debug
The libpmemobj library provides a transactional object store,
providing memory allocation, transactions, and general facilities for
persistent memory programming. Developers new to persistent memory
probably want to start with this library.
This sub-package contains debug variant of the library, providing
run-time assertions and trace points. The typical way to access the
debug version is to set the environment variable LD_LIBRARY_PATH to
/usr/lib64/pmdk_debug.
%files -n libpmemobj-debug
%defattr(-,root,root,-)
%dir %{_libdir}/pmdk_debug
%{_libdir}/pmdk_debug/libpmemobj.so
%{_libdir}/pmdk_debug/libpmemobj.so.*
%{_libdir}/pmdk_debug/libpmemobj.a
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libvmem__PKG_NAME_SUFFIX__
Summary: Volatile Memory allocation library
Group: __GROUP_SYS_LIBS__
%description -n libvmem__PKG_NAME_SUFFIX__
The libvmem library turns a pool of persistent memory into a volatile
memory pool, similar to the system heap but kept separate and with
its own malloc-style API.
%files -n libvmem__PKG_NAME_SUFFIX__
%defattr(-,root,root,-)
%{_libdir}/libvmem.so.*
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libvmem-devel
Summary: Development files for the Volatile Memory allocation library
Group: __GROUP_DEV_LIBS__
Requires: libvmem__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n libvmem-devel
The libvmem library turns a pool of persistent memory into a volatile
memory pool, similar to the system heap but kept separate and with
its own malloc-style API.
This sub-package contains libraries and header files for developing
applications that want to make use of libvmem.
%files -n libvmem-devel
%defattr(-,root,root,-)
%{_libdir}/libvmem.so
%{_libdir}/libvmem.a
%{_libdir}/pkgconfig/libvmem.pc
%{_includedir}/libvmem.h
%{_mandir}/man7/libvmem.7.gz
%{_mandir}/man3/vmem_*.3.gz
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libvmem-debug
Summary: Debug variant of the Volatile Memory allocation library
Group: __GROUP_DEV_LIBS__
Requires: libvmem__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n libvmem-debug
The libvmem library turns a pool of persistent memory into a volatile
memory pool, similar to the system heap but kept separate and with
its own malloc-style API.
This sub-package contains debug variant of the library, providing
run-time assertions and trace points. The typical way to access the
debug version is to set the environment variable LD_LIBRARY_PATH to
/usr/lib64/pmdk_debug.
%files -n libvmem-debug
%defattr(-,root,root,-)
%dir %{_libdir}/pmdk_debug
%{_libdir}/pmdk_debug/libvmem.so
%{_libdir}/pmdk_debug/libvmem.so.*
%{_libdir}/pmdk_debug/libvmem.a
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libvmmalloc__PKG_NAME_SUFFIX__
Summary: Dynamic to Persistent Memory allocation translation library
Group: __GROUP_SYS_LIBS__
%description -n libvmmalloc__PKG_NAME_SUFFIX__
The libvmmalloc library transparently converts all the dynamic memory
allocations into persistent memory allocations. This allows the use
of persistent memory as volatile memory without modifying the target
application.
The typical usage of libvmmalloc is to load it via the LD_PRELOAD
environment variable.
%files -n libvmmalloc__PKG_NAME_SUFFIX__
%defattr(-,root,root,-)
%{_libdir}/libvmmalloc.so.*
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libvmmalloc-devel
Summary: Development files for the Dynamic-to-Persistent allocation library
Group: __GROUP_DEV_LIBS__
Requires: libvmmalloc__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n libvmmalloc-devel
The libvmmalloc library transparently converts all the dynamic memory
allocations into persistent memory allocations. This allows the use
of persistent memory as volatile memory without modifying the target
application.
This sub-package contains libraries and header files for developing
applications that want to specifically make use of libvmmalloc.
%files -n libvmmalloc-devel
%defattr(-,root,root,-)
%{_libdir}/libvmmalloc.so
%{_libdir}/libvmmalloc.a
%{_libdir}/pkgconfig/libvmmalloc.pc
%{_includedir}/libvmmalloc.h
%{_mandir}/man7/libvmmalloc.7.gz
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libvmmalloc-debug
Summary: Debug variant of the Dynamic-to-Persistent allocation library
Group: __GROUP_DEV_LIBS__
Requires: libvmmalloc__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n libvmmalloc-debug
The libvmmalloc library transparently converts all the dynamic memory
allocations into persistent memory allocations. This allows the use
of persistent memory as volatile memory without modifying the target
application.
This sub-package contains debug variant of the library, providing
run-time assertions and trace points. The typical way to access the
debug version is to set the environment variable LD_LIBRARY_PATH to
/usr/lib64/pmdk_debug.
%files -n libvmmalloc-debug
%defattr(-,root,root,-)
%dir %{_libdir}/pmdk_debug
%{_libdir}/pmdk_debug/libvmmalloc.so
%{_libdir}/pmdk_debug/libvmmalloc.so.*
%{_libdir}/pmdk_debug/libvmmalloc.a
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
# Specify a virtual Provide for libpmemobj++-static package, so the package
# usage can be tracked.
%package -n libpmemobj++-devel
Summary: C++ bindings for Persistent Memory Transactional Object Store library
Group: __GROUP_DEV_LIBS__
Provides: libpmemobj++-static = %{version}-%{release}
Requires: libpmemobj-devel = %{version}-%{release}
%description -n libpmemobj++-devel
The libpmemobj library provides a transactional object store,
providing memory allocation, transactions, and general facilities for
persistent memory programming.
This sub-package contains header files for libpmemobj C++ bindings.
%files -n libpmemobj++-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libpmemobj++.pc
%{_includedir}/libpmemobj++/*.hpp
%{_includedir}/libpmemobj++/detail/*.hpp
%{_docdir}/libpmemobj++-devel/*
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmempool__PKG_NAME_SUFFIX__
Summary: Persistent Memory pool management library
Group: __GROUP_SYS_LIBS__
Requires: libpmem__PKG_NAME_SUFFIX__ >= %{version}-%{release}
%description -n libpmempool__PKG_NAME_SUFFIX__
The libpmempool library provides a set of utilities for off-line
administration, analysis, diagnostics and repair of persistent memory
pools created by libpmemlog, libpemblk and libpmemobj libraries.
%files -n libpmempool__PKG_NAME_SUFFIX__
%defattr(-,root,root,-)
%{_libdir}/libpmempool.so.*
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmempool-devel
Summary: Development files for Persistent Memory pool management library
Group: __GROUP_DEV_LIBS__
Requires: libpmempool__PKG_NAME_SUFFIX__ = %{version}-%{release}
Requires: libpmem-devel = %{version}-%{release}
%description -n libpmempool-devel
The libpmempool library provides a set of utilities for off-line
administration, analysis, diagnostics and repair of persistent memory
pools created by libpmemlog, libpemblk and libpmemobj libraries.
%files -n libpmempool-devel
%defattr(-,root,root,-)
%{_libdir}/libpmempool.so
%{_libdir}/libpmempool.a
%{_libdir}/pkgconfig/libpmempool.pc
%{_includedir}/libpmempool.h
%{_mandir}/man7/libpmempool.7.gz
%{_mandir}/man5/poolset.5.gz
%{_mandir}/man3/pmempool_*.3.gz
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmempool-debug
Summary: Debug variant of the Persistent Memory pool management library
Group: __GROUP_DEV_LIBS__
Requires: libpmempool__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n libpmempool-debug
The libpmempool library provides a set of utilities for off-line
administration, analysis, diagnostics and repair of persistent memory
pools created by libpmemlog, libpemblk and libpmemobj libraries.
This sub-package contains debug variant of the library, providing
run-time assertions and trace points. The typical way to access the
debug version is to set the environment variable LD_LIBRARY_PATH to
/usr/lib64/pmdk_debug.
%files -n libpmempool-debug
%defattr(-,root,root,-)
%dir %{_libdir}/pmdk_debug
%{_libdir}/pmdk_debug/libpmempool.so
%{_libdir}/pmdk_debug/libpmempool.so.*
%{_libdir}/pmdk_debug/libpmempool.a
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%if %{with rpmem}
%package -n librpmem__PKG_NAME_SUFFIX__
Summary: Remote Access to Persistent Memory library
Group: __GROUP_SYS_LIBS__
Requires: libfabric >= %{min_libfabric_ver}
Requires: openssh-clients
%description -n librpmem__PKG_NAME_SUFFIX__
The librpmem library provides low-level support for remote access
to persistent memory utilizing RDMA-capable NICs. It can be used
to replicate peristent memory regions over RDMA protocol.
%files -n librpmem__PKG_NAME_SUFFIX__
%defattr(-,root,root,-)
%{_libdir}/librpmem.so.*
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n librpmem-devel
Summary: Development files for the Remote Access to Persistent Memory library
Group: __GROUP_DEV_LIBS__
Requires: librpmem__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n librpmem-devel
The librpmem library provides low-level support for remote access
to persistent memory utilizing RDMA-capable NICs. It can be used
to replicate peristent memory regions over RDMA protocol.
This sub-package contains libraries and header files for developing
applications that want to specifically make use of librpmem.
%files -n librpmem-devel
%defattr(-,root,root,-)
%{_libdir}/librpmem.so
%{_libdir}/librpmem.a
%{_libdir}/pkgconfig/librpmem.pc
%{_includedir}/librpmem.h
%{_mandir}/man7/librpmem.7.gz
%{_mandir}/man3/rpmem_*.3.gz
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n librpmem-debug
Summary: Debug variant of the Remote Access to Persistent Memory library
Group: __GROUP_DEV_LIBS__
Requires: librpmem__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n librpmem-debug
The librpmem library provides low-level support for remote access
to persistent memory utilizing RDMA-capable NICs. It can be used
to replicate peristent memory regions over RDMA protocol.
This sub-package contains debug variant of the library, providing
run-time assertions and trace points. The typical way to access the
debug version is to set the environment variable LD_LIBRARY_PATH to
/usr/lib64/pmdk_debug.
%files -n librpmem-debug
%defattr(-,root,root,-)
%dir %{_libdir}/pmdk_debug
%{_libdir}/pmdk_debug/librpmem.so
%{_libdir}/pmdk_debug/librpmem.so.*
%{_libdir}/pmdk_debug/librpmem.a
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n rpmemd
Group: __GROUP_SYS_BASE__
Summary: Target node process executed by librpmem
Requires: libfabric >= %{min_libfabric_ver}
%description -n rpmemd
The rpmemd process is executed on a target node by librpmem library
and facilitates access to persistent memory over RDMA.
%files -n rpmemd
%{_bindir}/rpmemd
%{_mandir}/man1/rpmemd.1.gz
%endif # _with_rpmem
%package -n libpmemcto__PKG_NAME_SUFFIX__
Summary: Close-to-Open Persistence library
Group: __GROUP_SYS_LIBS__
Requires: libpmem__PKG_NAME_SUFFIX__ >= %{version}-%{release}
%description -n libpmemcto__PKG_NAME_SUFFIX__
The libpmemcto library is a Persistent Memory allocator with no overhead
imposed by run-time flushing or transactional updates.
%files -n libpmemcto__PKG_NAME_SUFFIX__
%defattr(-,root,root,-)
%{_libdir}/libpmemcto.so.*
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmemcto-devel
Summary: Development files for Close-to-Open Persistence library
Group: __GROUP_DEV_LIBS__
Requires: libpmemcto__PKG_NAME_SUFFIX__ = %{version}-%{release}
Requires: libpmem-devel = %{version}-%{release}
%description -n libpmemcto-devel
The libpmemcto library is a Persistent Memory allocator with no overhead
imposed by run-time flushing or transactional updates.
%files -n libpmemcto-devel
%defattr(-,root,root,-)
%{_libdir}/libpmemcto.so
%{_libdir}/libpmemcto.a
%{_libdir}/pkgconfig/libpmemcto.pc
%{_includedir}/libpmemcto.h
%{_mandir}/man7/libpmemcto.7.gz
%{_mandir}/man5/poolset.5.gz
%{_mandir}/man3/pmemcto*.3.gz
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package -n libpmemcto-debug
Summary: Debug variant of the Close-to-Open Persistence library
Group: __GROUP_DEV_LIBS__
Requires: libpmemcto__PKG_NAME_SUFFIX__ = %{version}-%{release}
%description -n libpmemcto-debug
The libpmemcto library is a Persistent Memory allocator with no overhead
imposed by run-time flushing or transactional updates.
This sub-package contains debug variant of the library, providing
run-time assertions and trace points. The typical way to access the
debug version is to set the environment variable LD_LIBRARY_PATH to
/usr/lib64/pmdk_debug.
%files -n libpmemcto-debug
%defattr(-,root,root,-)
%dir %{_libdir}/pmdk_debug
%{_libdir}/pmdk_debug/libpmemcto.so
%{_libdir}/pmdk_debug/libpmemcto.so.*
%{_libdir}/pmdk_debug/libpmemcto.a
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%package tools
Summary: Utilities for Persistent Memory
Group: __GROUP_SYS_BASE__
Requires: libpmem__PKG_NAME_SUFFIX__ >= %{version}-%{release}
Requires: libpmemlog__PKG_NAME_SUFFIX__ >= %{version}-%{release}
Requires: libpmemblk__PKG_NAME_SUFFIX__ >= %{version}-%{release}
Requires: libpmemobj__PKG_NAME_SUFFIX__ >= %{version}-%{release}
Requires: libpmempool__PKG_NAME_SUFFIX__ >= %{version}-%{release}
Requires: libpmemcto__PKG_NAME_SUFFIX__ >= %{version}-%{release}
%description tools
Useful applications for administration and diagnosis of persistent memory.
%files tools
%{_bindir}/pmempool
%{_mandir}/man1/pmempool.1.gz
%{_mandir}/man1/pmempool-*.1.gz
%config(noreplace) %{_sysconfdir}/bash_completion.d/pmempool.sh
%license LICENSE
%doc ChangeLog CONTRIBUTING.md README.md
%prep
%setup -q -n %{name}-%{version}
%build
# For debug build default flags may be overriden to disable compiler
# optimizations.
CFLAGS="%{optflags}" \
make %{?_smp_mflags} __MAKE_FLAGS__
# Override LIB_AR with empty string to skip installation of static libraries
%install
make install DESTDIR=%{buildroot} \
prefix=%{_prefix} \
libdir=%{_libdir} \
includedir=%{_includedir} \
mandir=%{_mandir} \
bindir=%{_bindir} \
sysconfdir=%{_sysconfdir} \
docdir=%{_docdir} \
CPP_DOC_DIR=libpmemobj++-devel
mkdir -p %{buildroot}%{_datadir}/pmdk
cp utils/pmdk.magic %{buildroot}%{_datadir}/pmdk/
__MAKE_INSTALL_FDUPES__
%check
%if "%{_check}" == "1"
%if "%{_testconfig}" != "default"
cp %{_testconfig} src/test/testconfig.sh
%else
echo "PMEM_FS_DIR=/tmp" > src/test/testconfig.sh
echo "PMEM_FS_DIR_FORCE_PMEM=1" >> src/test/testconfig.sh
%endif
make check
%else
echo "Check skipped"
%endif
%post -n libpmem__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%postun -n libpmem__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%post -n libpmemblk__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%postun -n libpmemblk__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%post -n libpmemlog__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%postun -n libpmemlog__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%post -n libpmemobj__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%postun -n libpmemobj__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%post -n libvmem__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%postun -n libvmem__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%post -n libvmmalloc__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%postun -n libvmmalloc__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%post -n libpmempool__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%postun -n libpmempool__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%post -n libpmemcto__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%postun -n libpmemcto__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%if %{with rpmem}
%post -n librpmem__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%postun -n librpmem__PKG_NAME_SUFFIX__ -p /sbin/ldconfig
%endif
%if 0%{?__debug_package} == 0
%debug_package
%endif
%changelog