1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 11:47:36 +00:00

Ports: Add ssmtp port

This commit is contained in:
Fabian Dellwing 2023-04-25 19:59:27 +02:00 committed by Jelle Raaijmakers
parent 1951f7874d
commit 8f34478e75
7 changed files with 184 additions and 0 deletions

26
Ports/ssmtp/package.sh Executable file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='ssmtp'
version='2.64-11'
files="https://salsa.debian.org/debian/ssmtp/-/archive/debian/${version}/ssmtp-debian-${version}.tar.gz ssmtp-debian-${version}.tar.gz 82abe0fb54e2ee209e9f8745498ce5f4e35f2f2b1bf95bd5e6dfbcfc61a8ebe2"
auth_type='sha256'
useconfigure='true'
workdir="ssmtp-debian-${version}"
configopts=(
'--enable-ssl'
'--enable-md5auth'
"--prefix=${SERENITY_INSTALL_ROOT}/usr/local"
)
depends=('openssl')
pre_patch() {
# Debian released multiple patches that fix issues with ssmtp. But they also decided to replace openssl with gnutls for internal licencing reasons.
# As we have a stable openssl port and no stable gnutls port, we skip that patch.
run perl -n -i -e '/01-374327-use-gnutls.patch/ or print' debian/patches/series
# We will also skip the solaris patch as it messes with `generate_config` we already messed with :^)
run perl -n -i -e '/02-557725-solaris.patch/ or print' debian/patches/series
run bash -c 'while IFS= read -r line; do git apply debian/patches/$line || true; done < debian/patches/series'
}
pre_configure() {
run_replace_in_file 's#$LIBS -lssl"#$LIBS -lssl -lcrypto --library '"${SERENITY_INSTALL_ROOT}"'/usr/local/lib/"#' configure
}