Skip to content

Commit 2a941f9

Browse files
bkmgitdaipom
andcommitted
Add RPM installation instructions to README
Co-authored-by: Daijiro Fukuda <[email protected]>
1 parent 1bbd7cd commit 2a941f9

File tree

1 file changed

+37
-94
lines changed

1 file changed

+37
-94
lines changed

README.md

Lines changed: 37 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ This library is a part of [OpenArm](https://github.com/enactic/openarm/). See de
1313

1414
### 1. Install
1515

16-
<details>
17-
<summary>Ubuntu</summary>
16+
#### Ubuntu
1817

1918
* 22.04 Jammy Jellyfish
2019
* 24.04 Noble Numbat
@@ -27,99 +26,43 @@ sudo apt install -y \
2726
libopenarm-can-dev \
2827
openarm-can-utils
2928
```
30-
</details>
3129

32-
<details>
33-
<summary>AlmaLinux, CentOS, Fedora, RHEL and Rocky Linux</summary>
34-
35-
For [AlmaLinux](https://almalinux.org/), [CentOS](https://centos.org/),
36-
[RHEL](https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux)
37-
and [Rocky Linux](https://rockylinux.org/),
38-
first enable [EPEL](https://docs.fedoraproject.org/en-US/epel/):
39-
40-
<details>
41-
<summary>AlmaLinux 8</summary>
42-
```bash
43-
sudo dnf install epel-release
44-
sudo dnf config-manager --set-enabled powertools
45-
```
46-
</details>
47-
48-
<details>
49-
<summary>AlmaLinux 9 & 10</summary>
50-
```bash
51-
sudo dnf install epel-release
52-
sudo dnf config-manager --set-enabled crb
53-
```
54-
</details>
55-
56-
<details>
57-
<summary>CentOS Stream 9</summary>
58-
```bash
59-
sudo dnf config-manager --set-enabled crb
60-
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel{,-next}-release-latest-9.noarch.rpm
61-
```
62-
</details>
63-
64-
<details>
65-
<summary>CentOS Stream 10</summary>
66-
```bash
67-
sudo dnf config-manager --set-enabled crb
68-
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
69-
```
70-
</details>
71-
72-
<details>
73-
<summary>RHEL 8</summary>
74-
```bash
75-
sudo subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
76-
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
77-
```
78-
</details>
79-
80-
<details>
81-
<summary>RHEL 9</summary>
82-
```bash
83-
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
84-
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
85-
```
86-
</details>
87-
88-
<details>
89-
<summary>RHEL 10</summary>
90-
```bash
91-
sudo subscription-manager repos --enable codeready-builder-for-rhel-10-$(arch)-rpms
92-
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
93-
```
94-
</details>
95-
96-
<details>
97-
<summary>Rocky Linux 8</summary>
98-
```bash
99-
sudo dnf install epel-release
100-
sudo dnf config-manager --set-enabled powertools
101-
```
102-
</details>
103-
104-
<details>
105-
<summary>Rocky Linux 9 & 10</summary>
106-
```bash
107-
sudo dnf install epel-release
108-
sudo crb enable
109-
```
110-
</details>
111-
112-
EPEL is not required for [Fedora](https://fedoraproject.org/).
113-
114-
Install the package using:
115-
116-
```bash
117-
sudo dnf update
118-
sudo dnf install -y \
119-
openarm_can-devel \
120-
openarm_can-utils
121-
```
122-
</details>
30+
#### AlmaLinux, CentOS, Fedora, RHEL, and Rocky Linux
31+
32+
1. Enable [EPEL](https://docs.fedoraproject.org/en-US/epel/). (Not required for [Fedora](https://fedoraproject.org/))
33+
* AlmaLinux 8 / Rocky Linux 8
34+
```bash
35+
sudo dnf install -y epel-release
36+
sudo dnf config-manager --set-enabled powertools
37+
```
38+
* AlmaLinux 9 & 10 / Rocky Linux 9 & 10
39+
```bash
40+
sudo dnf install -y epel-release
41+
sudo crb enable
42+
```
43+
* CentOS Stream 9
44+
```bash
45+
sudo dnf config-manager --set-enabled crb
46+
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel{,-next}-release-latest-9.noarch.rpm
47+
```
48+
* CentOS Stream 10
49+
```bash
50+
sudo dnf config-manager --set-enabled crb
51+
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
52+
```
53+
* RHEL 8 & 9 & 10
54+
```bash
55+
releasever="$(. /etc/os-release && echo $VERSION_ID | grep -oE '^[0-9]+')"
56+
sudo subscription-manager repos --enable codeready-builder-for-rhel-$releasever-$(arch)-rpms
57+
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$releasever.noarch.rpm
58+
```
59+
2. Install the package.
60+
```bash
61+
sudo dnf update
62+
sudo dnf install -y \
63+
openarm-can-devel \
64+
openarm-can-utils
65+
```
12366

12467
### 2. Setup CAN Interface
12568

0 commit comments

Comments
 (0)