blob: a501becdaf0bfa83d16542b320cd68bfb869e402 (
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
|
# Maintainer: Amir Zarrinkafsh <nightah at me dot com>
pkgname=authelia
pkgver=4.5.0
pkgrel=1
pkgdesc="The Cloud ready multi-factor authentication portal for your Apps."
arch=('x86_64' 'aarch64' 'armv7h')
url="https://github.com/authelia/authelia"
license=('Apache-2.0')
makedepends=(
'gcc'
'git'
'go'
'nodejs'
'yarn'
)
conflicts=(
'authelia-bin'
'authelia-git'
)
backup=('etc/authelia/configuration.yml')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('d4bbf60af460e0b3047f31cb46e0ef66e47ef257db1e0675140f58b253fa0be8')
build() {
cd "$srcdir/$pkgname-$pkgver"
sed -i "s/__BUILD_TAG__/v${pkgver}/" cmd/authelia/constants.go
sed -i "s/__BUILD_COMMIT__/$(git rev-parse --verify v${pkgver})/" cmd/authelia/constants.go
go build -ldflags '-w' -trimpath -o authelia cmd/authelia/*.go
cd web
yarn install --frozen-lockfile
yarn build
}
package() {
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
install -Dm700 "${srcdir}/${pkgname}-${pkgver}/config.template.yml" "${pkgdir}/etc/${pkgname}/configuration.yml"
install -Dm755 "${srcdir}/${pkgname}-${pkgver}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
install -dm655 "${pkgdir}/usr/share/webapps/${pkgname}"
cp -r "${srcdir}/${pkgname}-${pkgver}/web/build/." "${pkgdir}/usr/share/webapps/${pkgname}/"
}
|