summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e9a368f9b1479765784ad3b99841d3886ee59c1f (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: Sam Collier <samcollier916@gmail.com>
pkgname=ue4cli-git
pkgver=r147.fed71c1
pkgrel=1
pkgdesc="Command-line interface for Unreal Engine 4"
arch=('any')
url="https://github.com/adamrehn/ue4cli"
license=('MIT')
depends=(
    'python>=3.5'
    'python-setuptools>=38.6.0'
    'python-wheel>=0.31.0'
)
makedepends=(
    'git'
    'python-build'
    'python-installer'
    'python-wheel'
    'python-setuptools'
    'python-twine'
)
optdepends=(
    'unreal-engine: for full functionality'
    'conan: for conan-ue4cli integration'
    'docker: for containerized builds'
)
provides=("ue4cli=${pkgver}")
conflicts=('ue4cli')
source=("${pkgname}::git+https://github.com/adamrehn/ue4cli.git")
sha256sums=('SKIP')

pkgver() {
    cd "$pkgname"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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

package() {
    cd "$pkgname"
    
    python -m installer --destdir="$pkgdir" dist/*.whl
    
    # Install documentation
    install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}