summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9c40161ef4c3977487547393b03d08bc86837fae (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=python-landlock
_name=${pkgname#python-}
pkgver=1.0.0.dev4
pkgrel=1
pkgdesc="Python interface to the Landlock Linux Security Module"
arch=('any')
url="https://github.com/Edward-Knight/landlock"
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-flit-core' 'python-installer' 'python-wheel')
checkdepends=('python-pytest-cov' 'python-pytest-forked')
source=("$_name-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('4ad39bafdd94a6210719e030f349076155148e5406a0dd7ef326728697752547')

build() {
  cd "$_name-$pkgver"
  python -m build --wheel --no-isolation
}

check() {
  cd "$_name-$pkgver"
  pytest
}

package() {
  cd "$_name-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}