summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c4f9832f82b81a1853eff706236f40c278d33c16 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Maintainer: taotieren <admin@taotieren.com>

pkgname=python-ctf-dl
_name=${pkgname#python-}
pkgver=0.3.3
pkgrel=1
pkgdesc="Command-line tool to download CTF challenges"
provides=(${pkgname})
conflicts=(${pkgname})
arch=('any')
url="https://github.com/bjornmorten/ctf-dl"
_pydeps=(
    jinja
    httpx
    pydantic
    slugify
    rich
    typer
    yaml
# AUR
    ctfbridge
)
depends=(
    'mdformat'
    'mdformat-tables'
    'python'
    "${_pydeps[@]/#/python-}"
)
makedepends=(
    'git'
    'python-build'
    'python-installer'
    'python-setuptools'
    'python-setuptools-scm'
    'python-wheel'
)
optdepends=(
    'python-ctf-sniper: An automated flag submission tool'
    'python-pwnv: A CTF workspace management tool'
)
license=('MIT')
source=("${_name}::git+${url}.git#tag=v$pkgver")
sha256sums=('592da6e03f426e95d1448a9e6a87d4198b9c2913564c138c01d8e8589ae335ed')

prepare() {
    git -C "${srcdir}/${_name}" clean -dfx
}

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

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