hwloc/hwloc.spec

168 lines
4.5 KiB
RPMSpec
Raw Normal View History

2010-07-26 14:47:36 +00:00
Summary: Portable Hardware Locality - portable abstraction of hierarchical architectures
Name: hwloc
2023-02-24 20:55:48 +00:00
Version: 2.9.0
2023-02-24 20:29:23 +00:00
Release: %autorelease
2010-07-26 14:47:36 +00:00
License: BSD
URL: http://www.open-mpi.org/projects/hwloc/
2023-02-24 20:55:48 +00:00
Source0: https://download.open-mpi.org/release/hwloc/v2.9/hwloc-%{version}.tar.bz2
2014-04-01 09:25:48 +00:00
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: gcc
# C++ only for hwloc-hello-cpp test:
BuildRequires: gcc-c++
BuildRequires: cairo-devel
BuildRequires: libpciaccess-devel
BuildRequires: libX11-devel
BuildRequires: libxml2-devel
BuildRequires: lynx
BuildRequires: ncurses-devel
2015-04-02 03:02:46 +00:00
BuildRequires: desktop-file-utils
BuildRequires: numactl-devel
BuildRequires: rdma-core-devel
2017-11-14 14:16:05 +00:00
%ifarch %{ix86} x86_64
%{?systemd_requires}
BuildRequires: systemd
%endif
BuildRequires: make
2010-07-26 14:47:36 +00:00
%description
2021-07-11 15:20:49 +00:00
The Portable Hardware Locality (hwloc) software package provides
a portable abstraction (across OS, versions, architectures, ...)
of the hierarchical topology of modern architectures, including
2010-07-26 14:47:36 +00:00
NUMA memory nodes, shared caches, processor sockets, processor cores
and processing units (logical processors or "threads"). It also gathers
various system attributes such as cache and memory information. It primarily
aims at helping applications with gathering information about modern
computing hardware so as to exploit it accordingly and efficiently.
2021-07-11 15:20:49 +00:00
hwloc may display the topology in multiple convenient formats.
It also offers a powerful programming interface (C API) to gather information
2010-07-26 14:47:36 +00:00
about the hardware, bind processes, and much more.
%package devel
Summary: Headers and shared development libraries for hwloc
2014-04-01 09:25:48 +00:00
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%ifnarch %{arm}
Requires: rdma-core-devel%{?_isa}
%endif
2010-07-26 14:47:36 +00:00
%description devel
Headers and shared object symbolic links for the hwloc.
%package libs
Summary: Run time libraries for the hwloc
%description libs
Run time libraries for the hwloc
2014-04-01 09:25:48 +00:00
%package gui
Summary: The gui-based hwloc program(s)
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description gui
GUI-based tool for displaying system topology information.
2014-09-27 20:25:59 +00:00
%package plugins
Summary: Plugins for hwloc
Requires: %{name}-plugins%{?_isa} = %{version}-%{release}
%description plugins
This package contains plugins for hwloc. This includes
- PCI support
- GL support
- libxml support
2010-07-26 14:47:36 +00:00
%prep
2017-10-27 14:06:25 +00:00
%autosetup -p1
2011-10-04 23:01:45 +00:00
2010-07-26 14:47:36 +00:00
%build
2023-02-24 20:55:48 +00:00
%configure --enable-plugins --disable-silent-rules --runstatedir=/run
# Remove rpaths
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
2023-02-24 20:55:48 +00:00
%make_build
2010-07-26 14:47:36 +00:00
%install
2023-02-24 20:55:48 +00:00
%make_install
2010-07-26 14:47:36 +00:00
# We don't ship .la files.
find %{buildroot} -name '*.la' -exec rm -f {} ';'
2011-01-01 22:45:33 +00:00
2017-11-02 15:23:52 +00:00
cp -p AUTHORS COPYING NEWS README VERSION %{buildroot}%{_pkgdocdir}
cp -pr doc/examples %{buildroot}%{_pkgdocdir}
2015-08-18 12:37:35 +00:00
# Fix for BZ1253977
2017-11-02 15:23:52 +00:00
mv %{buildroot}%{_pkgdocdir}/examples/Makefile %{buildroot}%{_pkgdocdir}/examples/Makefile_%{_arch}
2014-10-09 00:18:11 +00:00
2015-04-02 03:02:46 +00:00
desktop-file-validate %{buildroot}/%{_datadir}/applications/lstopo.desktop
2014-10-09 00:18:11 +00:00
# Avoid making hwloc-gui depend on hwloc
rm %{buildroot}%{_mandir}/man1/lstopo.1
ln %{buildroot}%{_mandir}/man1/lstopo-no-graphics.1 %{buildroot}%{_mandir}/man1/lstopo.1
2014-10-09 00:18:11 +00:00
2016-12-27 18:58:13 +00:00
# Deal with service file
# https://github.com/open-mpi/hwloc/issues/221
2017-11-14 14:16:05 +00:00
%ifarch %{ix86} x86_64
mkdir -p %{buildroot}%{_unitdir}
mv %{buildroot}%{_datadir}/%{name}/hwloc-dump-hwdata.service %{buildroot}%{_unitdir}/
%else
2016-12-27 18:58:13 +00:00
rm %{buildroot}%{_datadir}/%{name}/hwloc-dump-hwdata.service
2017-11-14 14:16:05 +00:00
%endif
2016-12-27 18:58:13 +00:00
2010-07-26 14:47:36 +00:00
%check
2019-08-24 18:35:27 +00:00
LD_LIBRARY_PATH=$PWD/hwloc/.libs make check
2010-07-26 14:47:36 +00:00
2017-11-14 14:16:05 +00:00
%ifarch %{ix86} x86_64
%post
%systemd_post hwloc-dump-hwdata.service
%preun
%systemd_preun hwloc-dump-hwdata.service
%postun
%systemd_postun_with_restart hwloc-dump-hwdata.service
%endif
2010-07-26 14:47:36 +00:00
%files
2021-03-01 21:38:44 +00:00
%{_datadir}/bash-completion/completions/*
2010-07-26 14:47:36 +00:00
%{_bindir}/%{name}*
2012-08-15 14:47:19 +00:00
%{_bindir}/lstopo-no-graphics
2020-07-18 19:49:30 +00:00
%{_datadir}/hwloc/hwloc-ps.www/
2010-07-26 14:47:36 +00:00
%{_mandir}/man1/%{name}*
2014-04-01 09:25:48 +00:00
%{_mandir}/man1/lstopo-no-graphics*
2016-12-27 19:16:01 +00:00
%ifarch %{ix86} x86_64
2016-12-27 18:58:13 +00:00
%{_sbindir}/hwloc-dump-hwdata
2017-11-14 14:16:05 +00:00
%{_unitdir}/hwloc-dump-hwdata.service
2016-12-27 19:16:01 +00:00
%endif
2010-07-26 14:47:36 +00:00
%files devel
%{_libdir}/pkgconfig/*
%{_mandir}/man3/*
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%{_includedir}/%{name}.h
2017-11-02 15:23:52 +00:00
%{_pkgdocdir}/examples
2011-10-07 00:13:44 +00:00
%{_libdir}/*.so
2015-08-18 12:37:35 +00:00
%files libs
%{_mandir}/man7/%{name}*
%dir %{_datadir}/%{name}
2019-08-24 18:35:27 +00:00
%{_datadir}/hwloc/hwloc.dtd
%{_datadir}/hwloc/hwloc-valgrind.supp
%{_datadir}/hwloc/hwloc2.dtd
%{_datadir}/hwloc/hwloc2-diff.dtd
2017-11-02 15:23:52 +00:00
%dir %{_pkgdocdir}/
%{_pkgdocdir}/*[^c]
2019-08-24 18:35:27 +00:00
%{_libdir}/libhwloc*so.15*
2014-04-01 09:25:48 +00:00
%files gui
%{_bindir}/lstopo
2014-10-09 00:18:11 +00:00
%{_mandir}/man1/lstopo.1*
2015-04-02 03:02:46 +00:00
%{_datadir}/applications/lstopo.desktop
2014-04-01 09:25:48 +00:00
2014-09-27 20:25:59 +00:00
%files plugins
2017-11-14 14:16:05 +00:00
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/hwloc*
2010-07-26 14:47:36 +00:00
%changelog
2023-02-24 20:29:23 +00:00
%autochangelog