scst.spec: Use QLogic target driver source code from the QLogic git tree if available

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6557 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-10-28 18:10:19 +00:00
parent dad9e0317c
commit c8b2fd0808
2 changed files with 22 additions and 7 deletions

View File

@@ -410,16 +410,19 @@ fcst_extraclean:
scst-dist-gzip:
name=scst && \
mkdir $${name}-$(VERSION) && \
{ if [ -h qla2x00t ] || { mount | grep "on $$PWD/qla2x00t type"; }; \
then \
{ \
if [ -e qla2x00t_git ]; then \
scripts/list-source-files | grep -v ^qla2x00t/; \
find qla2x00t/ -type f; \
( dir="$$PWD" && cd qla2x00t_git && \
"$$dir/scripts/list-source-files" ) | \
sed 's,^,qla2x00t_git/,'; \
else \
scripts/list-source-files; \
fi | \
grep -E '^doc/|^fcst/|^iscsi-scst/|^Makefile|^qla2x00t/|^scst.spec|^scst/|^scst_local/|^srpt/'|\
grep -E '^doc/|^fcst/|^iscsi-scst/|^Makefile|^qla2x00t(|_git)/|^scst.spec|^scst/|^scst_local/|^srpt/'|\
tar -T- -cf- | \
tar -C $${name}-$(VERSION) -xf-; } && \
tar -C $${name}-$(VERSION) -xf-; \
} && \
rm -f $${name}-$(VERSION).tar.bz2 && \
tar -cjf $${name}-$(VERSION).tar.bz2 $${name}-$(VERSION) && \
rm -rf $${name}-$(VERSION)

View File

@@ -113,9 +113,15 @@ export KVER=%{kversion} PREFIX=%{_prefix}
%{?kdir:%{expand:%%(export KDIR=%{kdir})}}
export BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y
make 2release
for d in scst fcst iscsi-scst qla2x00t/qla2x00-target scst_local srpt; do
for d in scst fcst iscsi-scst scst_local srpt; do
%{make} -C $d
done
for d in qla2x00t_git/qla2x00-target qla2x00t/qla2x00-target; do
if [ -e $d ]; then
%{make} -C $d
break
fi
done
%install
export KVER=%{kversion} PREFIX=%{_prefix} MANDIR=%{_mandir}
@@ -124,9 +130,15 @@ export BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y
for d in scst; do
DESTDIR=%{buildroot} %{make} -C $d install
done
for d in fcst iscsi-scst qla2x00t/qla2x00-target scst_local srpt; do
for d in fcst iscsi-scst scst_local srpt; do
DESTDIR=%{buildroot} INSTALL_MOD_PATH=%{buildroot} %{make} -C $d install
done
for d in qla2x00t_git/qla2x00-target qla2x00t/qla2x00-target; do
if [ -e $d ]; then
DESTDIR=%{buildroot} INSTALL_MOD_PATH=%{buildroot} %{make} -C $d install
break
fi
done
rm -f %{buildroot}/lib/modules/%{kversion}/[Mm]odule*
%clean