blob: 6a2bba9f6b7ad9f2578232501ee3e8827832668d (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
|
pkgname=ayllu-git
_pkgname=ayllu
pkgver=0.0.0
pkgrel=1
pkgdesc="Ayllu Forge"
arch=("x86_64")
license=("AGPL3")
url="https://ayllu-forge.org/projects/ayllu"
depends=(
"git"
)
makedepends=(
"rust"
"sqlx-cli"
"sassc"
"npm"
"capnproto"
)
provides=("ayllu-git")
optdepends=()
source=(
"$_pkgname::git+https://ayllu-forge.org/projects/${_pkgname}"
)
sha256sums=("SKIP")
build() {
cd $_pkgname
[[ -f db/state.db ]] && rm db/state.db
scripts/init_db_if_missing.sh
cargo build --release
cargo build --release --package ayllu-mail
npm install
scripts/compile_stylesheets.sh
}
package() {
cd $_pkgname
install -Dm755 "target/release/ayllu" $pkgdir/usr/bin/ayllu
install -Dm755 "target/release/ayllu-mail" $pkgdir/usr/bin/ayllu-mail
install -Dm644 "LICENSE" $pkgdir/usr/share/licenses/ayllu
install -Dm644 "config.example.toml" $pkgdir/etc/ayllu/config.example.toml
install -Dm644 "contrib/systemd/system/ayllu.service" $pkgdir/usr/lib/systemd/system/ayllu.service
install -Dm644 "contrib/systemd/user/ayllu.service" $pkgdir/usr/lib/systemd/user/ayllu.service
install -Dm644 "contrib/systemd/ayllu-sysusers.conf" $pkgdir/usr/lib/sysusers.d/ayllu-sysusers.conf
install -Dm755 "contrib/hooks/post-commit" $pkgdir/usr/share/ayllu/hooks/post-commit
install -Dm755 "contrib/hooks/post-receive" $pkgdir/usr/share/ayllu/hooks/post-receive
install -Dm644 "themes/default/main.min.css" $pkgdir/usr/share/ayllu/themes/default/main.min.css
find themes/default/templates -name '*.html' -exec install -Dm644 {} $pkgdir/usr/share/ayllu/{} \;
find themes/default/assets -type f -exec install -Dm644 {} $pkgdir/usr/share/ayllu/{} \;
install -Dm644 "themes/tokyonight/main.min.css" $pkgdir/usr/share/ayllu/themes/tokyonight/main.min.css
find themes/tokyonight/templates -name '*.html' -exec install -Dm644 {} $pkgdir/usr/share/ayllu/{} \;
install -Dm644 "themes/adwaita/main.min.css" $pkgdir/usr/share/ayllu/themes/adwaita/main.min.css
find themes/adwaita/templates -name '*.html' -exec install -Dm644 {} $pkgdir/usr/share/ayllu/{} \;
}
|