-
Notifications
You must be signed in to change notification settings - Fork 1
/
veorun.spec.in
81 lines (70 loc) · 2.12 KB
/
veorun.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
Summary: VE helper program for VE Offloading Framework
%if "%{libc}" == "glibc"
Name: @PACKAGE@
Conflicts: @PACKAGE@-musl
%else
Name: @PACKAGE@-musl
Conflicts: @PACKAGE@
%endif
Version: @VERSION@
Release: @RELEASE@%{?dist}
Vendor: NEC Corporation
Group: System Environment/Libraries
License: GPL
Source0: @PACKAGE@-@VERSION@.tar.gz
Requires: veos
BuildRequires: vedebuginfo
%if "%{libc}" == "glibc"
Requires: glibc-ve
BuildRequires: glibc-ve-devel
%else
Requires: musl-libc-ve
BuildRequires: musl-libc-ve-devel
%endif
%description
VE offloading framework (VEO) is low-leve interface to control
VE process from VH side to provide accelerator-like heterogeneous
programming model like OpenMP and OpenACC.
%define _prefix @prefix@
%define _libdir @libdir@
%define _libexecdir @libexecdir@
%define _includedir @includedir@
%define __strip /opt/nec/ve/bin/nstrip
%define optflags -g -O2
%if 0%{?rhel} == 8
%global __debug_install_post /opt/nec/ve/libexec/find-debuginfo.sh -o debugsourcefiles.list %{nil}
%define build_ldflags "-Wl,-z,max-page-size=0x4000000,-rpath=@libdir@,-z,lazy"
%else
%global __debug_install_post /opt/nec/ve/libexec/find-debuginfo.sh %{nil}
%endif
%define __requires_exclude ^libn(cc|c\\+\\+|fort)\\.so\\..*$
%package devel
Summary: Development package for veorun
Requires: %{name} = %{version}-%{release}
Requires: util-linux
%description devel
This package includes header files of veorun.
Requires: %{name} = %{version}-%{release}
%prep
%setup -q -n @PACKAGE@-@VERSION@
%if 0%{?rhel} == 8
pathfix.py -pn -i /usr/bin/python3 $RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION/gen_veorun_static_symtable
%endif
%build
%configure --host=ve-nec-linux --libdir=%{_libdir} CC=@CC@ CCLD="@CCLD@"
%make_build
%install
%make_install
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/libexec
ln -sfr $RPM_BUILD_ROOT/%{_libexecdir}/veorun \
$RPM_BUILD_ROOT/%{_prefix}/libexec/veorun
%files
%{_libexecdir}/veorun
%{_prefix}/libexec/veorun
%files devel
%{_includedir}/veorun/veorun.h
%{_includedir}/veorun/veo_private_defs.h
%{_libdir}/libveorun.a
%{_bindir}/mk_veorun_static
%{_libexecdir}/mk_veorun_static
%{_libexecdir}/gen_veorun_static_symtable