1*4882a593SmuzhiyunSUMMARY = "Linux SCSi tools to service maintain disk storage devices"
2*4882a593SmuzhiyunDESCRIPTION = "scsirastools were designed to add to the Serviceability of \
3*4882a593Smuzhiyun               SCSI devices under Linux so that the system does not have \
4*4882a593Smuzhiyun               to be rebooted or taken out of service to perform common \
5*4882a593Smuzhiyun               maintenance or service functions. It handles SCSI, \
6*4882a593Smuzhiyun               Linux SW RAID, SAS, SATA, and USB devices via SCSI emulation."
7*4882a593SmuzhiyunHOMEPAGE = "http://scsirastools.sourceforge.net/"
8*4882a593SmuzhiyunLICENSE = "BSD-3-Clause"
9*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=687ea108478d26152ae46eb29d9d1545"
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunDEPENDS += "groff-native"
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunSRC_URI = "http://prdownloads.sourceforge.net/scsirastools/scsirastools-${PV}.tar.gz \
14*4882a593Smuzhiyun           file://mdadm.patch;apply=no \
15*4882a593Smuzhiyun           file://print-format.patch \
16*4882a593Smuzhiyun"
17*4882a593SmuzhiyunSRC_URI[md5sum] = "6271a61b2ce40aaf33ef61775148cda1"
18*4882a593SmuzhiyunSRC_URI[sha256sum] = "e7b997e75decb06a650c42c35cd63d0c94c34e39cf133c723337b0eeabbfdf6a"
19*4882a593Smuzhiyun
20*4882a593Smuzhiyuninherit autotools update-rc.d
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun# mdadm Makefile has CC set to gcc, hence override CC to ${CC}
23*4882a593SmuzhiyunEXTRA_OEMAKE += "CC='${CC}'"
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun
26*4882a593Smuzhiyundo_configure:append() {
27*4882a593Smuzhiyun	oe_runmake -C mdadm.d mdadm-1.3.0
28*4882a593Smuzhiyun	patch -p0 < ${WORKDIR}/mdadm.patch
29*4882a593Smuzhiyun}
30*4882a593SmuzhiyunINITSCRIPT_PACKAGES = "${PN}-diskmon ${PN}-raidmon"
31*4882a593SmuzhiyunINITSCRIPT_NAME:${PN}-diskmon = "sgdisk"
32*4882a593SmuzhiyunINITSCRIPT_PARAMS:${PN}-diskmon = "defaults 80 20"
33*4882a593SmuzhiyunINITSCRIPT_NAME:${PN}-raidmon = "sgraid"
34*4882a593SmuzhiyunINITSCRIPT_PARAMS:${PN}-raidmon = "defaults 80 20"
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunPACKAGES =+ "${PN}-diskmon"
37*4882a593SmuzhiyunPACKAGES =+ "${PN}-raidmon"
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunRPROVIDES:${PN}-dbg += "${PN}-diskmon-dbg ${PN}-raidmon-dbg"
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunFILES:${PN}-diskmon = "${sbindir}/sgdiskmon ${sysconfdir}/init.d/sgdisk"
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunFILES:${PN}-raidmon = "${sbindir}/sgraidmon ${sysconfdir}/init.d/sgraid"
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunRDEPENDS:${PN} += "bash"
46*4882a593SmuzhiyunRDEPENDS:${PN}-diskmon += "${PN} bash"
47*4882a593SmuzhiyunRDEPENDS:${PN}-raidmon += "${PN} bash"
48