summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aba99808c5ad3b64334166faa791f872007a643d (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
# Maintainer: Andrew Glaze <candy@candy123.moe>
_pkgbasename=comlink
pkgname=${_pkgbasename}-git
pkgrel=1
pkgver=r223.46229b5
pkgdesc="An experimental IRC client"
arch=('x86_64')
url="https://github.com/rockorager/${_pkgbasename}"
provides=('comlink')
conflicts=('comlink')
license=('MIT')
depends=('glibc')
makedepends=('git' 'zig')
source=("git+https://github.com/rockorager/${_pkgbasename}.git")
sha256sums=('SKIP')


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

prepare() {
	cd "$srcdir/${_pkgbasename}"

        # Temporary workaround until dependency definition is fixed upstream
        zig fetch --save 'https://codeberg.org/atman/zg/archive/v0.13.2.tar.gz'
        zig fetch --save 'https://github.com/rockorager/libvaxis/archive/refs/tags/v0.5.1.tar.gz'
}

build() {
	cd "$srcdir/${_pkgbasename}"

        # Readme uses ReleaseSafe in the build instructions
        # using ReleaseFast may not be safe
        zig build -Doptimize=ReleaseFast
}

package() {
	cd "$srcdir/${_pkgbasename}"

        zig build -p "${pkgdir}"/usr -Doptimize=ReleaseFast
        install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}