综合

lustre-2.4.3 for sles11 sp2 x86-64位spec文件

导读: 

# lustre.spec

%define _depmod /sbin/depmod

%define _sed /usr/bin/sed


Summary: Lustre File System

Name: lustre-client

Version: 2.4.3

Release: 1%{?dist}

License: GPL

Group: Utilities/System

Source: lustre-%{version}.tar.gz

URL: http://wiki.whamcloud.com/

BuildRoot: %{_tmppath}/lustre-%{version}-root

Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap nfs-utils-lustre


BuildRequires: gcc,gcc-c++,libstdc++-devel,make,kernel-default-devel

Requires: %{name}-modules = %{version}


Requires(post): %{_depmod},%{_sed}

Requires(postun): %{_depmod},%{_sed}


Provides: lustre-lite = %{version}, lustre-lite-utils = %{version}


%description

Userspace tools and files for the Lustre file system.



%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 \

--with-linux=/usr/src/linux-3.0.13-0.27 \

--with-linux-obj=/usr/src/linux-3.0.13-0.27-obj/x86_64/default \

--with-release=3.0.13_0.27_default \

--disable-server


make -j $RPM_BUILD_NCPUS -s %{?make_args}


%install

make install DESTDIR=$RPM_BUILD_ROOT


%files

%defattr(-,root,root,-)

%{_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

/sbin/depmod -a

/usr/bin/sed -i "s/0/1/g" /etc/modprobe.d/unsupported-modules


%preun modules


%postun modules

/usr/bin/sed -i "s/1/0/g" /etc/modprobe.d/unsupported-modules

/sbin/depmod -a


%clean

rm -rf $RPM_BUILD_ROOT


%changelog

* Mon Jul 20 2015 [email protected]

- First Release


相关资讯

发表评论
网友评论0 条评论)
暂无评论