Blame SPECS/libpsm2.spec

f567cd
%global tar_name hfi1-psm-0.7-1
f567cd
Summary: Intel PSM Libraries
f567cd
Name: libpsm2
f567cd
Version: 0.7
f567cd
Release: 4%{?dist}
f567cd
License: GPLv2 or BSD
f567cd
Group: System Environment/Libraries
f567cd
URL: http://www.intel.com/
f567cd
# Source tarball obtained by:
f567cd
# git clone https://github.com/01org/opa-psm2
f567cd
# cd opa-psm2
f567cd
# git checkout 25bbc387f4b5054a479ddb2670fa02e2e8a7421f
f567cd
# make dist
f567cd
Source0: %{tar_name}.tar.gz
f567cd
# Once we have hfi1 in our kernels, we'll build against kernel-headers
f567cd
# instead of using this internal copy of hfi1_user.h.
f567cd
Source1: hfi1_user.h
f567cd
# https://github.com/01org/opa-psm2/pull/1
f567cd
Patch0001: 0001-avoid-executable-flag-on-installed-header-files.patch
f567cd
Patch0002: 0002-avoid-calling-memset-with-zero-length.patch
f567cd
Patch0003: 0003-use-pkg-config-to-find-udev-rules-dir.patch
f567cd
# https://github.com/01org/opa-psm2/pull/2
f567cd
Patch0004: 0004-prevent-having-executable-stack.patch
f567cd
BuildRequires: libuuid-devel
f567cd
BuildRequires: pkgconfig(udev)
f567cd
# OPA HFI is Intel's thing
f567cd
ExclusiveArch: x86_64
f567cd
f567cd
%description
f567cd
The PSM Messaging API, or PSM API, is Intel's low-level
f567cd
user-level communications interface for the Truescale
f567cd
family of products. PSM users are enabled with mechanisms
f567cd
necessary to implement higher level communications
f567cd
interfaces in parallel environments.
f567cd
f567cd
%package devel
f567cd
Summary: Development files for Intel PSM
f567cd
Group: Development/Libraries
f567cd
Requires: %{name}%{?_isa} = %{version}-%{release}
f567cd
Requires: libuuid-devel
f567cd
f567cd
%description devel
f567cd
Development files for the libpsm2 library
f567cd
f567cd
%package compat
f567cd
Summary: Support for MPIs linked with PSM1
f567cd
Group: System Environment/Libraries
f567cd
Requires: %{name}%{?_isa} = %{version}-%{release}
f567cd
f567cd
%description compat
f567cd
Support for MPIs linked with PSM1.
f567cd
The compat library is installed in a non-standard directory to avoid
f567cd
conflicting with infinipath-psm. To use it, set:
f567cd
LD_LIBRARY_PATH=%{_libdir}/psm2
f567cd
f567cd
%package compat-devel
f567cd
Summary: Development files for unmodified PSM1 MPIs
f567cd
Group: Development/Libraries
f567cd
Requires: %{name}-compat%{?_isa} = %{version}-%{release}
f567cd
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
f567cd
Conflicts: infinipath-psm-devel
f567cd
f567cd
%description compat-devel
f567cd
Support for compiling unmodified PSM1 MPIs.
f567cd
f567cd
%prep
f567cd
%setup -q -n %{tar_name}
f567cd
%patch0001 -p1
f567cd
%patch0002 -p1
f567cd
%patch0003 -p1
f567cd
%patch0004 -p1
f567cd
mkdir -p include/rdma/hfi
f567cd
cp %{SOURCE1} include/rdma/hfi/
f567cd
f567cd
%build
f567cd
CFLAGS="%{optflags}" make %{?_smp_mflags}
f567cd
f567cd
%install
f567cd
%make_install
f567cd
f567cd
# Avoid conflict with infinipath-psm.
f567cd
# Move the compat symlink to a non-default directory, so that explicit
f567cd
# LD_LIBRARY_PATH setting is required to use it.
f567cd
test -L %{buildroot}/%{_libdir}/libpsm_infinipath.so.1 || exit 1
f567cd
mkdir %{buildroot}/%{_libdir}/psm2
f567cd
rm %{buildroot}/%{_libdir}/libpsm_infinipath.so.1
f567cd
ln -s ../libpsm2.so.2.0 %{buildroot}/%{_libdir}/psm2/libpsm_infinipath.so.1
f567cd
f567cd
%post -p /sbin/ldconfig
f567cd
%postun -p /sbin/ldconfig
f567cd
f567cd
%files
f567cd
%doc COPYING README
f567cd
%{_libdir}/libpsm2.so.2.0
f567cd
%{_libdir}/libpsm2.so.2
f567cd
f567cd
%files devel
f567cd
%{_libdir}/libpsm2.so
f567cd
%{_includedir}/psm2.h
f567cd
%{_includedir}/psm2_mq.h
f567cd
%{_includedir}/psm2_am.h
f567cd
f567cd
%files compat
f567cd
%{_udevrulesdir}/40-psm-compat.rules
f567cd
%{_libdir}/psm2
f567cd
%{_libdir}/psm2/libpsm_infinipath.so.1
f567cd
f567cd
%files compat-devel
f567cd
%{_includedir}/psm.h
f567cd
%{_includedir}/psm_am.h
f567cd
%{_includedir}/psm_mq.h
f567cd
%{_libdir}/libpsm_infinipath.so
f567cd
f567cd
%changelog
f567cd
* Tue Sep 01 2015 Michal Schmidt <mschmidt@redhat.com> - 0.7-4
f567cd
- Prevent executable stack.
f567cd
- Related: bz1173296
f567cd
f567cd
* Wed Aug 19 2015 Michal Schmidt <mschmidt@redhat.com> - 0.7-3
f567cd
- Move the compat lib to /usr/lib64/psm2, drop Conflict with infinipath-psm.
f567cd
f567cd
* Tue Aug 18 2015 Michal Schmidt <mschmidt@redhat.com> - 0.7-2
f567cd
- Conflict with rather than Obsolete infinipath-psm.
f567cd
f567cd
* Wed Aug 12 2015 Michal Schmidt <mschmidt@redhat.com> - 0.7-1
f567cd
- Initial packaging for RHEL, based on upstream spec.