summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ea95edcfa4e0dd8e7d7f917d5773eca120e440c1 (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
# Maintainer: Sashanoraa <sasha@noraa.gay>

pkgname=stargazer-gmi
pkgver=1.3.1
pkgrel=1
pkgdesc="stargzer gemini server"
arch=('x86_64' 'i686' 'arm' 'armv7h' 'aarch64')
url="https://sr.ht/~zethra/stargazer/"
license=('AGPL3')
source=("$pkgname-$pkgver.tar.gz::https://git.sr.ht/~zethra/stargazer/archive/$pkgver.tar.gz")
depends=()
options=('!lto')
makedepends=('rust' 'cargo-auditable' 'scdoc')
sha256sums=('ae0be1c13523d2a38df3c4055a7167d7f31d3649bced9587304d2b8d7dc24c10')

prepare() {
    cd "stargazer-$pkgver"
    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
    cd "stargazer-$pkgver"
    CGFLAGS='--locked --release' ./scripts/build
}

package() {
    install -Dm644 ../stargazer.service "$pkgdir/usr/lib/systemd/system/stargazer.service"
    cd "stargazer-$pkgver"
    source ./scripts/install --prefix="$pkgdir/usr" \
        --sysconfdir="$pkgdir/etc" \
        --bashdir="$pkgdir/usr/share/bash-completion/completions" \
        --zshdir="$pkgdir/usr/share/zsh/site-functions" \
        --fishdir="$pkgdir/usr/share/fish/vendor_completions.d"
}