summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9099a9a673f742a1fd4673f62e34c7fbc49e8634 (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
# Maintainer: Frederick Gnodtke <frederick at gnodtke dot de>

pkgname=rust-xtensa-git
pkgver=r95593.b365cff
pkgrel=1
pkgdesc='Rust for ESP32 xtensa.'
arch=('x86_64')
url='https://github.com/MabezDev/rust-xtensa'
license=('GPL')
makedepends=(
    'git'
    'ninja'
    'cmake'
    'llvm-xtensa')
provides=('rust-xtensa')
source=('git://github.com/MabezDev/rust-xtensa')
sha256sums=('SKIP')
install=rust-xtensa-git.install

_gitname='rust-xtensa'

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

build() {
    cd $_gitname 
    ./configure --llvm-root="/opt/llvm-xtensa" --prefix="${pkgdir}/opt/rust-xtensa"
    # Apparently this clones the dependencies.
    python x.py --help || true
    python x.py build

}

package() {
    cd $_gitname
    mkdir -p "${pkgdir}/opt/rust-xtensa"
    python x.py install
}