summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dfda22bafd4af75545b6b3e73ecbe10705952227 (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
# Maintainer: RiverOnVenus <error@zhui.dev>
pkgname=kernel-hardening-checker-git
pkgver=0.6.6.r40.g0b96b5b
pkgrel=1
pkgdesc='A tool for checking the security hardening options of the Linux kernel'
url="https://github.com/a13xp0p0v/kernel-hardening-checker"
arch=('any')
license=('GPL-3.0-only')
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 'python-setuptools')
provides=('kernel-hardening-checker')
conflicts=('kernel-hardening-checker')
source=("$pkgname"::"git+${url}")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --long --tags --abbrev=7 | sed 's/^v//;s/-/.r/;s/-/./'
}

prepare(){
  cd $pkgname
  git clean -dfx
}

build() {
    cd $pkgname
    python -m build --wheel --no-isolation
}

package() {
    cd $pkgname
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 "$srcdir/$pkgname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}