blob: 3b542e816b4e077431dcb05ec8ba74da511460d3 (
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: kxxt <rsworktech at outlook dot com>
pkgname=shiroa
pkgver=0.2.0
pkgrel=1
pkgdesc="shiroa is a simple tool for creating modern online books in pure typst"
arch=('x86_64')
url="https://github.com/Myriad-Dreamin/shiroa"
license=('Apache-2.0')
depends=('gcc-libs')
makedepends=('cargo' 'git' 'yarn')
backup=()
options=(!lto)
source=("$pkgname::git+https://github.com/Myriad-Dreamin/shiroa#tag=v$pkgver"
"myriad-dreamin-typst::git+https://github.com/Myriad-Dreamin/typst")
b2sums=('ac0262159cc29dcbae0d76d0d59267c7567f1cc434a81b41fee3ab89e8c9e6b44294cf82df26fed4c6f416ecda301d997f14e77081bb6161a3994a4eb55ff44f'
'SKIP')
prepare() {
cd "$pkgname"
git submodule init
git config submodule.assets/artifacts.url "$srcdir/myriad-dreamin-typst"
git -c protocol.file.allow=always submodule update
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$pkgname"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo run --frozen --bin shiroa-build
cargo build --frozen --release --bin shiroa
}
check() {
cd "$pkgname"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen
}
package() {
cd "$pkgname"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
install -d "$pkgdir/usr/share/licenses/$pkgname/"
ln -s /usr/share/licenses/spdx/Apache-2.0.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|