summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7ef619a3609105e7c0380a70eedc89687b26ce9d (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
# Maintainer: Adam Perkowski <adas1per@protonmail.com>
# https://github.com/adamperkowski/PKGBUILDs
_pkgname=jule
__pkgname="${_pkgname}fmt"
pkgname="$__pkgname-git"
pkgver=1.r0.ga2dc2be
pkgrel=1
pkgdesc='The Jule Programming Language Code Formatter'
arch=('x86_64' 'aarch64' 'i386')
url="https://github.com/${_pkgname}lang/$__pkgname"
license=('BSD-3-Clause')
groups=('jule')
source=("git+$url.git")
sha256sums=('SKIP')
depends=('gcc-libs')
makedepends=('julec-git' 'git')
provides=("$__pkgname")
conflicts=("$__pkgname")

pkgver() {
    cd "$__pkgname"
    echo "1.r$(git describe --all --long | sed 's/-/./g' | cut -d '.' -f 2-)"
}

build() {
    cd "$__pkgname"
    mkdir -p bin
    echo "Building $__pkgname for $CARCH..."
    julec --opt-deadcode -o "bin/$__pkgname" ./src
}

check() {
    cd "$__pkgname"
    julec test ./src
}

package() {
    cd "$__pkgname"
    install -Dm0755 "bin/$__pkgname" -t "$pkgdir/usr/bin"
    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
    install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
}