1# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
2# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
3pkgname=alps
4pkgver=0_git20230501
5pkgrel=1
6_commit=ab8b5f7678da886eb55216832ef47a730f5a4830
7pkgdesc="Simple and extensible webmail"
8url="https://sr.ht/~migadu/alps/"
9arch="all"
10license="MIT"
11makedepends="go"
12install="$pkgname.pre-install"
13subpackages="$pkgname-openrc"
14source="$pkgname-$_commit.tar.gz::https://git.sr.ht/~migadu/alps/archive/$_commit.tar.gz
15 fix-statics-dir.patch
16
17 alps.confd
18 alps.initd
19 "
20builddir="$srcdir/alps-$_commit"
21options="!check net" # no tests in upstream
22
23build() {
24 go build -o alps ./cmd/alps
25}
26
27package() {
28 install -Dm755 alps "$pkgdir"/usr/bin/alps
29
30 install -dm755 "$pkgdir"/var/lib/alps
31 cp -r themes "$pkgdir"/var/lib/alps
32 for asset in plugins/*/public/*.html plugins/*/public/**/*; do
33 install -Dm644 "$asset" "$pkgdir"/var/lib/alps/"$asset"
34 done
35
36 install -Dm755 "$srcdir"/alps.initd "$pkgdir"/etc/init.d/alps
37 install -Dm644 "$srcdir"/alps.confd "$pkgdir"/etc/conf.d/alps
38}
39
40sha512sums="
4110e5969934ebe0a6e7194ade1338cdd6133d1afba4b957f651acea062914d042e8ecd783d1029ba3e43d1353350a9c012ac5a22b1334812906de55dbfa1e5486 alps-ab8b5f7678da886eb55216832ef47a730f5a4830.tar.gz
42789b4cae9b2c4acb5b05288c4f9858de1b5cfda87bc96c40505e9447ec9ad39fdabbd5af0c65007c51a5f3a425602ea7a81d3f6c62894dddf6790fe26793755c fix-statics-dir.patch
4361c1b05851ae05fbf51cb8eb060c5677de7145a07dac3a194a3f7513b2ff3bf5f3792a749d1a2eef09fc6378f2fbf2021cc49dffe652f51230120c40a7062b6c alps.confd
446e109577d662ce61d2b753e5b82237827646f10d0af02b10b3f184a10bb747c3c8303e7d20a5cc2b7c31ac4a6f3aef62290c068868e647c9b1ce711dfb6e025a alps.initd
45"