anitazha / rpms / ndctl

Forked from rpms/ndctl a year ago
Clone

Blame SOURCES/0044-ndctl-Add-CXL-packages-to-the-RPM-spec.patch

e0018b
From 57b1484fa427228afd52cdfa4fa3916a7a5878bf Mon Sep 17 00:00:00 2001
e0018b
From: Ira Weiny <ira.weiny@intel.com>
e0018b
Date: Thu, 7 Oct 2021 02:21:37 -0600
e0018b
Subject: [PATCH 044/217] ndctl: Add CXL packages to the RPM spec
e0018b
e0018b
Add CXL related packages - the cxl-cli utility, the libcxl library, and
e0018b
development headers to respective RPM packages in the main spec file.
e0018b
e0018b
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
e0018b
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
e0018b
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
e0018b
---
e0018b
 Makefile.am   |  4 ++++
e0018b
 ndctl.spec.in | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
e0018b
 2 files changed, 53 insertions(+)
e0018b
e0018b
diff --git a/Makefile.am b/Makefile.am
e0018b
index e2f6bef..fa2010a 100644
e0018b
--- a/Makefile.am
e0018b
+++ b/Makefile.am
e0018b
@@ -23,17 +23,21 @@ CLEANFILES += $(noinst_SCRIPTS)
e0018b
 
e0018b
 do_rhel_subst = sed -e 's,VERSION,$(VERSION),g' \
e0018b
             -e 's,DAX_DNAME,daxctl-devel,g' \
e0018b
+            -e 's,CXL_DNAME,cxl-devel,g' \
e0018b
             -e 's,DNAME,ndctl-devel,g' \
e0018b
             -e '/^%defattr.*/d' \
e0018b
 	    -e 's,DAX_LNAME,daxctl-libs,g' \
e0018b
+	    -e 's,CXL_LNAME,cxl-libs,g' \
e0018b
 	    -e 's,LNAME,ndctl-libs,g'
e0018b
 
e0018b
 do_sles_subst = sed -e 's,VERSION,$(VERSION),g' \
e0018b
             -e 's,DAX_DNAME,libdaxctl-devel,g' \
e0018b
+            -e 's,CXL_DNAME,libcxl-devel,g' \
e0018b
             -e 's,DNAME,libndctl-devel,g' \
e0018b
             -e 's,%license,%doc,g' \
e0018b
             -e 's,\(^License:.*GPL\)v2,\1-2.0,g' \
e0018b
             -e "s,DAX_LNAME,libdaxctl$$(($(LIBDAXCTL_CURRENT) - $(LIBDAXCTL_AGE))),g" \
e0018b
+            -e "s,CXL_LNAME,libcxl$$(($(LIBCXL_CURRENT) - $(LIBCXL_AGE))),g" \
e0018b
             -e "s,LNAME,libndctl$$(($(LIBNDCTL_CURRENT) - $(LIBNDCTL_AGE))),g"
e0018b
 
e0018b
 rhel/ndctl.spec: ndctl.spec.in Makefile.am version.m4
