Diff storcli-1.20.15 with a storcli-1.21.06

/usr/portage/sys-block/storcli/storcli-1.21.06.ebuild 2019-12-26 18:09:00.000000000 +0300
5 5

  
6 6
inherit pax-utils
7 7

  
8
# Upstream messed up packaging:
9
# This is v1.21.06 according to "storcli -v" but ZIP is named v1.21.16..
10
# Also, README is isn't included in archive.
11
MY_PV="1.21.16"
12

  
8 13
DESCRIPTION="MegaRAID StorCLI (successor of the MegaCLI)"
9
HOMEPAGE="http://www.avagotech.com/support/download-search?dnd-keyword=storcli"
10
# For new versions check http://www.avagotech.com/cs/Satellite?pagename=AVG2/Utilities/searchResultsJson&page=1&q=storcli&endDate=null&searchType=type-AVG_Document_C~Downloads&isEntitled=null&dynamic-search-relevance=Newest
11
SRC_URI="https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/${PV}_StorCLI.zip -> ${P}.zip"
14
HOMEPAGE="https://www.broadcom.com/support/download-search?dk=storcli"
15
SRC_URI="https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/${MY_PV}_StorCLI.zip -> ${P}.zip
16
	https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/${PV}_StorCLI.txt -> ${P}_readme.txt"
12 17

  
13 18
LICENSE="Avago LSI BSD"
14
SLOT="0/6.12"
19
SLOT="0/6.13"
15 20
KEYWORDS="-* amd64 x86"
16 21
IUSE=""
17 22

  
......
25 30
QA_PRESTRIPPED="${MY_STORCLI_BASEDIR:1}/storcli"
26 31

  
27 32
src_unpack() {
28
	unpack ${A}
33
	local _src_file
34

  
35
	for _src_file in ${A}; do
36
		if [[ ${_src_file} == *.txt ]]; then
37
			cp "${DISTDIR}/${_src_file}" "${WORKDIR}" || die "Failed to copy '${_src_file}' to '${WORKDIR}'!"
38
		else
39
			unpack ${_src_file}
40
		fi
41
	done
42

  
43
	mv versionChangeSet/univ_viva_cli_rel/storcli_All_OS.zip "${WORKDIR}" || die "Failed to move storcli_All_OS.zip"
44
	rm -rf versionChangeSet || die "Failed to cleanup upstream's archive mess (versionChangeSet)"
45
	rm -rf cqAttachments || die "Failed to cleanup upstream's archive mess (cqAttachments)"
46
	unpack "${WORKDIR}"/storcli_All_OS.zip
29 47

  
30
	mv storcli_All_OS/storcli_All_OS/Ubuntu/storcli_*.deb "${WORKDIR}" || die "Failed to move storclli_*.deb"
48
	mv storcli_All_OS/Ubuntu/storcli_*.deb "${WORKDIR}" || die "Failed to move storclli_*.deb"
31 49

  
32 50
	# Unpack Ubuntu package which will be our $S content
33 51
	unpack "${WORKDIR}"/storcli_*.deb
......
41 59
	default
42 60

  
43 61
	# Create clean $S
44
	mv "${WORKDIR}"/*CLI.txt "${S}"/readme.txt || die "Failed to move *CLI.txt to readme.txt"
45
	mv "${WORKDIR}"/storcli_All_OS/storcli_All_OS/Linux/license.txt "${S}"/license.txt || die "Failed to move Linux/license.txt"
46
	rm -rf "${WORKDIR}"/storcli_all* || die "Failed to cleanup storcli_all* dirs/files"
62
	mv "${WORKDIR}"/*_readme.txt "${S}"/readme.txt || die "Failed to move *CLI.txt to readme.txt"
63
	mv "${WORKDIR}"/storcli_All_OS/Linux/license.txt "${S}"/license.txt || die "Failed to move Linux/license.txt"
64
	rm -rf "${WORKDIR}"/storcli_All* || die "Failed to cleanup storcli_all* dirs/files"
47 65
	mv "${WORKDIR}"/opt/Mega*/storcli/* "${S}" || die "Failed to move storcli_.deb content to '${S}'"
48 66
	rm -rf "${WORKDIR}"/{opt,control.tar.gz,data.tar.gz,debian-binary} || die "Failed to cleanup no longer needed files"
49 67
}
Thank you!