[packages/xpmem] - new
qboosh
qboosh at pld-linux.org
Fri Jun 13 18:36:35 CEST 2025
commit b1d05ae18406d6bd85ec408bf13fc99fe0da498f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Jun 13 18:14:27 2025 +0200
- new
xpmem-pc.patch | 14 +++++++
xpmem.spec | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 143 insertions(+)
---
diff --git a/xpmem.spec b/xpmem.spec
new file mode 100644
index 0000000..a05dfe0
--- /dev/null
+++ b/xpmem.spec
@@ -0,0 +1,129 @@
+# TODO:
+# - actually build kernel module
+# - fix and package xpmem.rules (wrong dir, MODE=0666 looks evil)
+#
+# Conditional build:
+%bcond_without static_libs # static library
+%bcond_without userspace # user space library
+%bcond_with kernel # kernel module
+#
+Summary: XPMEM library
+Summary(pl.UTF-8): Bibliotek XPMEM
+Name: xpmem
+# project version is 0.2 (configure.ac /AC_INIT, xpmem-lib.spec), kernel module versioned as 2.6.5 (xpmem-kmod.spec)
+Version: 0.2
+%define gitref 3bcab55479489fdd93847fa04c58ab16e9c0b3fd
+%define snap 20240912
+%define rel 1
+Release: 0.%{snap}.1
+License: LGPL v2.1 (library), GPL v2 (kernel module)
+Group: Libraries
+Source0: https://github.com/hpc/xpmem/archive/%{gitref}/%{name}-%{snap}.tar.gz
+# Source0-md5: f4292bba7b436646f831ea3d254f29b9
+Patch0: %{name}-pc.patch
+URL: https://github.com/hpc/xpmem
+BuildRequires: autoconf >= 2.50
+BuildRequires: automake >= 1:1.1
+BuildRequires: libtool
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+XPMEM is a Linux kernel module that enables a process to map the
+memory of another process into its virtual address space.
+
+This is an experimental version of XPMEM based on a version provided
+by Cray and uploaded orignally to <https://code.google.com/p/xpmem>.
+This version supports any Linux kernel 3.12 and newer (tested up to
+5.8.x). Keep in mind there may be bugs and this version may cause
+kernel panics, code crashes, eat your cat, etc.
+
+%description -l pl.UTF-8
+XPMEM to moduł jądra Linuksa pozwalający procesowi odwzorować
+pamięć innego procesu wewnątrz własnej wirtualnej przestrzeni
+adresowej.
+
+To jest eksperymentalna wersja XPMEM oparta na wersji udostępnionej
+przez firmę Cray, pierwotnie w repozytorium
+<https://code.google.com/p/xpmem>. Obsługuje jądra Linuksa od wersji
+3.12 (testowane do 5.8.x). Uwaga, mogą być błędy, a ta wersja może
+powodować paniki jądra i awarie kodu, zjeść kota itp.
+
+%package devel
+Summary: Header files for XPMEM library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki XPMEM
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for XPMEM library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki XPMEM.
+
+%package static
+Summary: Static XPMEM library
+Summary(pl.UTF-8): Statyczna biblioteka XPMEM
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static XPMEM library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka XPMEM.
+
+%prep
+%setup -q -n %{name}-%{gitref}
+%patch -P0 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+ --disable-kernel-module \
+ --disable-silent-rules \
+ %{!?with_static_libs:--disable-static}
+
+%if %{with userspace}
+%{__make}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with userspace}
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# no external dependencies, obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libxpmem.la
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%if %{with userspace}
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README
+%attr(755,root,root) %{_libdir}/libxpmem.so.*.*.*
+%ghost %{_libdir}/libxpmem.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/libxpmem.so
+%{_includedir}/xpmem.h
+%{_pkgconfigdir}/cray-xpmem.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libxpmem.a
+%endif
+%endif
diff --git a/xpmem-pc.patch b/xpmem-pc.patch
new file mode 100644
index 0000000..1ecc6ec
--- /dev/null
+++ b/xpmem-pc.patch
@@ -0,0 +1,14 @@
+--- xpmem-3bcab55479489fdd93847fa04c58ab16e9c0b3fd/cray-xpmem.pc.in.orig 2024-09-11 20:20:15.000000000 +0200
++++ xpmem-3bcab55479489fdd93847fa04c58ab16e9c0b3fd/cray-xpmem.pc.in 2025-06-13 17:47:38.356242449 +0200
+@@ -2,11 +2,6 @@
+ includedir=@includedir@
+ libdir=@libdir@
+
+-default_bindir=@default_bindir@
+-default_fomdir=@default_fomdir@
+-default_prefix=@default_prefix@
+-default_shlibdir=@default_shlibdir@
+-
+ Cflags: -I${includedir}
+ Description: XPMEM
+ Libs: -L${libdir} -lxpmem
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xpmem.git/commitdiff/b1d05ae18406d6bd85ec408bf13fc99fe0da498f
More information about the pld-cvs-commit
mailing list