52 lines
1.6 KiB
Bash
52 lines
1.6 KiB
Bash
# Maintainer: Lain Iwakura <lain@serialexperiments.club>
|
|
|
|
pkgname=serialmail-git
|
|
pkgver=r23.08368aa
|
|
pkgrel=1
|
|
license=('MIT')
|
|
pkgdesc="SerialMail Client and Server"
|
|
depends=('glibc')
|
|
makedepends=('git' 'go')
|
|
options=('!lto')
|
|
arch=('x86_64')
|
|
url="https://mail.serialexperiments.club"
|
|
backup=("etc/serialmail.conf")
|
|
source=(
|
|
"serialmail::git+ssh://git@git.serialexperiments.club/lain/SerialMail"
|
|
"alps::git+https://git.sr.ht/~migadu/alps"
|
|
"serialmail.conf"
|
|
"serialmail.service"
|
|
"serialmail.patch"
|
|
)
|
|
sha256sums=('SKIP'
|
|
'SKIP'
|
|
'6536775eff65350cbadd3fb5611bfe52e85ad0c2e3ddb167a8b3905dc7c31fee'
|
|
'216d06349704b33ac45307e0f329e43e90643462b1d8cd2f567cf1976d9d0d7a'
|
|
'c40cdd8f1a0557bbf91ee8ba3d6a244fb4191bb39172bbdad247677b41fcc051')
|
|
|
|
pkgver() {
|
|
cd serialmail
|
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
|
}
|
|
|
|
prepare() {
|
|
cd alps
|
|
patch -p1 < ../serialmail.patch
|
|
}
|
|
|
|
build() {
|
|
cd alps
|
|
export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
|
|
go build -o serialmail ./cmd/alps
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir"/var/www/serialmail/lain/
|
|
cp -dR serialmail/* "$pkgdir"/var/www/serialmail/lain/
|
|
mkdir -p "$pkgdir"/usr/lib/serialmail/
|
|
cp -dR alps/plugins "$pkgdir"/usr/lib/serialmail/
|
|
install -Dm755 alps/serialmail "$pkgdir"/usr/bin/serialmail
|
|
install -Dm644 serialmail.conf "$pkgdir"/etc/serialmail.conf
|
|
install -Dm644 serialmail.service "$pkgdir"/usr/lib/systemd/system/serialmail.service
|
|
install -Dm644 serialmail/LICENSE "$pkgdir"/usr/share/licenses/serialmail/LICENSE
|
|
}
|