Blame libpsm2.spec.in

Packit 961e70
#
Packit 961e70
#  This file is provided under a dual BSD/GPLv2 license.  When using or
Packit 961e70
#  redistributing this file, you may do so under either license.
Packit 961e70
#
Packit 961e70
#  GPL LICENSE SUMMARY
Packit 961e70
#
Packit 961e70
#  Copyright(c) 2017 Intel Corporation.
Packit 961e70
#
Packit 961e70
#  This program is free software; you can redistribute it and/or modify
Packit 961e70
#  it under the terms of version 2 of the GNU General Public License as
Packit 961e70
#  published by the Free Software Foundation.
Packit 961e70
#
Packit 961e70
#  This program is distributed in the hope that it will be useful, but
Packit 961e70
#  WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 961e70
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 961e70
#  General Public License for more details.
Packit 961e70
#
Packit 961e70
#  Contact Information:
Packit 961e70
#  Intel Corporation, www.intel.com
Packit 961e70
#
Packit 961e70
#  BSD LICENSE
Packit 961e70
#
Packit 961e70
#  Copyright(c) 2017 Intel Corporation.
Packit 961e70
#
Packit 961e70
#  Redistribution and use in source and binary forms, with or without
Packit 961e70
#  modification, are permitted provided that the following conditions
Packit 961e70
#  are met:
Packit 961e70
#
Packit 961e70
#    * Redistributions of source code must retain the above copyright
Packit 961e70
#      notice, this list of conditions and the following disclaimer.
Packit 961e70
#    * Redistributions in binary form must reproduce the above copyright
Packit 961e70
#      notice, this list of conditions and the following disclaimer in
Packit 961e70
#      the documentation and/or other materials provided with the
Packit 961e70
#      distribution.
Packit 961e70
#    * Neither the name of Intel Corporation nor the names of its
Packit 961e70
#      contributors may be used to endorse or promote products derived
Packit 961e70
#      from this software without specific prior written permission.
Packit 961e70
#
Packit 961e70
#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Packit 961e70
#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Packit 961e70
#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Packit 961e70
#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Packit 961e70
#  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Packit 961e70
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Packit 961e70
#  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Packit 961e70
#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Packit 961e70
#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Packit 961e70
#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Packit 961e70
#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit 961e70
#
Packit 961e70
Summary: Intel PSM2 Libraries
Packit 961e70
Name: @RPM_NAME@
Packit 961e70
Version: @VERSION@
Packit 961e70
Release: 1@SPEC_FILE_RELEASE_DIST@
Packit 961e70
License: BSD or GPLv2
Packit 961e70
URL: https://github.com/intel/opa-psm2/
Packit 961e70
Packit 961e70
# The tarball can be created by:
Packit 961e70
# git clone https://github.com/intel/opa-psm2
Packit 961e70
# cd opa-psm2
Packit 961e70
# git checkout @DIST_SHA@
Packit 961e70
# make dist
Packit 961e70
Source0: @RPM_NAME@-%{version}.tar.gz
Packit 961e70
Packit 961e70
# The OPA product is supported on x86_64 only:
Packit 961e70
ExclusiveArch: x86_64
Packit 961e70
Packit 961e70
BuildRequires: gcc
Packit 961e70
Provides: hfi1-psm
Packit 961e70
Obsoletes: hfi1-psm < 1.0.0
Packit 961e70
Packit 961e70
%if "@RPM_NAME_BASEEXT@"
Packit 961e70
%package -n @RPM_NAME@@RPM_NAME_BASEEXT@
Packit 961e70
Summary: Intel PSM2 Libraries
Packit Service 7ed5cc
%endif
Packit 961e70
Provides: @RPM_NAME@ = %{version}-%{release}
Packit 961e70
Provides: @RPM_NAME@%{_isa} = %{version}-%{release}
Packit 961e70
%if 0%{?suse_version}
Packit 961e70
BuildRequires: libnuma-devel
Packit 961e70
Requires: libnuma1
Packit 961e70
%else
Packit 961e70
%if 0%{?rhel}==0 || 0%{?rhel} > 6
Packit 961e70
BuildRequires: systemd
Packit 961e70
BuildRequires: numactl-devel
Packit 961e70
Requires: numactl-libs
Packit 961e70
%endif
Packit 961e70
%endif
Packit 961e70
Packit 961e70
%package -n @RPM_NAME@-devel
Packit 961e70
Summary: Development files for Intel PSM2
Packit 961e70
Requires: %{name}%{?_isa} = %{version}-%{release}
Packit 961e70
Provides: hfi1-psm-devel
Packit 961e70
Obsoletes: hfi1-psm-devel < 1.0.0
Packit 961e70
Packit 961e70
%package -n @RPM_NAME@-compat
Packit 961e70
Summary: Compat library for Intel PSM2
Packit 961e70
Requires: %{name}%{?_isa} = %{version}-%{release}
Packit 961e70
%if 0%{?fedora}
Packit 961e70
Requires: systemd-udev
Packit 961e70
%endif
Packit 961e70
Provides: hfi1-psm-compat
Packit 961e70
Obsoletes: hfi1-psm-compat < 1.0.0
Packit 961e70
Packit 961e70
# If an alternate basename is defined, like in SLES >=12.3
Packit 961e70
# Then we generate a different base src.rpm, so use this
Packit 961e70
# description instead.
Packit 961e70
%if "@RPM_NAME_BASEEXT@"
Packit 961e70
%description
Packit 961e70
The source code for the PSM2 messaging API, libpsm2.
Packit 961e70
A low-level user-level communications interface for the Intel(R) OPA
Packit 961e70
family of products. PSM2 users are enabled with mechanisms
Packit 961e70
necessary to implement higher level communications
Packit 961e70
interfaces in parallel environments.
Packit 961e70
%endif
Packit 961e70
Packit 961e70
# In distro's other than SLES >=12.3 we use a single description
Packit 961e70
# for both the .src.rpm and the base binary rpm. As the
Packit 961e70
# RPM_NAME_BASEEXT defaults to empty contents.
Packit 961e70
%description -n @RPM_NAME@@RPM_NAME_BASEEXT@
Packit 961e70
PSM2 Messaging API, or PSM2 API, is the low-level
Packit 961e70
user-level communications interface for the Intel(R) OPA
Packit 961e70
family of products. PSM2 users are enabled with mechanisms
Packit 961e70
necessary to implement higher level communications
Packit 961e70
interfaces in parallel environments.
Packit 961e70
Packit 961e70
%description -n @RPM_NAME@-devel
Packit 961e70
Intel(R) PSM2, psm2*.h, headers and libpsm2.so files necessary
Packit 961e70
for developing software using libpsm2.
Packit 961e70
Packit 961e70
%description -n @RPM_NAME@-compat
Packit 961e70
Support for MPIs linked with PSM versions < 2. This will allow
Packit 961e70
software compiled to use Intel(R) Truescale PSM, libinfinipath, to run
Packit 961e70
with Intel(R) OPA PSM2, libpsm2.
Packit 961e70
Packit 961e70
%prep
Packit 961e70
%setup -q -n @RPM_NAME@-%{version}
Packit 961e70
Packit 961e70
%build
Packit 961e70
make %{?_smp_mflags}
Packit 961e70
Packit 961e70
%install
Packit 961e70
%make_install
Packit 961e70
Packit 961e70
%post -p /sbin/ldconfig
Packit 961e70
%postun -p /sbin/ldconfig
Packit 961e70
Packit 961e70
%files -n @RPM_NAME@@RPM_NAME_BASEEXT@
Packit 961e70
%if 0%{?rhel} && 0%{?rhel} < 7
Packit 961e70
%{!?_licensedir:%global license %doc}
Packit 961e70
%endif
Packit 961e70
%license COPYING
Packit 961e70
%{_libdir}/@TARGLIB@.so.@MAJOR@.@MINOR@
Packit 961e70
%{_libdir}/@TARGLIB@.so.@MAJOR@
Packit 961e70
@40_PSM_RULES@
Packit 961e70
Packit 961e70
%files -n @RPM_NAME@-devel
Packit 961e70
%{_libdir}/@TARGLIB@.so
Packit 961e70
%{_libdir}/@TARGLIB@.a
Packit 961e70
%{_includedir}/psm2.h
Packit 961e70
%{_includedir}/psm2_mq.h
Packit 961e70
%{_includedir}/psm2_am.h
Packit 961e70
%{_includedir}/hfi1diag
Packit 961e70
Packit 961e70
%files -n @RPM_NAME@-compat
Packit 961e70
%{_libdir}/psm2-compat
Packit 961e70
%if 0%{?rhel} && 0%{?rhel} < 7
Packit 961e70
@UDEVDIR@/rules.d/40-psm-compat.rules
Packit 961e70
%else
Packit 961e70
%{_udevrulesdir}/40-psm-compat.rules
Packit 961e70
%endif
Packit 961e70
@LIBPSM2_COMPAT_SYM_CONF_DIR@/modprobe.d/libpsm2-compat.conf
Packit 961e70
%{_prefix}/lib/libpsm2
Packit 961e70
Packit 961e70
%changelog
Packit 961e70
* Wed Aug 30 2017 Rusell McGuire <russell.w.mcguire@intel.com>
Packit 961e70
- Adjust RPM names to match SLES 12.3 distro names
Packit 961e70
* Tue Apr 05 2016 Paul Reger <paul.j.reger@intel.com>
Packit 961e70
- Upstream PSM2 source code for Fedora.