diff options
author | Balakrishnan Balasubramanian | 2024-04-03 23:31:26 -0400 |
---|---|---|
committer | Balakrishnan Balasubramanian | 2024-04-03 23:31:26 -0400 |
commit | 017047878563a5ad0a24074b789126d0c7c65c1d (patch) | |
tree | c92a65040945898dd54957d2a63ff11d16c35f47 | |
download | aur-017047878563a5ad0a24074b789126d0c7c65c1d.tar.gz |
initial version 1.1
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 29 | ||||
-rw-r--r-- | mail4one.install | 20 |
4 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5542975da865 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = mail4one + pkgdesc = Personal Mail Server + pkgver = 1.1 + pkgrel = 1 + url = https://github.com/mail4one/mail4one + install = mail4one.install + arch = any + license = GPL3 + makedepends = git + makedepends = python-pip + depends = python + source = git+https://gitea.balki.me/balki/mail4one.git#tag=v1.1 + sha256sums = 51bf373725f16a79b08efa190711b57d0c74c4bf2eeb725b780484fca006d851 + +pkgname = mail4one diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..c1edfd553a45 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +mail4one*zst +pkg/ +src/ +mail4one/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0d679f55801e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: Balakrishnan Balasubramanian <aur@balki.me> + +pkgname=mail4one +pkgver=1.1 +pkgrel=1 +pkgdesc="Personal Mail Server" +arch=('any') +url='https://github.com/mail4one/mail4one' +depends=('python') +makedepends=('git' 'python-pip') +license=('GPL3') +source=("git+https://gitea.balki.me/balki/mail4one.git#tag=v$pkgver") +sha256sums=('51bf373725f16a79b08efa190711b57d0c74c4bf2eeb725b780484fca006d851') +install="$pkgname.install" + +build() { + cd "$pkgname" + make build + sed -i '/ExecStart/s/local.bin/bin/' deploy_configs/mail4one.service +} + +package() { + cd "$pkgname" + install -Dm755 mail4one.pyz "$pkgdir/usr/bin/mail4one" + install -Dm644 deploy_configs/mail4one.service -t "$pkgdir/usr/lib/systemd/system" + install -Dm644 deploy_configs/mail4one.conf -t "$pkgdir/usr/lib/sysusers.d" + install -Dm644 README.md deploy_configs/mail4one_cert_copy.sh deploy_configs/config.sample -t "$pkgdir/usr/share/doc/$pkgname" + install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" +} diff --git a/mail4one.install b/mail4one.install new file mode 100644 index 000000000000..b6946f2cb58d --- /dev/null +++ b/mail4one.install @@ -0,0 +1,20 @@ + +## arg 1: the new package version +post_install() { + cat <<-'EOM' + **See https://github.com/mail4one/mail4one for help/support/issues. Quickstart below** + -------------------------------------------------------------- + **Generate passwordhash** + mail4one -g + **Edit/Create config** + cp /usr/share/doc/mail4one/config.sample . + # edit config.sample + yq -oj -py config.sample | sudo tee /etc/mail4one/config.json + **Setup certbot and install deploy hook** + sudo install -Dm755 /usr/share/doc/mail4one/mail4one_cert_copy.sh -t /etc/letsencrypt/renewal-hooks/deploy + # Change domain name here. /etc/letsencrypt/renewal-hooks/deploy/mail4one_cert_copy.sh + **Enable service** + sudo systemctl enable mail4one.service + ============================================================== + EOM +} |