-
-
Notifications
You must be signed in to change notification settings - Fork 596
/
Copy pathPKGBUILD
60 lines (47 loc) · 1.58 KB
/
PKGBUILD
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.
pkgname=chipsec
pkgver=1075.9a2536c
pkgrel=1
epoch=4
pkgdesc='Platform Security Assessment Framework.'
groups=('blackarch' 'blackarch-hardware' 'blackarch-binary' 'blackarch-forensic'
'blackarch-scanner' 'blackarch-fuzzer')
arch=('x86_64' 'aarch64')
url='https://github.com/chipsec/chipsec'
license=('GPL2')
depends=('dkms' 'libelf' 'linux-headers' 'nasm' 'python' 'python-lxml')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/chipsec/$pkgname.git"
'Makefile.patch')
sha512sums=('SKIP'
'b3bd500b37871e8c0c9132613fd9254014c5288b24d7e88acacc695dbb3ff2d384c72186536e2fe5225c31b438f5d08fad991503c9335021cf03c3ed8c29e85f'
)
pkgver() {
cd $pkgname
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
prepare() {
cd "$pkgname/drivers/linux"
patch -Np0 < "$srcdir/Makefile.patch"
}
build() {
cd $pkgname
python setup.py build
}
package() {
cd $pkgname
python setup.py install --prefix=/usr --root="$pkgdir" -O1 --skip-build \
--skip-driver
install -Dm 644 drivers/linux/dkms.conf \
"$pkgdir/usr/src/$pkgname-$pkgver/dkms.conf"
cp -a --no-preserve=ownership drivers/linux/* \
"$pkgdir/usr/src/$pkgname-$pkgver/"
install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md \
chipsec-manual.pdf
install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE COPYING
rm -f "$pkgdir/usr/chipsec-manual.pdf"
for i in "$pkgdir/usr/bin/"*; do
mv $i "$(echo $i | tr -s '_' '-')"
done
}