michich / rpms / hwloc

Forked from rpms/hwloc 6 years ago
Clone
155afc4
Summary:   Portable Hardware Locality - portable abstraction of hierarchical architectures
155afc4
Name:      hwloc
155afc4
Version:   1.0.2
155afc4
Release:   1%{?dist}
155afc4
License:   BSD
155afc4
Group:     Applications/System
155afc4
URL:       http://www.open-mpi.org/projects/hwloc/
155afc4
Source0:   http://www.open-mpi.org/software/hwloc/v1.0/downloads/%{name}-%{version}.tar.bz2
155afc4
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
155afc4
BuildRequires: libX11-devel,libxml2-devel,cairo-devel
155afc4
155afc4
%description
155afc4
The Portable Hardware Locality (hwloc) software package provides 
155afc4
a portable abstraction (across OS, versions, architectures, ...) 
155afc4
of the hierarchical topology of modern architectures, including 
155afc4
NUMA memory nodes,  shared caches, processor sockets, processor cores
155afc4
and processing units (logical processors or "threads"). It also gathers
155afc4
various system attributes such as cache and memory information. It primarily
155afc4
aims at helping applications with gathering information about modern
155afc4
computing hardware so as to exploit it accordingly and efficiently.
155afc4
155afc4
hwloc may display the topology in multiple convenient formats. 
155afc4
It also offers a powerful programming interface (C API) to gather information 
155afc4
about the hardware, bind processes, and much more.
155afc4
155afc4
%package devel
155afc4
Summary:   Headers and shared development libraries for hwloc
155afc4
Group:     Development/Libraries
155afc4
Requires:  %{name} = %{version}-%{release}
155afc4
BuildRequires: libX11-devel,libxml2-devel,cairo-devel
155afc4
155afc4
%description devel
155afc4
Headers and shared object symbolic links for the hwloc.
155afc4
155afc4
%prep
155afc4
%setup -q
155afc4
155afc4
%build
155afc4
# There are two options how to get rid of RPATH
155afc4
# 1) http://lists.fedoraproject.org/pipermail/packaging/2010-June/007187.html
155afc4
# Issues with 2nd approach are
155afc4
# Can I do it on all architectures?
155afc4
# rpmlint complains about "/usr/lib" in sed command line
155afc4
# To be run BEFORE %%configure
155afc4
%ifarch ppc64 s390x x86_64 ia64 alpha sparc64
155afc4
%{__sed} -i.libdir_syssearch -e '/sys_lib_dlsearch_path_spec/s|/usr/lib |/usr/lib /usr/lib64 /lib /lib64|' configure
155afc4
%endif
155afc4
155afc4
%configure
155afc4
155afc4
# 2) http://fedoraproject.org/wiki/RPath_Packaging_Draft
155afc4
# %%{__sed} -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
155afc4
# %%{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
155afc4
# To be run AFTER %%configure
155afc4
155afc4
155afc4
%{__make} %{?_smp_mflags} V=1
155afc4
155afc4
%install
155afc4
%{__rm} -rf %{buildroot}
155afc4
%{__make} install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
155afc4
155afc4
# We don't ship .la files.
155afc4
%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/libhwloc.la
155afc4
155afc4
%{__mv} %{buildroot}%{_defaultdocdir}/%{name} %{buildroot}%{_defaultdocdir}/%{name}-%{version}
155afc4
%{__cp} -p AUTHORS COPYING NEWS README VERSION %{buildroot}%{_defaultdocdir}/%{name}-%{version}
155afc4
%{__cp} -p doc/hwloc-hello.c %{buildroot}%{_defaultdocdir}/%{name}-%{version}
155afc4
155afc4
%check
155afc4
%{__make} check
155afc4
155afc4
%clean
155afc4
%{__rm} -rf %{buildroot}
155afc4
155afc4
%post -p /sbin/ldconfig
155afc4
155afc4
%postun -p /sbin/ldconfig
155afc4
155afc4
%files
155afc4
%defattr(-, root, root, -)
155afc4
%{_bindir}/%{name}*
155afc4
%{_bindir}/lstopo
155afc4
%{_mandir}/man7/%{name}*
155afc4
%{_mandir}/man1/%{name}*
155afc4
%{_mandir}/man1/lstopo*
155afc4
%dir %{_datadir}/%{name}
155afc4
%{_datadir}/%{name}/%{name}.dtd
155afc4
%dir %{_defaultdocdir}/%{name}-%{version}
155afc4
%{_defaultdocdir}/%{name}-%{version}/*[^c]
155afc4
%{_libdir}/libhwloc*.so.*
155afc4
155afc4
%files devel
155afc4
%defattr(-, root, root, -)
155afc4
%{_libdir}/pkgconfig/*
155afc4
%{_libdir}/libhwloc*.so
155afc4
%{_mandir}/man3/*
155afc4
%dir %{_includedir}/%{name}
155afc4
%{_includedir}/%{name}/*
155afc4
%{_includedir}/%{name}.h
155afc4
%{_defaultdocdir}/%{name}-%{version}/*c
155afc4
155afc4
155afc4
%changelog
155afc4
* Mon Jul 19 2010 Jirka Hladky <jhladky@redhat.com> - 1.0.2-1
155afc4
- 1.0.2 release
155afc4
- added "check" section to the RPM SPEC file
155afc4
155afc4
* Mon Jul 19 2010 Jirka Hladky <jhladky@redhat.com> - 1.0.2-0.1.rc1r2330
155afc4
- 1.0.2 release candidate
155afc4
155afc4
* Mon Jul 12 2010 Jirka Hladky <jhladky@redhat.com> - 1.0.1-19
155afc4
- Fixed issues as described at https://bugzilla.redhat.com/show_bug.cgi?id=606498#c6
155afc4
155afc4
* Fri Jul 09 2010 Jirka Hladky <jhladky@redhat.com> - 1.0.1-18
155afc4
- Fixed issues as described at https://bugzilla.redhat.com/show_bug.cgi?id=606498
155afc4
155afc4
* Fri Jun 18 2010 Jirka Hladky <jhladky@redhat.com> - 1.0.1-17
155afc4
- Initial build