# lustre.spec
Summary: Lustre File System
Name: lustre-client
Version: 2.4.3
Release: 0.2%{?dist}
License: GPL
Group: Utilities/System
Source: %{name}-%{version}.tar.gz
URL: http://wiki.whamcloud.com/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap nfs-utils-lustre
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libstdc++-devel
BuildRequires: make
BuildRequires: kernel-default-devel
Requires: %{name}-modules = %{version}
Provides: lustre-lite = %{version}, lustre-lite-utils = %{version}
%description
Userspace tools and files for the Lustre file system.
Authors:
--------
Jicheng Wang <[email protected]>
%package modules
Summary: Lustre client modules
Group: Applications/File
Requires: %{name} = %{version}
%description modules
Luster client modules
%prep
%setup -qn lustre-%{version}
%build
# if RPM_BUILD_NCPUS unset, set it
if [ -z "$RPM_BUILD_NCPUS" ] ; then
RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat 2>/dev/null || echo 0 :)
if [ $RPM_BUILD_NCPUS -eq 0 ] ; then
RPM_BUILD_NCPUS=1
fi
if [ $RPM_BUILD_NCPUS -gt 8 ] ; then
RPM_BUILD_NCPUS=8
fi
fi
rm -rf $RPM_BUILD_ROOT
./configure --prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib64 \
--libexecdir=/usr/lib64 \
--localstatedir=/var \
--sharedstatedir=/usr/com \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--disable-server
make -j $RPM_BUILD_NCPUS -s %{?make_args}
%install
make install DESTDIR=$RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING README
%{_sysconfdir}/ha.d/resource.d/Lustre.ha_v2
%{_sysconfdir}/init.d/lnet
%{_sysconfdir}/init.d/lustre
%config(noreplace) %{_sysconfdir}/ldev.conf
%config(noreplace) %{_sysconfdir}/sysconfig/lustre
%config(noreplace) %{_sysconfdir}/udev/rules.d/99-lustre.rules
/sbin/mount.lustre
/usr/
%files modules
%defattr(-,root,root,-)
/lib/
%pre modules
%post modules
sed -i "$ c\allow_unsupported_modules 1" /etc/modprobe.d/unsupported-modules || :
depmod -a || :
%preun modules
%postun modules
if [ "$1" -eq 0 ]; then
sed -i "$ c\allow_unsupported_modules 0" /etc/modprobe.d/unsupported-modules || :
depmod -a || :
fi
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Jul 22 2015 [email protected]
- Add Author
- Add doc section
* Mon Jul 20 2015 [email protected]
- First Release