%define build_version 02.00.00.3446 %define platform_type purley Name: ipmctl Version: %{build_version} Release: 1%{?dist} Summary: Utility for managing Intel Optane DC persistent memory modules License: BSD URL: https://github.com/intel/ipmctl Source: https://github.com/intel/ipmctl/archive/v%{version}/%{name}-%{version}.tar.gz ExclusiveArch: x86_64 Requires: libipmctl%{?_isa} = %{version}-%{release} BuildRequires: pkgconfig(libndctl) BuildRequires: pkgconfig(safec-3.3) BuildRequires: cmake %if 0%{?fedora} BuildRequires: python2 %endif %if 0%{?rhel} BuildRequires: python %endif BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: asciidoctor Obsoletes: ixpdimm-cli < 01.00.00.3000 %description Utility for managing Intel Optane DC persistent memory modules Supports functionality to: Discover DCPMMs on the platform. Provision the platform memory configuration. View and update the firmware on DCPMMs. Configure data-at-rest security on DCPMMs. Monitor DCPMM health. Track performance of DCPMMs. Debug and troubleshoot DCPMMs. %prep %setup -q -n %{name}-%{version} %package -n ipmctl-monitor Summary: Daemon for monitoring the status of Intel DCPMM Requires: libipmctl%{?_isa} = %{version}-%{release} %{?systemd_requires} BuildRequires: systemd Obsoletes: ixpdimm-monitor < 01.00.00.3000 %description -n ipmctl-monitor A monitor daemon for monitoring the health and status of Intel Optane DC persistent memory modules %package -n libipmctl Summary: Library for Intel DCPMM management Obsoletes: ixpdimm_sw < 01.00.00.3000 Obsoletes: libixpdimm-common < 01.00.00.3000 Obsoletes: libixpdimm-core < 01.00.00.3000 Obsoletes: libixpdimm-cli < 01.00.00.3000 Obsoletes: libixpdimm-cim < 01.00.00.3000 Obsoletes: libixpdimm < 01.00.00.3000 Obsoletes: ixpdimm-data < 01.00.00.3000 %description -n libipmctl An Application Programming Interface (API) library for managing Intel Optane DC persistent memory modules. %package -n libipmctl-devel Summary: Development packages for libipmctl Requires: libipmctl%{?_isa} = %{version}-%{release} Obsoletes: ixpdimm-devel < 01.00.00.3000 Obsoletes: ixpdimm_sw-devel < 01.00.00.3000 %description -n libipmctl-devel API for development of Intel Optane DC persistent memory management utilities. %build %if "%{platform_type}" == "purley" %cmake -DBUILDNUM=%{version} -DCMAKE_INSTALL_PREFIX=/ \ -DLINUX_PRODUCT_NAME=%{name} \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ -DCMAKE_INSTALL_BINDIR=%{_bindir} \ -DCMAKE_INSTALL_DATAROOTDIR=%{_datadir} \ -DCMAKE_INSTALL_MANDIR=%{_mandir} \ -DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \ -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \ -DINSTALL_UNITDIR=%{_unitdir} \ -DRELEASE=ON \ -DSAFECLIB_SRC_DOWNLOAD_AND_STATIC_LINK=OFF \ -DRPM_BUILD=ON %else %cmake -DBUILDNUM=%{version} -DCMAKE_INSTALL_PREFIX=/ \ -DLINUX_PRODUCT_NAME=%{name} \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ -DCMAKE_INSTALL_BINDIR=%{_bindir} \ -DCMAKE_INSTALL_DATAROOTDIR=%{_datadir} \ -DCMAKE_INSTALL_MANDIR=%{_mandir} \ -DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \ -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \ -DINSTALL_UNITDIR=%{_unitdir} \ -DRELEASE=ON \ -DRPM_BUILD=ON \ -DSAFECLIB_SRC_DOWNLOAD_AND_STATIC_LINK=OFF \ -DWHITLEY=ON %endif %make_build %install %{!?_cmake_version: cd build} %make_install -f Makefile %post -n ipmctl-monitor %systemd_post ipmctl-monitor.service %post -n libipmctl -p /sbin/ldconfig %postun -n libipmctl -p /sbin/ldconfig %preun -n ipmctl-monitor %systemd_preun stop ipmctl-monitor.service %postun -n ipmctl-monitor %systemd_postun_with_restart ipmctl-monitor.service %files -n ipmctl %{_bindir}/ipmctl %{_mandir}/man1/ipmctl* %files -n ipmctl-monitor %{_bindir}/ipmctl-monitor %{_unitdir}/ipmctl-monitor.service %files -n libipmctl %{_libdir}/libipmctl.so.3* %dir %{_datadir}/doc/ipmctl %doc %{_datadir}/doc/ipmctl/ipmctl_default.conf %config(noreplace) %{_datadir}/ipmctl/ipmctl.conf %dir %{_localstatedir}/log/ipmctl %config(noreplace) %{_sysconfdir}/logrotate.d/ipmctl.conf %files -n libipmctl-devel %{_libdir}/libipmctl.so %{_includedir}/nvm_types.h %{_includedir}/nvm_management.h %{_includedir}/export_api.h %{_includedir}/NvmSharedDefs.h %{_libdir}/pkgconfig/libipmctl.pc %changelog * Mon Sep 17 2018 Juston Li - 01.00.00.3262-1 - Clean up spec for fedora review * Wed May 02 2018 Juston Li - 01.00.00.3000-1 - initial spec