summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1b06bacdd39cd40d8f8cca1ef5e0bc9b305993ac (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
# Maintainer: Echo J. <aidas957 at gmail dot com>
# Contributor: Sebaguardian <sebaguardian13@gmail.com>
# Contributor: Adam Perkowski <adas1per@protonmail.com>
# https://github.com/adamperkowski/PKGBUILDs

# shellcheck shell=bash disable=SC2034,SC2164

pkgname=arnis
pkgver=2.6.0
pkgrel=1
pkgdesc='Generate any location from the real world in Minecraft'
arch=('x86_64')
url="https://github.com/louis-e/${pkgname}"
license=('Apache-2.0')
depends=('cairo' 'gdk-pixbuf2' 'glib2' 'gtk3' 'hicolor-icon-theme'
         'libsoup3' 'wayland' 'webkit2gtk-4.1')
makedepends=('cargo')
conflicts=("${pkgname}-bin" "${pkgname}-git")
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('33a23b910222b087d0569a8db77e17a220fe219e3ff7d1307543b0be699d3373')

prepare() {
    cd "${pkgname}-${pkgver}"

    export RUSTUP_TOOLCHAIN=stable
    cargo fetch --locked --target host-tuple
}

build() {
    cd "${pkgname}-${pkgver}"

    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release
}

package() {
    cd "${pkgname}-${pkgver}"

    install -Dm755 "target/release/${pkgname}" -t "${pkgdir}/usr/bin"
    install -Dm644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"

    # Desktop integration files
    install -Dm644 "src/gui/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
    install -Dm644 icons/icon.png "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${pkgname}.png"
    install -Dm644 icons/128x128.png "${pkgdir}/usr/share/icons/hicolor/128x128/apps/${pkgname}.png"
}

# vim: ts=4 sw=4 et: