summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 953bf874125aedf137e90b20cf10b35010d7899c (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Maintainer: Brycen Granville <brycengranville@outlook.com>
pkgbase=snapx
pkgname=(snapx snapx-ui)
pkgver=0.4.0~alpha.r705.g5c6ddf7
pkgrel=2
pkgdesc="Screenshot tool that handles images, text, and video (fork of ShareX)"
arch=('x86_64' 'aarch64')
url="https://github.com/SnapXL/SnapX"
license=('GPL-3.0-or-later')
makedepends=(
    'git'
    'dotnet-sdk>=10.0'
    'clang'
    'zlib'
)
source=("$pkgbase::git+https://github.com/SnapXL/SnapX.git#branch=develop")
sha256sums=('SKIP')

pkgver() {
    cd "$pkgbase"
    git checkout -B develop >/dev/null 2>&1
    ver=$(./build.sh --version | tail -n1 | sed -E 's/^(.*)-(.*)\.([0-9]+)\+(.*)$/\1~\2.r\3.\4/')
    echo "$ver"
}

build() {
    cd "$pkgbase"
    export VERSION=$pkgver
    export PKGTYPE=ARCH
    # Build logic requires being on a known branch
    git checkout -B develop
    ./build.sh --configuration Release
}

check() {
    cd "$pkgbase"
    Output/snapx/snapx --version
}

package_snapx() {
    depends=(
        'ffmpeg'
        'fontconfig'
        'freetype2'
        'openssl'
        'icu'
        'at'
        'sudo'
        'libxrandr'
        'libxcb'
        'dbus'
        'xdg-utils'
    )
    optdepends=(
        'mesa-utils: Graphics hardware information'
        'xorg-xrandr: Display configuration diagnostics'
    )

    cd "$pkgbase"
    ./build.sh install --prefix /usr --dest-dir "${pkgdir}" --assembly snapx --skip compile
}

package_snapx-ui() {
    pkgdesc="Screenshot tool that handles images, text, and video (fork of ShareX). SnapX Avalonia-based UI (works best on X11)"
    depends=('snapx')

    cd "$pkgbase"
    ./build.sh install --prefix /usr --dest-dir "${pkgdir}" --assembly snapx-ui --skip compile
}