Skip to content

Commit fe1f869

Browse files
committed
packages/hwloc: add hwloc
hwloc is needed both as a binary dependency like hwloc-ls but also can be used as a build dependency so this package vends a devel both a primary package and a development package. Signed-off-by: Matthew Yeazel <[email protected]>
1 parent 6f7213a commit fe1f869

File tree

5 files changed

+106
-0
lines changed

5 files changed

+106
-0
lines changed

Cargo.lock

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ members = [
4242
"packages/host-ctr",
4343
"packages/iproute",
4444
"packages/iptables",
45+
"packages/hwloc",
4546
"packages/iputils",
4647
"packages/kexec-tools",
4748
"packages/keyutils",

kits/bottlerocket-core-kit/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ findutils = { path = "../../packages/findutils" }
4949
glibc = { path = "../../packages/glibc" }
5050
grep = { path = "../../packages/grep" }
5151
host-ctr = { path = "../../packages/host-ctr" }
52+
hwloc = { path = "../../packages/hwloc" }
5253
iproute = { path = "../../packages/iproute" }
5354
iptables = { path = "../../packages/iptables" }
5455
iputils = { path = "../../packages/iputils" }

packages/hwloc/Cargo.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[package]
2+
name = "hwloc"
3+
version = "0.1.0"
4+
edition = "2021"
5+
publish = false
6+
build = "../build.rs"
7+
8+
[lib]
9+
path = "../packages.rs"
10+
11+
[package.metadata.build-package]
12+
releases-url = "https://www.open-mpi.org/software/ompi/v5.0/"
13+
14+
[[package.metadata.build-package.external-files]]
15+
url = "https://download.open-mpi.org/release/hwloc/v2.12/hwloc-2.12.1.tar.bz2"
16+
sha512 = "8da48f29447f9df06b5039b592c2fc790bc19308fc61d1e25e8b44e1acc99cf3cba35da9689a4e339fa35051d3fb4d47c375dd1aad1cd8d3af079846f428f1f3"
17+
18+
[build-dependencies]
19+
glibc = { path = "../glibc" }
20+
systemd-252 = { path = "../systemd-252" }

packages/hwloc/hwloc.spec

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
Name: %{_cross_os}hwloc
2+
Version: 2.12.1
3+
Release: 1%{?dist}
4+
Summary: Portable hardware locality library
5+
URL: http://www.open-mpi.org/projects/hwloc/
6+
License: BSD-3-Clause
7+
Source0: https://download.open-mpi.org/release/hwloc/v2.12/hwloc-%{version}.tar.bz2
8+
9+
BuildRequires: %{_cross_os}glibc-devel
10+
BuildRequires: %{_cross_os}systemd-devel
11+
12+
%description
13+
%{summary}.
14+
15+
%package devel
16+
Summary: hwloc development libraries and headers
17+
Requires: %{name}
18+
Requires: %{_cross_os}systemd-devel
19+
20+
%description devel
21+
%{summary}.
22+
23+
%prep
24+
%autosetup -n hwloc-%{version} -p1
25+
26+
%build
27+
%cross_configure \
28+
--disable-cairo \
29+
--disable-gl \
30+
--disable-libxml2 \
31+
--disable-opencl \
32+
--disable-pci \
33+
--disable-plugins \
34+
--enable-static \
35+
--disable-shared \
36+
--exec-prefix=%{_cross_prefix} \
37+
--program-prefix=""
38+
39+
%force_disable_rpath
40+
41+
%make_build
42+
43+
%install
44+
%make_install
45+
46+
%files
47+
%license COPYING
48+
%{_cross_attribution_file}
49+
%{_cross_bindir}/hwloc-annotate
50+
%{_cross_bindir}/hwloc-compress-dir
51+
%{_cross_bindir}/hwloc-gather-topology
52+
%{_cross_bindir}/hwloc-ls
53+
%{_cross_bindir}/hwloc-ps
54+
%{_cross_bindir}/hwloc-bind
55+
%{_cross_bindir}/hwloc-calc
56+
%{_cross_bindir}/hwloc-diff
57+
%{_cross_bindir}/hwloc-distrib
58+
%{_cross_bindir}/hwloc-info
59+
%{_cross_bindir}/hwloc-patch
60+
%{_cross_bindir}/lstopo-no-graphics
61+
%exclude %{_cross_bindir}/lstopo
62+
# These are not on aarch64
63+
%if "%{_cross_arch}" == "x86_64"
64+
%{_cross_sbindir}/hwloc-dump-hwdata
65+
%{_cross_bindir}/hwloc-gather-cpuid
66+
%endif
67+
%exclude %{_cross_datadir}
68+
%exclude %{_cross_mandir}
69+
70+
%files devel
71+
%{_cross_libdir}/libhwloc.a
72+
%{_cross_includedir}/hwloc.h
73+
%{_cross_includedir}/hwloc/*.h
74+
%{_cross_includedir}/hwloc/autogen/*.h
75+
%{_cross_pkgconfigdir}/*.pc

0 commit comments

Comments
 (0)