makedeb


gotktrix 362.1876-1


Matrix client in Go and GTK4

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for gotktrix.

# Maintainer: Chinmay Dalal <w5vwg64uy@relay.firefox.com>
pkgname=gotktrix
license=('AGPL3')
pkgver=362.1876
pkgrel=1
pkgdesc="Matrix client in Go and GTK4"
arch=('amd64' 'arm64' 'armel' 'armhf' 
'i386' 'mipsel' 'mips64el' 'ppc64el' 's390x')
url="https://github.com/diamondburned/${pkgname}"
makedepends=('golang' 'git' 'libcairo2-dev' 
'gobject-introspection' 'libgtk-4-dev' 
'libgraphene-1.0-dev' 'libgdk-pixbuf2.0-dev'
'libpango1.0-dev')
depends=('gobject-introspection' 'libgtk-4-1'
'libcairo2' 'libgraphene-1.0-0' 'libpango1.0-0'
'libgdk-pixbuf2.0-0')

provides=("${pkgname}")
conflicts=("${pkgname}")
source=($pkgname::"git+${url}.git")
sha256sums=('SKIP')


build() {
    export GOPATH="$srcdir/go"
    cd "$pkgname"

    export CGO_CPPFLAGS="${CPPFLAGS}"
    export CGO_CFLAGS="${CFLAGS}"
    export CGO_CXXFLAGS="${CXXFLAGS}"
    export CGO_LDFLAGS="${LDFLAGS}"
    export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"

    go build -o "${pkgname}"  -v .
}


package() {
    cd "$pkgname"
    install -Dm755 "$srcdir/$pkgname/${pkgname}" "$pkgdir/usr/bin/${pkgname}"
    install -Dm644 .nix/com.github.diamondburned.gotktrix.desktop "$pkgdir//usr/share/applications/${pkgname}.desktop"
}