blob: 07dba94cf711cc9a453da5d5bb043a850ad23b83 (
plain)
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
|
Name: Ascend-cann-toolkit
Version: 8.0.0
Release: 1%{?dist}
Summary: Ascend-cann-toolkit
License: Apache-2.0
Source0: Ascend-cann-toolkit_8.0.0_linux-aarch64.run
%define PACKAGE_RUN_DIR /usr/local
%description
This package contains the Ascend CANN (Compute Acceleration Neural Network) Toolkit, version 8.0.0.
%prep
# No source code to unpack, so nothing to do here
%build
# No building from source, so nothing to do here
%install
mkdir -p %{buildroot}/usr/local
cp Ascend-cann-toolkit_8.0.0_linux-aarch64.run %{buildroot}%{PACKAGE_RUN_DIR}
%files
%{PACKAGE_RUN_DIR}/Ascend-cann-toolkit_8.0.0_linux-aarch64.run
%post
chmod +x %{PACKAGE_RUN_DIR}/Ascend-cann-toolkit_8.0.0_linux-aarch64.run
ASCEND_INSTALL_FOR_ALL="true"
install_for_all_cmd=$([[ x${ASCEND_INSTALL_FOR_ALL} == X"true" ]] && echo "--install-for-all" || echo "")
%{PACKAGE_RUN_DIR}/Ascend-cann-toolkit_8.0.0_linux-aarch64.run --install --force --quiet --nox11 ${install_for_all_cmd}
echo "source /usr/local/Ascend/ascend-toolkit/set_env.sh ">> ~/.bashrc
%preun
%postun
%clean
rm -rf %{buildroot}
|