forked from Mellanox/bfscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mlxbf-bfscripts.spec
133 lines (111 loc) · 3.8 KB
/
mlxbf-bfscripts.spec
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
%global debug_package %{nil}
Summary: Utility scripts for managing Mellanox BlueField hardware
Name: mlxbf-bfscripts
Version: 3.0.0~beta1
URL: https://github.com/Mellanox/bfscripts
Release: 3%{?dist}
License: BSD
BuildArch: noarch
# Source is created by:
# git clone https://github.com/Mellanox/bfscripts
# cd bfscripts
# git checkout 56a22690f9a7223261ffa70bcb9b3ae8d26021cc
# rpkg spec --sources
Source: mlxbf-bfscripts-3.0.0~beta1.tar.gz
BuildRequires: systemd-rpm-macros
BuildRequires: python3-devel
BuildRequires: /usr/bin/pathfix.py
Requires: mlxbf-bootctl
# Note: mlxbf-bootimages is provided by mlxbf-aarch64-firmware on Fedora.
Requires: mlxbf-bootimages
Requires: bash
Requires: python3
Requires: grub2-tools
Requires: dosfstools
Requires: e2fsprogs
Requires: efibootmgr
Requires: pciutils
Requires: util-linux
Requires: binutils
Requires: systemd
%description
Useful scripts for managing Mellanox BlueField hardware.
%prep
%setup
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" mlx-mkbfb
%build
exit 0
%install
%global installdir %{buildroot}%{_bindir}
%global man1dir %{buildroot}%{_mandir}/man1
%global man8dir %{buildroot}%{_mandir}/man8
mkdir -p %{installdir}
install -p -d %{man1dir}
install -p -d %{man8dir}
install -p bfbootmgr %{installdir}
install -p man/bfbootmgr.8 %{man8dir}
install -p bfcfg %{installdir}
install -p man/bfcfg.8 %{man8dir}
install -p bfcpu-freq %{installdir}
install -p man/bfcpu-freq.8 %{man8dir}
install -p bfdracut %{installdir}
install -p man/bfdracut.8 %{man8dir}
install -p bffamily %{installdir}
install -p man/bffamily.8 %{man8dir}
install -p bfinst %{installdir}
install -p man/bfinst.8 %{man8dir}
install -p bfpxe %{installdir}
install -p man/bfpxe.8 %{man8dir}
install -p bfrec %{installdir}
install -p man/bfrec.8 %{man8dir}
install -p bfrshlog %{installdir}
install -p man/bfrshlog.8 %{man8dir}
install -p bfsbkeys %{installdir}
install -p man/bfsbkeys.8 %{man8dir}
install -p bfvcheck %{installdir}
install -p man/bfvcheck.8 %{man8dir}
install -p bfver %{installdir}
install -p man/bfver.8 %{man8dir}
install -p bfacpievt %{installdir}
install -p man/bfacpievt.8 %{man8dir}
install -p bfgrubcheck %{installdir}
install -p man/bfgrubcheck.8 %{man8dir}
install -p bfhcafw %{installdir}
install -p man/bfhcafw.8 %{man8dir}
install -p mlx-mkbfb %{installdir}
install -p man/mlx-mkbfb.1 %{man1dir}
install -p -d %{buildroot}%{_unitdir}
install -p bfvcheck.service %{buildroot}%{_unitdir}/
install -p -d %{buildroot}%{_presetdir}
install -p 80-bfvcheck.preset %{buildroot}%{_presetdir}/
# Install tweak for fwupd on BlueField
%global fwupdquirkdir %{buildroot}%{_datadir}/fwupd/quirks.d
install -p -d %{fwupdquirkdir}
install -p mlx-uefi.quirk %{fwupdquirkdir}/
%post
%systemd_post bfvcheck.service
%preun
%systemd_preun bfvcheck.service
%postun
%systemd_postun bfvcheck.service
%files
%license LICENSE
%{_bindir}/bf*
%{_bindir}/mlx-mkbfb
%attr(644, root, root) %{_mandir}/man1/*
%attr(644, root, root) %{_mandir}/man8/*
%attr(644, root, root) %{_unitdir}/bfvcheck.service
%attr(644, root, root) %{_presetdir}/80-bfvcheck.preset
%attr(644, root, root) %{_datadir}/fwupd/quirks.d/mlx-uefi.quirk
%doc README.md
%changelog
* Fri Jul 24 2020 Spencer Lingard <Spencer@nvidia.com> - 3.0.0~beta1-3
- Add -p to all install invocations
- Change __install macro to just install
- Add autogenerated comment to Source to tell how to obtain sources
* Tue Jul 21 2020 Spencer Lingard <spencer@nvidia.com> - 3.0.0~beta1-2
- Use systemd macros for unit setup
- Use preset file instead of enabling service manually
- Fix Requires/BuildRequires
* Wed Jul 1 2020 Spencer Lingard <spencer@nvidia.com> - 3.0.0~beta1-1
Initial packaging.