File ipmctl.spec of Package ipmctl
156
1
#
2
# spec file for package ipmctl
3
#
4
# Copyright (c) 2020 SUSE LLC
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
19
%define abi 4
20
#define vgit .1547861714.b7a59da
21
%define vgit %{nil}
22
23
Name: ipmctl
24
Version: 02.00.00.3733
25
Release: 0
26
Summary: Utility for managing Intel Optane persistent memory modules
27
License: BSD-3-Clause
28
Group: System/Management
29
URL: https://github.com/intel/ipmctl
30
%if "%{vgit}" == ""
31
Source: https://github.com/intel/ipmctl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
32
%else
33
Source: %{name}-%{version}%{vgit}.tar.gz
34
%endif
35
Source1: ChangeLog.xz
36
Source2: %{name}-rpmlintrc
37
Patch1: ipmctl-python3.patch
38
39
Recommends: logrotate
40
%if %{defined pythons}
41
BuildRequires: %{pythons}
42
%else
43
BuildRequires: python
44
%endif
45
BuildRequires: cmake
46
BuildRequires: gcc-c++
47
BuildRequires: pkgconfig
48
BuildRequires: systemd-rpm-macros
49
BuildRequires: pkgconfig(libndctl) >= 58.2
50
BuildRequires: pkgconfig(systemd)
51
# required for documentation
52
BuildRequires: rubygem(asciidoctor)
53
54
# no 'Conflicts' for 'zypper patch'
55
Obsoletes: lib%{name}2
56
# for impctl
57
Obsoletes: ixpdimm-cli < 01.00.00.3000
58
# for (obsoleted) libipmctl2 et.al.
59
Obsoletes: ipmctl-data < %{version}
60
Obsoletes: ixpdimm-data < 01.00.00.3000
61
Obsoletes: ixpdimm_sw < 01.00.00.3000
62
Obsoletes: libixpdimm < 01.00.00.3000
63
Obsoletes: libixpdimm-cim < 01.00.00.3000
64
Obsoletes: libixpdimm-cli < 01.00.00.3000
65
Obsoletes: libixpdimm-common < 01.00.00.3000
66
Obsoletes: libixpdimm-core < 01.00.00.3000
67
68
ExclusiveArch: x86_64
69
70
%description
71
Utility for managing Intel Optane persistent memory modules (PMem module)
72
Supports functionality to:
73
- Discover PMem modules on the platform.
74
- Provision the platform memory configuration.
75
- View and update the firmware on PMem modules.
76
- Configure data-at-rest security on PMem modules.
77
- Monitor PMem module health.
78
- Track performance of PMem modules.
79
- Debug and troubleshoot PMem modules.
80
81
%package devel
82
Summary: Development packages for %{name}
83
Group: Development/Libraries/C and C++
84
Requires: %{name} = %{version}
85
Obsoletes: ixpdimm-devel < 01.00.00.3000
86
Obsoletes: ixpdimm_sw-devel < 01.00.00.3000
87
88
%description devel
89
API for development of Intel Optane persistent memory management utilities.
90
91
%prep
92
%setup -q -n %{name}-%{version}%{vgit}
93
%patch1 -p1
94
95
perl -pi.00 -e '
96
s[(CMAKE_INSTALL_)DATAROOT(DIR\})/ipmctl][${1}SYSCONF${2}];
97
s[(INI_INSTALL_FILEPATH "\$\{CMAKE_INSTALL_)DATAROOT(DIR\}")][${1}SYSCONF${2}];
98
s[(-DINI_INSTALL_FILEPATH="\$\{INI_INSTALL_FILEPATH\})/ipmctl][${1}];
99
' CMakeLists.txt
100
diff -u CMakeLists.txt{.00,} || sleep 4
101
102
! grep -lri 'INTEL CONFIDENTIAL' || exit 1
103
104
%build
105
%cmake -DBUILDNUM=%{version} -DCMAKE_INSTALL_PREFIX=/ \
106
-DLINUX_PRODUCT_NAME=%{name} \
107
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
108
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
109
-DCMAKE_INSTALL_BINDIR=%{_bindir} \
110
-DCMAKE_INSTALL_DATAROOTDIR=%{_datadir} \
111
-DCMAKE_INSTALL_MANDIR=%{_mandir} \
112
-DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \
113
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
114
-DINSTALL_UNITDIR=%{_unitdir} \
115
-DRELEASE=ON \
116
-DRPM_BUILD=ON
117
%make_jobs
118
119
%install
120
%cmake_install
121
mkdir -p %{buildroot}%{_sbindir}
122
rm -f %{buildroot}%{_datadir}/doc/ipmctl/ipmctl_default.conf
123
rm -f %{buildroot}%{_libdir}/*.so.%{abi}
124
install -m 444 -p "%{SOURCE1}" .
125
126
%post -p /sbin/ldconfig
127
128
%postun -p /sbin/ldconfig
129
130
%files
131
%defattr(-,root,root)
132
%license LICENSE
133
%doc README.md CONTRIBUTING.md
134
%doc ChangeLog.xz
135
%{_bindir}/%{name}
136
%{_mandir}/man1/*
137
138
#files data
139
%doc output/release/%{name}_default.conf
140
%config %{_sysconfdir}/%{name}.conf
141
%config %{_sysconfdir}/logrotate.d/%{name}
142
%dir %{_localstatedir}/log/%{name}
143
#files -n lib%%{name}%%{abi}
144
%{_libdir}/lib%{name}.so.%{abi}.*
145
146
%files devel
147
%defattr(-,root,root)
148
%{_libdir}/lib%{name}.so
149
%{_libdir}/pkgconfig/lib%{name}.pc
150
%{_includedir}/nvm_types.h
151
%{_includedir}/nvm_management.h
152
%{_includedir}/export_api.h
153
%{_includedir}/NvmSharedDefs.h
154
155
%changelog
156