forked from openucx/ucx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ucx.spec.in
97 lines (74 loc) · 2.13 KB
/
ucx.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
%global rel @RPM_RELEASE@
%global version @VERSION@
%global pkgname @PACKAGE@
%global prefix @prefix@
%global __check_files %{nil}
%global _prefix %{prefix}
%global _libdir %{prefix}/lib
%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@
%{!?configure_options: %define configure_options %{nil}}
Name: %{pkgname}
Summary: Unified Communication X
Version: %{version}
Release: %{rel}
License: BSDv3
Group: Applications
Source: %{pkgname}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
URL: http://www.openucx.org
Prefix: %{prefix}
Provides: ucx
Packager: openucx
Vendor: openucx
%description
UCX is a communication library implementing high-performance messaging.
%prep
rm -rf $RPM_BUILD_ROOT
%setup -q
%build
./contrib/configure-release %{?configure_options}
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/ucx.conf
mkdir -p $RPM_BUILD_ROOT/usr/lib64/pkgconfig
cp ucx.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/ucx.conf
/usr/lib64/pkgconfig/ucx.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
exit 0
# If you install a library
%postun
/sbin/ldconfig
exit 0