File nvml.spec of Package nvml
#
# spec file for package nvml
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: nvml
Version: 0.2
Release: 0
Summary: Non-Volatile Memory Library
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Url: http://pmem.io/nvml/
#Git-Clone: git://github.com/pmem/nvml
Source: https://github.com/pmem/nvml/archive/%version.tar.gz
BuildRequires: autoconf
BuildRequires: libuuid-devel
BuildRequires: man
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Depends on xmmintrin
ExclusiveArch: x86_64
%description
The NVM Library is a collection of libraries for using memory-mapped
persistence, optimized specifically for persistent memory.
%package tools
Summary: Utilities for Persistent Memory
Group: System/Base
%description tools
Useful applications for administration and diagnosis of persistent memory.
%package -n libpmem1
Summary: Low-level persistent memory support library
Group: System/Libraries
Recommends: %name
%description -n libpmem1
libpmem provides low level persistent memory support, in particular,
support for the persistent memory instructions for flushing changes
to pmem.
%package -n libpmem-devel
Summary: Development files for the low-level persistent memory library
Group: Development/Libraries/C and C++
Requires: libpmem1 = %version
%description -n libpmem-devel
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.
%package -n libpmemblk1
Summary: Persistent Memory Resident Block library
Group: System/Libraries
%description -n libpmemblk1
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).
%package -n libpmemblk-devel
Summary: Development files for the Persistent Memory Resident Block library
Group: Development/Libraries/C and C++
Requires: libpmemblk1 = %version
%description -n libpmemblk-devel
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.
%package -n libpmemlog1
Summary: Persistent Memory Resident Log File library
Group: System/Libraries
%description -n libpmemlog1
The libpmemlog library provides a pmem-resident log file. This is
useful for programs like databases that append frequently to a log
file.
%package -n libpmemlog-devel
Summary: Development files for the Persistent Memory Resident Log File library
Group: Development/Libraries/C and C++
Requires: libpmemlog1 = %version
%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.
%package -n libpmemobj1
Summary: Persistent Memory Transactional Object Store library
Group: System/Libraries
%description -n libpmemobj1
The libpmemobj library provides a transactional object store,
providing memory allocation, transactions, and general facilities for
persistent memory programming.
%package -n libpmemobj-devel
Summary: Development files for the Persistent Memory Transactional Object Store library
Group: Development/Libraries/C and C++
Requires: libpmemobj1 = %version
%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.
%package -n libvmem1
Summary: Volatile Memory Pool library
Group: System/Libraries
%description -n libvmem1
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.
%package -n libvmem-devel
Summary: Development files for the Volatile Memory library
Group: Development/Libraries/C and C++
Requires: libvmem1 = %version
%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 subpackage contains libraries and header files for developing
applications that want to make use of libvmem.
%package -n libvmmalloc1
Summary: Dynamic to Persistent Memory allocation translation library
Group: System/Libraries
%description -n libvmmalloc1
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.
%package -n libvmmalloc-devel
Summary: Development files for the Dynamic-to-Persistent allocation library
Group: Development/Libraries/C and C++
Requires: libvmmalloc1 = %version
%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 subpackage contains libraries and header files for developing
applications that want to specifically make use of libvmmalloc.
%prep
%setup -q
%build
# remaining issues:
# * jemalloc attempts to use __builtin_clz, this might not always work
# * .map files look flakey: they lack a monotonically increasing identifier
# * stupid Makefiles: setting CFLAGS breaks the build
#
make %{?_smp_mflags} BINDIR="%_bindir"
%install
b="%buildroot"
make install DESTDIR="$b"
rm -f "$b/%_libdir"/*.a "$b/%_libdir/nvml_debug"/*.a
mkdir -p "$b/%_datadir/nvml"
cp utils/nvml.magic "$b/%_datadir/nvml/"
%check
cp src/test/testconfig.sh.example src/test/testconfig.sh
#make check
%post -n libpmem1 -p /sbin/ldconfig
%postun -n libpmem1 -p /sbin/ldconfig
%post -n libpmemblk1 -p /sbin/ldconfig
%postun -n libpmemblk1 -p /sbin/ldconfig
%post -n libpmemlog1 -p /sbin/ldconfig
%postun -n libpmemlog1 -p /sbin/ldconfig
%post -n libpmemobj1 -p /sbin/ldconfig
%postun -n libpmemobj1 -p /sbin/ldconfig
%post -n libvmem1 -p /sbin/ldconfig
%postun -n libvmem1 -p /sbin/ldconfig
%post -n libvmmalloc1 -p /sbin/ldconfig
%postun -n libvmmalloc1 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%_datadir/nvml/
%files tools
%defattr(-,root,root)
%config %_sysconfdir/bash_completion.d/pmempool.sh
%_bindir/pmempool
%_mandir/man1/pmempool.1*
%_mandir/man1/pmempool-info.1*
%_mandir/man1/pmempool-create.1*
%_mandir/man1/pmempool-dump.1*
%_mandir/man1/pmempool-check.1*
%doc LICENSE
%files -n libpmem1
%defattr(-,root,root)
%_libdir/libpmem.so.1*
%files -n libpmem-devel
%defattr(-,root,root)
%_libdir/libpmem.so
%dir %_libdir/nvml_debug/
%_libdir/nvml_debug/libpmem.so*
%_includedir/libpmem.h
%_mandir/man3/libpmem.3*
%files -n libpmemblk1
%defattr(-,root,root)
%_libdir/libpmemblk.so.1*
%files -n libpmemblk-devel
%defattr(-,root,root)
%_libdir/libpmemblk.so
%dir %_libdir/nvml_debug/
%_libdir/nvml_debug/libpmemblk.so*
%_includedir/libpmemblk.h
%_mandir/man3/libpmemblk.3*
%files -n libpmemlog1
%defattr(-,root,root)
%_libdir/libpmemlog.so.1*
%files -n libpmemlog-devel
%defattr(-,root,root)
%_libdir/libpmemlog.so
%dir %_libdir/nvml_debug/
%_libdir/nvml_debug/libpmemlog.so*
%_includedir/libpmemlog.h
%_mandir/man3/libpmemlog.3*
%files -n libpmemobj1
%defattr(-,root,root)
%_libdir/libpmemobj.so.1*
%files -n libpmemobj-devel
%defattr(-,root,root)
%_libdir/libpmemobj.so
%dir %_libdir/nvml_debug/
%_libdir/nvml_debug/libpmemobj.so*
%_includedir/libpmemobj.h
%_mandir/man3/libpmemobj.3*
%files -n libvmem1
%defattr(-,root,root)
%_libdir/libvmem.so.1*
%files -n libvmem-devel
%defattr(-,root,root)
%_libdir/libvmem.so
%dir %_libdir/nvml_debug/
%_libdir/nvml_debug/libvmem.so*
%_includedir/libvmem.h
%_mandir/man3/libvmem.3*
%files -n libvmmalloc1
%defattr(-,root,root)
%_libdir/libvmmalloc.so.1*
%files -n libvmmalloc-devel
%defattr(-,root,root)
%_libdir/libvmmalloc.so
%dir %_libdir/nvml_debug/
%_libdir/nvml_debug/libvmmalloc.so*
%_includedir/libvmmalloc.h
%_mandir/man3/libvmmalloc.3*
%changelog