summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bfc1336d94f964cfe85b9023202b67684adb9e1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: Andrew Shark <ashark linuxcomp.ru>

pkgname=supermicro-update-manager
pkgver=2.5.1
pkgrel=2
pkgdesc="manage the firmware and configuration for Supermicro motherboards"
arch=(x86_64)
url="https://www.supermicro.com/en/solutions/management-software/supermicro-update-manager"
license=('custom: EULA')
backup=(etc/sumrc)
_rel_date=20201112
source=("sum_${pkgver}_Linux_x86_64_${_rel_date}.tar.gz::https://www.supermicro.com/SwDownload/SwSelect_Free.aspx")
sha256sums=("7606a88c337f30bd155a8ea30a16c95e54989768f6c12852b8070dc2fe6dc100")

# To get this crazy value for curl, in Chromium go to the site, download software. Open web console -> Network tab -> filter method:POST you can see and copy it.
DLAGENTS=("https::/usr/bin/curl \
-d \
__EVENTTARGET=ctl00%24CPCenter%24MyGridView&__EVENTARGUMENT=Action%241&ctl00_TreeView_BackToSMCI_ExpandState=n&ctl00_TreeView_BackToSMCI_SelectedNode=&ctl00_TreeView_BackToSMCI_PopulateLog=&__VIEWSTATE=%2FwEPDwULLTE4ODkyNjU0NDcPFgIeDVNvcnRFeHByVmFsdWUFBnN3TmFtZRYCZg9kFgICAw9kFgwCBw9kFggCBw8PFgQeBVdpZHRoGwAAAAAAwIJAAQAAAB4EXyFTQgKAAmQWAgIDDw8WAh4EVGV4dAUDU1VNZGQCCQ88KwANAQAPFgQeC18hRGF0YUJvdW5kZx4LXyFJdGVtQ291bnQCBGQWAmYPZBYKAgEPZBYQZg8PFgIfAwU5U3VwZXJtaWNybyBVcGRhdGUgTWFuYWdlciAoU1VNIGZvciBMaW51eC9XaW5kb3dzL0ZyZWVCU0QpZGQCAQ8PFgIfAwUQQlNEIHg2NCwgQlNEIHg4NmRkAgIPDxYCHwMFBnRhci5nemRkA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qdDALa2e7mBQLa2bLUDwLa2cawB7%2FrA5ZwTs0THYWn9Mh8UN3HaK5T&ctl00%24CPCenter%24Hidden_EmailAddress=1%401.2&ctl00%24CPCenter%24Hidden_RequestType=0&ctl00%24CPCenter%24Hidden_Category=SUM \
--compressed -o %o"
)

package() {
	cd sum_"$pkgver"_Linux_x86_64
	
	install -Dm766 sumrc.sample "$pkgdir/etc/sumrc"
	sed -i '1{s|.*|# To use this config you should symlink to this file with "ln -s /etc/sumrc $HOME/.sumrc" command.|}' "$pkgdir/etc/sumrc"
	sed -i '2{s|.*|# Alternatively, invoke supermicro-update-manager with "--rc_path=/etc/sumrc" parameter.|}' "$pkgdir/etc/sumrc"
	sed -i 's|#journal_path = /home/administrator/journal/supermicro/test|journal_path = /var/log/supermicro-update-manager|' "$pkgdir/etc/sumrc"
	sed -i 's|#journal_level = 0|journal_level = 6|' "$pkgdir/etc/sumrc"

	install -m757 -d "${pkgdir}"/var/log/supermicro-update-manager
	
	# acpica_bin folder: contains acpidump and acpiexec. I do not know when they are used, so did not packaged them.
	# driver folder: sum_bios.ko only needed if InBand SMI E7h support is not implemented in BIOS. I have not seen such systems, but if you have, please contact me and I will edit pkgbuild.
	# ExternalData folder: contains SMCIPID.txt, tui.fnt, VENID.txt. I do not know when they are used, so did not packaged them.
	
	install -D SUM_UserGuide.pdf "$pkgdir/usr/share/doc/supermicro-update-manager/SUM_UserGuide.pdf"
	install -D PlatformFeatureSupportMatrix.pdf "$pkgdir/usr/share/doc/supermicro-update-manager/PlatformFeatureSupportMatrix.pdf"
	install -Dm755 sum "$pkgdir/usr/bin/supermicro-update-manager" # rename executable file to not conflict with gnu sum.
	
	# policy_sample.xml: I did not packaged it (yet at least).
	
	msg2 "Warning! I did not explored all files extensively yet. Some files may be missing from original archive. See PKGBUILD for details."
}