summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9e7fd7e2cb4df7fedf2f40ef5fdbac1de3f8fb32 (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
# Maintainer: Delta-Sec <ayhamasfoor1@gmail.com>
pkgname=stegx
pkgver=2.0.1
pkgrel=1
pkgdesc="Authenticated LSB steganography with Argon2id, AES-GCM/ChaCha20-Poly1305, Shamir quorum and panic mode"
arch=('any')
url="https://github.com/Delta-Sec/StegX"
license=('MIT')
depends=(
    'python>=3.12'
    'python-pillow'
    'python-cryptography'
    'python-tqdm'
    'python-argon2-cffi'
)
optdepends=(
    'python-zstandard: zstd compression'
    'python-brotli: brotli compression'
    'python-zxcvbn: password strength meter'
    'python-numpy: faster cover-image preprocessing'
    'yubikey-manager: YubiKey challenge-response 2FA'
)
makedepends=(
    'python-build'
    'python-installer'
    'python-setuptools'
    'python-setuptools-scm'
    'python-wheel'
)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Delta-Sec/StegX/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('a643ab691dafce4c058a5f8b92eef56409ad87d1246ed58d8a7f5bd6bf02fdca')

build() {
    cd "${srcdir}/StegX-${pkgver}"
    SETUPTOOLS_SCM_PRETEND_VERSION="${pkgver}" python -m build --wheel --no-isolation
}

check() {
    cd "${srcdir}/StegX-${pkgver}"
    PYTHONPATH="${PWD}/src" python -m pytest tests/unit -q --no-header
}

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

    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
    install -Dm644 CHANGELOG.md "${pkgdir}/usr/share/doc/${pkgname}/CHANGELOG.md"

    if [ -f debian/stegx.1 ]; then
        install -Dm644 debian/stegx.1 "${pkgdir}/usr/share/man/man1/stegx.1"
    fi
    if [ -f completions/stegx.bash ]; then
        install -Dm644 completions/stegx.bash "${pkgdir}/usr/share/bash-completion/completions/stegx"
    fi
}