blob: c9a426f09b03f60373b6801232dc7dd4620555f2 (
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
|
# Maintainer: Matt Cuneo <m@cuneo.au>
_pkgname='matrix-authentication-service'
pkgname="$_pkgname-git"
pkgver=r2156.ba95dd02
pkgrel=4
pkgdesc='Authentication service for Matrix Synapse'
arch=('x86_64')
url="https://github.com/matrix-org/$_pkgname"
license=('AGPL3')
install="$_pkgname.install"
provides=('mas-cli')
depends=()
makedepends=(
'nodejs'
'rust'
'opa'
'npm'
)
source=(
"$_pkgname::git+$url.git"
sysusers.conf
tmpfiles.conf
systemd.service
systemd-worker.service
)
b2sums=('SKIP'
'e32a10d979cb385be8191ac29096ff25ea6233f693a5ec0aaf3eff76411aca4bd9298dfe36585da36f2128cf2f2e48878ffcf2c5a44452d86970e57ee77098d3'
'ea50947ebff8eb1c174d0037ba11a6b1c9b22caf55025cbe9afb1c9055c2ead02923298e1301a6187eb4484179a88ec630469ebcbdcce0d8da8ae29b2fca1c23'
'fd206cf9fbe26f3509053f3893066c6368024e8569194981085aff7bdbe65ecdcdd4384a5ba8119e1e6114eb576b9c683552c09f865f09e5171feecf3f0254f3'
'39ba8399ca52b5bc5984f4fd426f812d6017a096368b3e63e16c0d9a0a2ec695b02b418b821adc62fb29609803355a1f673da3be7af5d9436e3c49e461d7d049')
pkgver() {
cd "$_pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$_pkgname"
cd frontend
npm ci
npm run build
cd ../policies
make
cd ..
cargo build --release
}
package() {
install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
install -vDm644 systemd-worker.service "$pkgdir/usr/lib/systemd/system/$_pkgname-worker.service"
install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf"
install -vDm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf"
cd "$_pkgname"
install -vd "$pkgdir/etc/$_pkgname"
install -vd "$pkgdir/usr/share/$_pkgname/frontend"
cp -R frontend/dist "$pkgdir/usr/share/$_pkgname/frontend"
cp -R policies templates translations "$pkgdir/usr/share/$_pkgname"
install -vDm755 -t "$pkgdir/usr/bin" target/release/mas-cli
}
|