blob: eba5aa497adb56ae4d73e28fce41ef4c8fb83517 (
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
|
# Maintainer: metamuffin <metamuffin@disroot.org>
pkgname=statuspage-git
pkgver=r21.e815f6c
pkgrel=1
pkgdesc="service status page"
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url="https://codeberg.org/metamuffin/statuspage"
license=('AGPL3')
makedepends=('rustup')
backup=('etc/statuspage.yaml')
source=("git+https://codeberg.org/metamuffin/statuspage.git"
"statuspage.service"
"statuspage.yaml"
"sysusers.conf")
sha256sums=("SKIP"
"SKIP"
"SKIP"
"SKIP")
rust_chost() {
sed -e "s/-pc-linux/-unknown-linux/" -e "s/armv7l-/armv7-/" <<< "$CHOST"
}
pkgver() {
cd "statuspage"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "statuspage"
rustup default nightly
cargo +nightly fetch --locked --target "$(rust_chost)"
}
build() {
cd "statuspage"
cargo +nightly build --frozen --release --target "$(rust_chost)"
}
package() {
mkdir -p "$pkgdir/usr/share/statuspage"
install -Dm755 statuspage/target/$(rust_chost)/release/statuspage "$pkgdir/usr/bin/statuspage"
install -Dm644 statuspage.service "$pkgdir/usr/lib/systemd/system/statuspage.service"
install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/statuspage.conf"
install -Dm644 statuspage/COPYING "$pkgdir/usr/share/licenses/statuspage/COPYING"
install -Dm644 statuspage.yaml "$pkgdir/etc/statuspage.yaml"
}
|