summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d65cbb457af65283d99e5719b73a85bd9482d2a3 (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
# Maintainer: Feresey <p.milko1999@yandex.ru>
# Contributor: Joost Cassee <joost@cassee.net>

pkgname=shellgpt-git
_pkgname=shell_gpt
pkgver=1.0.1.r1.g4b670cf
pkgrel=1
pkgdesc="A command-line productivity tool powered by OpenAI's ChatGPT (GPT-3.5)"
arch=('any')
url="https://github.com/TheR1D/shell_gpt"
license=('MIT')
provides=("${pkgname}")
makedepends=(
    'git'
    'python-build'
    'python-installer'
    'python-wheel'
)
depends=(
    'python-distro'
    'python-typer'
    'python-requests'
    'python-rich'
    'python-openai'
    'python-click'
    'python-typing_extensions'
)
source=("git+https://github.com/TheR1D/shell_gpt.git")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${_pkgname}"

    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "${srcdir}/${_pkgname}"
    
    python -m build .
}

package() {
    cd "${srcdir}/${_pkgname}"

    python -m installer --destdir="${pkgdir}" dist/*.whl
    install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
    install -D -m644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}