mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 19:36:48 +02:00
68 lines
2.1 KiB
Text
68 lines
2.1 KiB
Text
# Contributor: Michał Polański <michal@polanski.me>
|
|
# Maintainer: Michał Polański <michal@polanski.me>
|
|
pkgname=maddy
|
|
pkgver=0.8.1
|
|
pkgrel=2
|
|
pkgdesc="Composable all-in-one mail server"
|
|
url="https://maddy.email/"
|
|
license="GPL-3.0-or-later"
|
|
arch="all"
|
|
makedepends="go scdoc linux-pam-dev sqlite-dev"
|
|
subpackages="$pkgname-openrc $pkgname-doc $pkgname-vim::noarch"
|
|
pkgusers="$pkgname"
|
|
pkggroups="$pkgname"
|
|
install="$pkgname.pre-install"
|
|
source="https://github.com/foxcpp/maddy/archive/v$pkgver/maddy-$pkgver.tar.gz
|
|
$pkgname.initd
|
|
use-syslog.patch
|
|
"
|
|
|
|
# secfixes:
|
|
# 0.6.3-r0:
|
|
# - CVE-2023-27582
|
|
|
|
export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw -tags=libsqlite3"
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
build() {
|
|
ldflags="-extldflags \"$LDFLAGS\"
|
|
-X github.com/foxcpp/maddy.Version=$pkgver
|
|
"
|
|
|
|
go build -ldflags="$ldflags" -v -o bin/maddy ./cmd/maddy
|
|
|
|
scdoc <docs/man/maddy.1.scd >maddy.1
|
|
}
|
|
|
|
check() {
|
|
# disable failing remote_test
|
|
# pam-helper fails to build due to strict-prototypes; "int run()" w/o prototype invalid
|
|
go test $(go list ./... | grep -Ev '(internal/target/remote|maddy-pam-helper)')
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 bin/maddy -t "$pkgdir"/usr/bin/
|
|
|
|
install -Dm644 maddy.conf "$pkgdir"/etc/maddy/maddy.conf
|
|
|
|
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
|
|
|
|
install -Dm644 maddy.1 -t "$pkgdir"/usr/share/man/man1/
|
|
}
|
|
|
|
vim() {
|
|
pkgdesc="$pkgdesc (vim syntax)"
|
|
depends=""
|
|
install_if="vim $pkgname=$pkgver-r$pkgrel"
|
|
|
|
mkdir -p "$subpkgdir"/usr/share/vim
|
|
cp -r "$builddir"/dist/vim "$subpkgdir"/usr/share/vim/vimfiles
|
|
}
|
|
|
|
sha512sums="
|
|
91a275e7e5b7ac8e5f3545db1908a4fef8cbd9b524f7c1ba57f6147f293dc195d97036b876c4bcbb6f0e21c497bd104741e1b33a1608d4e4a51bc02d9dc89a1a maddy-0.8.1.tar.gz
|
|
c521763df519f86063ecfcb65c6689df880ea6478a83584ee1a7ebbfa5d95d1adf52ea9355f918a5a1c41f78d8b3a690e049fb43faac718ca5b6c519e10b0f23 maddy.initd
|
|
76dbb8d7f4b389f2fc1e4e9ecbf93bd7e9a002a8520d93067e39b7a8d35e74e92af7151c116d38aa9d7548747cdd107b38392204f7d3a8944914aee236f7934e use-syslog.patch
|
|
"
|