1 2%define RELEASE @RELEASE@ 3%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} 4 5Summary: OpenFabrics Alliance InfiniBand management common library 6Name: libibcommon 7Version: @VERSION@ 8Release: %rel%{?dist} 9License: GPLv2 or BSD 10Group: System Environment/Libraries 11BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 12Source: http://www.openfabrics.org/downloads/management/@TARBALL@ 13Url: http://openfabrics.org/ 14Requires(post): /sbin/ldconfig 15Requires(postun): /sbin/ldconfig 16BuildRequires: libtool 17 18%description 19libibcommon provides common utility functions for the OFA diagnostic and 20management tools. 21 22%package devel 23Summary: Development files for the libibcommon library 24Group: System Environment/Libraries 25Requires: %{name} = %{version}-%{release} 26Requires(post): /sbin/ldconfig 27Requires(postun): /sbin/ldconfig 28 29%description devel 30Development files for the libibcommon library. 31 32%package static 33Summary: Static library files for the libibcommon library 34Group: System Environment/Libraries 35Requires: %{name} = %{version}-%{release} 36 37%description static 38Static library files for the libibcommon library. 39 40%prep 41%setup -q 42 43%build 44%configure 45make %{?_smp_mflags} 46 47%install 48make DESTDIR=${RPM_BUILD_ROOT} install 49# remove unpackaged files from the buildroot 50rm -f $RPM_BUILD_ROOT%{_libdir}/*.la 51 52%clean 53rm -rf $RPM_BUILD_ROOT 54 55%post -p /sbin/ldconfig 56%postun -p /sbin/ldconfig 57%post devel -p /sbin/ldconfig 58%postun devel -p /sbin/ldconfig 59 60%files 61%defattr(-,root,root) 62%{_libdir}/libibcommon*.so.* 63%doc AUTHORS COPYING ChangeLog 64 65%files devel 66%defattr(-,root,root) 67%{_libdir}/libibcommon.so 68%{_includedir}/infiniband/*.h 69 70%files static 71%defattr(-,root,root) 72%{_libdir}/libibcommon.a 73