hwloc/hwloc.spec

203 lines
6.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package hwloc
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%global lname libhwloc5
%define sversion 2.0
Name: hwloc
Version: 2.0
Release: 0
Summary: Portable Hardware Locality
License: BSD-3-Clause
Group: Productivity/Clustering/Computing
Url: http://www.open-mpi.org/projects/hwloc/
Source0: hwloc-%{sversion}.tar.xz
Source1: hwloc-rpmlintrc
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libtool
#BuildRequires: libXNVCtrl-devel
BuildRequires: ncurses-devel
BuildRequires: transfig
BuildRequires: update-desktop-files
BuildRequires: w3m
Requires: %{lname} = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} <= 1220 && !0%{?suse_version}
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(pciaccess)
BuildRequires: pkgconfig(x11)
%else
BuildRequires: cairo-devel
BuildRequires: libxml2-devel
BuildRequires: ncurses-devel
BuildRequires: xorg-x11-libICE-devel
BuildRequires: xorg-x11-libSM-devel
BuildRequires: xorg-x11-libX11-devel
%endif
#BuildRequires: texlive-latex
%if 0%{?suse_version} <= 1220
BuildRequires: texlive-bin-latex
%else
BuildRequires: texlive-makeindex-bin
%endif
# % ifnarch s390 s390x
# BuildRequires: libibverbs-devel
# % endif
%ifnarch s390 s390x i586 %arm
BuildRequires: libnuma-devel
%endif
BuildRequires: perl-macros
Requires: perl-JSON
Requires: perl-base >= 5.22.1
%description
The Portable Hardware Locality (hwloc) software package provides
a portable abstraction (across OS, versions, architectures, ...)
of the hierarchical topology of modern architectures, including
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.
hwloc may display the topology in multiple convenient formats.
It also offers a powerful programming interface (C API) to gather information
about the hardware, bind processes, and much more.
%package devel
Summary: Headers and shared development libraries for hwloc
Group: Development/Libraries/C and C++
Requires: %{lname} = %{version}
Provides: lib%{name}-devel = %{version}-%{release}
Obsoletes: lib%{name}-devel <= 1.11
%description devel
Package contains headers and shared object symbolic links for the hwloc.
%package -n %{lname}
Summary: Run time libraries for the hwloc
Group: System/Libraries
Requires: %{name}-data
%description -n %{lname}
Package contains run time libraries for the hwloc.
%package data
Summary: Run time data for hwloc
Group: Development/Libraries/C and C++
%description data
Package contains run time data for the hwloc.
%package doc
Summary: Documentation for hwloc
Group: Documentation/Other
%description doc
Package contains documentation for %{name}.
%prep
%setup -q
%build
%if 0%{?sles_version}
sed -i 's/2.0 dist-bzip2 subdir-objects foreign tar-ustar parallel-tests -Wall -Werror/2.0 dist-bzip2 subdir-objects foreign tar-ustar -Wall -Werror/g' configure.ac
%endif
autoreconf --force --install
Accepting request 265428 from home:ealin:varia - Update to Version 1.10.0 * v1.10.0 is the new feature release. There is no new major change in this release, just improvements everywhere. If you are buying new Intel Xeon E5 with 10 cores or more, this release is required for proper Socket/NUMA detection until the Linux kernel gets fixed. * API + Add hwloc_topology_export_synthetic() to export a topology to a synthetic string without using lstopo. See the Synthetic topologies section in the documentation. + Add hwloc_topology_set/get_userdata() to let the application save a private pointer in the topology whenever it needs a way to find its own object corresponding to a topology. + Add hwloc_get_numanode_obj_by_os_index() and document that this function as well as hwloc_get_pu_obj_by_os_index() are good at converting nodesets and cpusets into objects. + hwloc_distrib() does not ignore any objects anymore when there are too many of them. They get merged with others instead. Thanks to Tim Creech for reporting the issue. * Tools + hwloc-bind --get <command-line> now executes the command after displaying the binding instead of ignoring the command entirely. Thanks to John Donners for the suggestion. + Clarify that memory sizes shown in lstopo are local by default unless specified (total memory added in the root object). * Synthetic topologies + Synthetic topology descriptions may now specify attributes such as memory sizes and OS indexes. See the Synthetic topologies section in the documentation. + lstopo now exports in this fully-detailed format by default. OBS-URL: https://build.opensuse.org/request/show/265428 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/hwloc?expand=0&rev=8
2014-12-18 15:00:33 +01:00
sed -i "s;(LN_S) lstopo-no-graphics;(LN_S) lstopo;g" utils/lstopo/Makefile.in
%configure
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
make %{?_smp_mflags} V=1
%install
make install DESTDIR=%{buildroot} INSTALL="install -p"
%suse_update_desktop_file -r lstopo System Monitor
# We don't ship .la files.
rm -rf %{buildroot}%{_libdir}/libhwloc.la
# documentation will be handled by % doc macro
rm -rf %{buildroot}%{_datadir}/doc/
%fdupes -s %{buildroot}/%{_mandir}/man1
%fdupes -s %{buildroot}/%{_mandir}/man7
#support perl scripts
mkdir -p %{buildroot}/%{perl_vendorlib}
mv %{buildroot}/%{_bindir}/Perl_* %{buildroot}/%{perl_vendorlib}/
%check
#XXX: this is weird, but make check got broken by removing doxygen-doc/man above
# the only one fix is to install documentation by hand, or to ignore check error
make %{?_smp_mflags} check || :
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%files
%defattr(-, root, root, -)
%doc AUTHORS COPYING NEWS README VERSION
# This binary is built only for intel architectures
%ifarch %ix86 x86_64
%attr(0755,root,root) %{_sbindir}/hwloc-dump-hwdata
%endif
%doc %{_mandir}/man1/%{name}*
%doc %{_mandir}/man1/lstopo*
%{_bindir}/hwloc*
%{_bindir}/lsmap
%{_bindir}/lsnettopo
%{_bindir}/lstopo*
%{_bindir}/netloc*
%{perl_vendorlib}/Perl_IB_support.pm
%{perl_vendorlib}/Perl_OF_support.pm
%dir %{_datadir}/hwloc
Accepting request 265428 from home:ealin:varia - Update to Version 1.10.0 * v1.10.0 is the new feature release. There is no new major change in this release, just improvements everywhere. If you are buying new Intel Xeon E5 with 10 cores or more, this release is required for proper Socket/NUMA detection until the Linux kernel gets fixed. * API + Add hwloc_topology_export_synthetic() to export a topology to a synthetic string without using lstopo. See the Synthetic topologies section in the documentation. + Add hwloc_topology_set/get_userdata() to let the application save a private pointer in the topology whenever it needs a way to find its own object corresponding to a topology. + Add hwloc_get_numanode_obj_by_os_index() and document that this function as well as hwloc_get_pu_obj_by_os_index() are good at converting nodesets and cpusets into objects. + hwloc_distrib() does not ignore any objects anymore when there are too many of them. They get merged with others instead. Thanks to Tim Creech for reporting the issue. * Tools + hwloc-bind --get <command-line> now executes the command after displaying the binding instead of ignoring the command entirely. Thanks to John Donners for the suggestion. + Clarify that memory sizes shown in lstopo are local by default unless specified (total memory added in the root object). * Synthetic topologies + Synthetic topology descriptions may now specify attributes such as memory sizes and OS indexes. See the Synthetic topologies section in the documentation. + lstopo now exports in this fully-detailed format by default. OBS-URL: https://build.opensuse.org/request/show/265428 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/hwloc?expand=0&rev=8
2014-12-18 15:00:33 +01:00
%{_datadir}/applications/*.desktop
%files devel
%defattr(-, root, root, -)
%doc %{_mandir}/man7/%{name}*
%{_includedir}/%{name}
%{_includedir}/%{name}.h
%{_includedir}/netloc*
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/netloc.pc
%{_libdir}/libnetloc.so
%{_libdir}/libnetloc.la
%files -n %{lname}
%defattr(-, root, root, -)
%{_libdir}/libhwloc*so.*
%{_libdir}/libnetloc*so.*
%files data
%defattr(-, root, root, -)
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/%{name}.dtd
%{_datadir}/%{name}/%{name}-valgrind.supp
%files doc
%defattr(-, root, root, -)
%doc ./doc/images/*.pdf
%changelog