e0018b
diff --git a/ndctl.spec.in b/ndctl.spec.in
e0018b
index 0563b2d..4b08c05 100644
e0018b
--- a/ndctl.spec.in
e0018b
+++ b/ndctl.spec.in
e0018b
@@ -8,6 +8,7 @@ Source0:	https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{v
e0018b
 
e0018b
 Requires:	LNAME%{?_isa} = %{version}-%{release}
e0018b
 Requires:	DAX_LNAME%{?_isa} = %{version}-%{release}
e0018b
+Requires:	CXL_LNAME%{?_isa} = %{version}-%{release}
e0018b
 BuildRequires:	autoconf
e0018b
 %if 0%{?rhel} < 9
e0018b
 BuildRequires:	asciidoc
e0018b
@@ -54,6 +55,24 @@ the Linux kernel Device-DAX facility. This facility enables DAX mappings
e0018b
 of performance / feature differentiated memory without need of a
e0018b
 filesystem.
e0018b
 
e0018b
+%package -n cxl-cli
e0018b
+Summary:	Manage CXL devices
e0018b
+License:	GPLv2
e0018b
+Requires:	CXL_LNAME%{?_isa} = %{version}-%{release}
e0018b
+
e0018b
+%description -n cxl-cli
e0018b
+The cxl utility provides enumeration and provisioning commands for
e0018b
+the Linux kernel CXL devices.
e0018b
+
e0018b
+%package -n CXL_DNAME
e0018b
+Summary:	Development files for libcxl
e0018b
+License:	LGPLv2
e0018b
+Requires:	CXL_LNAME%{?_isa} = %{version}-%{release}
e0018b
+
e0018b
+%description -n CXL_DNAME
e0018b
+This package contains libraries and header files for developing applications
e0018b
+that use libcxl, a library for enumerating and communicating with CXL devices.
e0018b
+
e0018b
 %package -n DAX_DNAME
e0018b
 Summary:	Development files for libdaxctl
e0018b
 License:	LGPLv2
e0018b
@@ -84,6 +103,13 @@ Device DAX is a facility for establishing DAX mappings of performance /
e0018b
 feature-differentiated memory. DAX_LNAME provides an enumeration /
e0018b
 control API for these devices.
e0018b
 
e0018b
+%package -n CXL_LNAME
e0018b
+Summary:	Management library for CXL devices
e0018b
+License:	LGPLv2
e0018b
+
e0018b
+%description -n CXL_LNAME
e0018b
+libcxl is a library for enumerating and communicating with CXL devices.
e0018b
+
e0018b
 
e0018b
 %prep
e0018b
 %setup -q ndctl-%{version}
e0018b
@@ -105,6 +131,8 @@ make check
e0018b
 
e0018b
 %ldconfig_scriptlets -n DAX_LNAME
e0018b
 
e0018b
+%ldconfig_scriptlets -n CXL_LNAME
e0018b
+
e0018b
 %define bashcompdir %(pkg-config --variable=completionsdir bash-completion)
e0018b
 
e0018b
 %files
e0018b
@@ -126,6 +154,12 @@ make check
e0018b
 %{_mandir}/man1/daxctl*
e0018b
 %{_datadir}/daxctl/daxctl.conf
e0018b
 
e0018b
+%files -n cxl-cli
e0018b
+%defattr(-,root,root)
e0018b
+%license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
e0018b
+%{_bindir}/cxl
e0018b
+%{_mandir}/man1/cxl*
e0018b
+
e0018b
 %files -n LNAME
e0018b
 %defattr(-,root,root)
e0018b
 %doc README.md
e0018b
@@ -138,6 +172,12 @@ make check
e0018b
 %license LICENSES/preferred/LGPL-2.1 LICENSES/other/MIT LICENSES/other/CC0-1.0
e0018b
 %{_libdir}/libdaxctl.so.*
e0018b
 
e0018b
+%files -n CXL_LNAME
e0018b
+%defattr(-,root,root)
e0018b
+%doc README.md
e0018b
+%license LICENSES/preferred/LGPL-2.1 LICENSES/other/MIT LICENSES/other/CC0-1.0
e0018b
+%{_libdir}/libcxl.so.*
e0018b
+
e0018b
 %files -n DNAME
e0018b
 %defattr(-,root,root)
e0018b
 %license LICENSES/preferred/LGPL-2.1
e0018b
@@ -152,6 +192,15 @@ make check
e0018b
 %{_libdir}/libdaxctl.so
e0018b
 %{_libdir}/pkgconfig/libdaxctl.pc
e0018b
 
e0018b
+%files -n CXL_DNAME
e0018b
+%defattr(-,root,root)
e0018b
+%license LICENSES/preferred/LGPL-2.1
e0018b
+%{_includedir}/cxl/
e0018b
+%{_libdir}/libcxl.so
e0018b
+%{_libdir}/pkgconfig/libcxl.pc
e0018b
+%{_mandir}/man3/cxl*
e0018b
+%{_mandir}/man3/libcxl.3.gz
e0018b
+
e0018b
 
e0018b
 %changelog
e0018b
 * Fri May 27 2016 Dan Williams <dan.j.williams@intel.com> - 53-1
e0018b
-- 
e0018b
2.27.0
e0018b