mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-23 08:42:22 +01:00
71 lines
2.3 KiB
Plaintext
71 lines
2.3 KiB
Plaintext
# Contributor: Michał Polański <michal@polanski.me>
|
|
# Maintainer: Michał Polański <michal@polanski.me>
|
|
pkgname=maddy
|
|
pkgver=0.5.4
|
|
pkgrel=4
|
|
pkgdesc="Composable all-in-one mail server"
|
|
url="https://maddy.email/"
|
|
license="GPL-3.0-or-later"
|
|
arch="all"
|
|
makedepends="go libcap 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
|
|
acme-default-hostname.patch
|
|
"
|
|
|
|
export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw -tags=libsqlite3"
|
|
export GOPATH="$srcdir"
|
|
|
|
build() {
|
|
ldflags="-extldflags \"$LDFLAGS\" -s -w
|
|
-X github.com/foxcpp/maddy.Version=$pkgver
|
|
"
|
|
|
|
go build -ldflags="$ldflags" -v -o bin/maddy ./cmd/maddy
|
|
go build -ldflags="$ldflags" -v -o bin/maddyctl ./cmd/maddyctl
|
|
|
|
msg "Building man pages..."
|
|
for f in docs/man/*.scd; do
|
|
echo "$f -> ${f%.scd}"
|
|
scdoc <"$f" >"${f%.scd}"
|
|
done
|
|
}
|
|
|
|
check() {
|
|
go test ./...
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 bin/maddy "$pkgdir"/usr/bin/maddy
|
|
setcap cap_net_bind_service=+ep "$pkgdir"/usr/bin/maddy
|
|
install -Dm755 bin/maddyctl "$pkgdir"/usr/bin/maddyctl
|
|
|
|
install -Dm644 maddy.conf "$pkgdir"/etc/maddy/maddy.conf
|
|
|
|
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
|
|
|
|
install -Dm644 docs/man/*.1 -t "$pkgdir"/usr/share/man/man1
|
|
install -Dm644 docs/man/*.5 -t "$pkgdir"/usr/share/man/man5
|
|
}
|
|
|
|
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="
|
|
46ae7ecd91bc4664486e05eb86f67a49192aed3d9fa798c95bf177ed23c73f285df88de340f0238ae599145e70b631bcfcceaaa93a26c2539f47a6803166d99f maddy-0.5.4.tar.gz
|
|
a5b919e1fbecb570123e567ca0e78499efe25e4ae01abbba3221fc54cd35d12f194da847377a0fd00823733817922fae163e247f5b92edad498bb89d14b1bee0 maddy.initd
|
|
76dbb8d7f4b389f2fc1e4e9ecbf93bd7e9a002a8520d93067e39b7a8d35e74e92af7151c116d38aa9d7548747cdd107b38392204f7d3a8944914aee236f7934e use-syslog.patch
|
|
6701d74e0bf160b17ee7b4c6335e02d4e1f87e71ff832021f62298c7c5baee73dac96d691c5be9013a3df22f3dba683e5614a473df625d3592313fbea455f253 acme-default-hostname.patch
|
|
"
|