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