diff --git a/Makefile b/Makefile index bdcca8243..d4374f7e0 100644 --- a/Makefile +++ b/Makefile @@ -429,10 +429,16 @@ dpkg: ../scst_$(VERSION).orig.tar.gz echo "KVER=$(KVER)" && \ sed 's/%{scst_version}/$(VERSION)/' \ debian/scst.dkms && \ - sed 's/%{KVER}/$(KVER)/' \ - debian/scst.preinst && \ - sed 's/%{KVER}/$(KVER)/' \ - debian/scst.postinst && \ + if echo "$(KVER)" | grep -q "debug+truenas"; then \ + mv debian/scst.install debian/scst-dbg.install && \ + sed 's/%{KVER}/$(KVER)/' \ + debian/scst-dbg.postinst; \ + else \ + sed 's/%{KVER}/$(KVER)/' \ + debian/scst.preinst && \ + sed 's/%{KVER}/$(KVER)/' \ + debian/scst.postinst; \ + fi && \ output_files=( \ ../*_$(VERSION)-$(DEBIAN_REVISION)_*.deb \ ../*_$(VERSION)-$(DEBIAN_REVISION)_*.ddeb \ diff --git a/debian/control.dbgmodules b/debian/control.dbgmodules new file mode 100644 index 000000000..eb17723bb --- /dev/null +++ b/debian/control.dbgmodules @@ -0,0 +1,18 @@ +Source: scst +Section: net +Priority: optional +Maintainer: Vladislav Bolkhovitin +Build-Depends: debhelper (>= 9), + quilt, + dpkg-dev (>= 1.13.19) +Standards-Version: 4.1.1 +Homepage: http://scst.sourceforge.net + +Package: scst-dbg +Architecture: any +Depends: ${misc:Depends} +Conflicts: scst-dkms +Description: Generic SCSI target framework + SCST is a SCSI target framework that allows local block device data to be + accessed over a storage network via the iSCSI, FC, SRP or FCoE protocol. + This package contains the SCST kernel modules. diff --git a/debian/rules b/debian/rules index 8424310e4..ba515b7a3 100755 --- a/debian/rules +++ b/debian/rules @@ -33,8 +33,13 @@ VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') clean: dh_testdir && \ dh_prep -Xqla_isp/TAGS -Xdebian/changelog && \ - scripts/clean-source-tree -x debian/changelog -x debian/compat -x debian/scst.preinst \ - -x debian/scst.postinst + if echo "$(KVER)" | grep -q "debug+truenas"; then \ + scripts/clean-source-tree -x debian/changelog -x debian/compat -x debian/scst-dbg.install \ + -x debian/scst-dbg.postinst ; \ + else \ + scripts/clean-source-tree -x debian/changelog -x debian/compat -x debian/scst.preinst \ + -x debian/scst.postinst ; \ + fi build: [ -n "$(QLA_INI_DIR)" ] && \