feat: add Stalwart Mail Server and FoundationDB library packages

- Add stalwart: main mail server with systemd integration and user management
- Add stalwart-cli: command line interface tool for server administration
- Add stalwart-foundationdb: FoundationDB-enabled version with proper dependencies
- Add libfoundationdb: FoundationDB client library (libfdb_c.so) package

All packages include proper conflict resolution, systemd services, and follow
repository packaging conventions. stalwart and stalwart-foundationdb are
mutually exclusive to prevent installation conflicts.
This commit is contained in:
2025-10-19 17:38:55 +11:00
parent fdf9a11a4c
commit 911076c7c2
32 changed files with 567 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
1
+18
View File
@@ -0,0 +1,18 @@
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD /app/resources/build.sh
+9
View File
@@ -0,0 +1,9 @@
name: stalwart-cli
release: 1
version: 0.13.4
github: stalwartlabs/stalwart
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/bash
# Download the required files
curl -L -o /app/stalwart-cli.tar.gz https://github.com/stalwartlabs/stalwart/releases/download/v${PACKAGE_VERSION}/stalwart-cli-x86_64-unknown-linux-gnu.tar.gz
# Extract the binary
tar -xzf /app/stalwart-cli.tar.gz -C /app
# Make the binary executable
chmod +x /app/stalwart-cli
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
+35
View File
@@ -0,0 +1,35 @@
# nfpm.yaml
name: stalwart-cli
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "Stalwart CLI - Command line interface for Stalwart Mail Server"
maintainer: Stalwart Labs
homepage: https://stalw.art
license: AGPL-3.0
disable_globbing: false
replaces:
- stalwart-cli
provides:
- stalwart-cli
# Files to include in the package
contents:
- src: /app/stalwart-cli
dst: /usr/bin/stalwart-cli
file_info:
mode: 0755
owner: root
group: root
# Scripts to run during installation/removal
scripts:
preinstall: /app/resources/scripts/preinstall.sh
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# No special setup needed for CLI tool
# Just ensure /usr/bin exists (it should always exist)
mkdir -p /usr/bin