CPPFLAGS="$KINCFLAGS $ARCHCPPFLAGS"
portalsdir_def='$(top_srcdir)/../portals'
-AC_ARG_ENABLE(portalsdir, [ --enable-portalsdir=[path] set path to Portals source (default=../portals)],, enable_portalsdir=$portalsdir_def)
+AC_ARG_WITH(portals, [ --with-portals=[path] set path to Portals source (default=../portals)], enable_portalsdir=$withval)
+AC_ARG_ENABLE(portalsdir, [ --enable-portalsdir=[path] (deprecated) set path to Portals source (default=../portals)],, enable_portalsdir=$portalsdir_def)
PORTALS=$enable_portalsdir
AC_SUBST(PORTALS)
%description -n lustre-modules
Lustre file System, server and network drivers for Linux %{kversion}.
+%package -n lustre-source
+Summary: Object-Based Disk storage driver source
+Group: Development/Kernel
+
+%description -n lustre-source
+Lustre Lite Source for further development
+
%package -n lustre-doc
Summary: Documentation and sample configuration files
Group: Documentation
# FIXME: BuildArch overrides all the packages in rpm 4.0.4-7x
-#BuildArch: noarch
+BuildArch: noarch
%description -n lustre-doc
Documentation and sample configuration files for Lustre
-%package -n lustre-source
-Summary: Object-Based Disk storage driver source
-Group: Development/Kernel
-
-%description -n lustre-source
-Lustre Lite Source for further development
-
%prep
%setup -qn lustre-%{version}
make install prefix=$RPM_BUILD_ROOT
# Create the pristine source directory.
-make distclean
-mkdir -p $RPM_BUILD_ROOT/usr/src/lustre-%{version}
-find . -print | cpio -ap $RPM_BUILD_ROOT/usr/src/lustre-%{version}
-
+mkdir -p $RPM_BUILD_ROOT/usr/src
+rm -f lustre-source
+ln -s $RPM_BUILD_ROOT/usr/src lustre-source
+make distdir distdir=lustre-source/lustre-%{version}
%files
%attr(-, root, root) /usr/sbin/lmc