summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e4f9e87513bed6a61410ddd18ce753a79aba1b67 (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
59
60
61
# Maintainer: Nagy Roland <roliboy@protonmail.com>

pkgname=ciphey
pkgver=5.14.0
pkgrel=6
pkgdesc="Automated decryption tool"
arch=("any")
url="https://github.com/Ciphey/Ciphey"
license=("MIT")
depends=(
    "flake8"
    "python"
    "python-appdirs"
    "python-base58" #aur
    "python-base91" #aur
    "python-click"
    "python-loguru" #aur
    "python-mock"
    "python-cipheycore"
    "python-cipheydists"
    "python-pyaml"
    "python-pybase62" #aur
    "python-pylint"
    "python-pywhat" #aur
    "python-rich"
    "python-typing_inspect"
)
makedepends=(
    "patch"
    "python-setuptools"
    "python-poetry"
)
provides=("ciphey")
source=(
    "$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz"
    "what.py.patch"
)
sha256sums=(
    "42fd5ea5b462ab37cb2e6aed41c254e7ed44bb190fed9a3918e6bdd56d86e10f"
    "720914463a9004a78ee685a2124c1b1d915609705ef84b1cafdf448d7c796198"
)

build() {
    cd "$srcdir/Ciphey-$pkgver"
    cd "ciphey/basemods/Checkers"
    patch "what.py" < "$srcdir/what.py.patch"

    cd "$srcdir/Ciphey-$pkgver"
    poetry build

    cd dist
    tar xf "ciphey-$pkgver.tar.gz"
    cd "ciphey-$pkgver"
    python setup.py build
}

package() {
    cd "$srcdir/Ciphey-$pkgver/dist/ciphey-$pkgver"
    python setup.py install --root="$pkgdir" --optimize=1 --skip-build
    install -Dm644 "$srcdir/Ciphey-$pkgver/license" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}