From c8b2fd0808087e05a62a62cbb616ed46dffd3dc7 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 28 Oct 2015 18:10:19 +0000 Subject: [PATCH] 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 --- Makefile | 13 ++++++++----- scst.spec.in | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e17b06726..c984d1a62 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/scst.spec.in b/scst.spec.in index c1c067c79..b6b528f7b 100644 --- a/scst.spec.in +++ b/scst.spec.in @@ -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