-
Notifications
You must be signed in to change notification settings - Fork 32
/
nccl-rdma-sharp-plugins.spec.in
103 lines (80 loc) · 2.36 KB
/
nccl-rdma-sharp-plugins.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
%global rel @RPM_RELEASE@
%global version @VERSION@
%global pkgname @PACKAGE@
%global prefix @prefix@
%global __check_files %{nil}
%global _libdir %{prefix}/lib
%{!?configure_opts: %global configure_opts %{nil}}
%global debug_package %{nil}
%bcond_with valgrind
%global _binary_filedigest_algorithm 1
%global _source_filedigest_algorithm 1
%global lt_release @LT_RELEASE@
%global lt_version @LT_CURRENT@.@LT_REVISION@.@LT_AGE@
Name: %{pkgname}
Summary: RDMA and SHARP plugins for NCCL
Version: %{version}
Release: %{rel}
License: Proprietary
Group: Applications
Source: %{pkgname}-%{version}.tar.gz
Requires: libibverbs
%if 0%{?suse_version} < 1100
BuildRequires: gcc-c++ libibverbs-devel binutils
%else
BuildRequires: gcc-c++ libibverbs-devel binutils-devel
%endif
%if %{with valgrind}
BuildRequires: valgrind-devel
%endif
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
URL: http://www.mellanox.com
Prefix: %{prefix}
Provides: nccl-rdma-sharp-plugins
Vendor: mellanox
%description
Provides RDMA and SHARP plugins for NCCL Collective library
%prep
rm -rf $RPM_BUILD_ROOT
%setup -q
%build
./configure
make %{?_smp_mflags}
%install
rm -rf "$RPM_BUILD_ROOT"
# Strip out some dependencies
cat > find-requires.sh <<'EOF'
exec %{__find_requires} "$@" | egrep -v '^perl'
EOF
chmod +x find-requires.sh
%global _use_internal_dependency_generator 0
%global __find_requires %{_builddir}/%{buildsubdir}/find-requires.sh
make DESTDIR="$RPM_BUILD_ROOT" install
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d/
echo %{_libdir} > $RPM_BUILD_ROOT/etc/ld.so.conf.d/nccl-rdma-sharp-plugins.conf
mkdir -p $RPM_BUILD_ROOT/usr/lib64/pkgconfig
cp nccl-rdma-sharp-plugins.pc $RPM_BUILD_ROOT/usr/lib64/pkgconfig
%clean
# We may be in the directory that we're about to remove, so cd out of
# there before we remove it
cd /tmp
# Remove installed driver after rpm build finished
chmod -R o+w $RPM_BUILD_DIR/%{name}-%{version}
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%{prefix}
/etc/ld.so.conf.d/nccl-rdma-sharp-plugins.conf
/usr/lib64/pkgconfig/nccl-rdma-sharp-plugins.pc
# Your application file list goes here
# %{prefix}/lib/lib*.so*
#%doc COPYRIGHT ChangeLog README AUTHORS NEWS
#%doc doc/*
# If you install a library
%post
/sbin/ldconfig || exit 1
# If you install a library
%postun
/sbin/ldconfig
exit 0