void-packages/srcpkgs/sqmail/template
2021-03-05 22:07:26 +01:00

132 lines
3.6 KiB
Bash

# Template file for 'sqmail'
pkgname=sqmail
version=4.0.10
revision=2
create_wrksrc=yes
build_wrksrc="mail/${pkgname}/${pkgname}-${version}/src"
makedepends="fehQlibs libidn2-devel ucspi-ssl-devel"
depends="ucspi-ssl ucspi-tcp6"
short_desc="Fast, secure, and reliable email transmission (s/qmail)"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Public Domain"
homepage="https://www.fehcom.de/sqmail/sqmail.html"
distfiles="https://www.fehcom.de/sqmail/sqmail-${version}.tgz"
checksum=7e3705da76a708c6504fb2d4807b61daa2e5af66cb8103b762017e61562f966d
nocross="custom build system"
provides="smtp-server-0_1"
replaces="smtp-server>=0"
conf_files="/etc/sv/*/run /etc/sv/*/log/run"
system_groups="_nofiles:798 _sqmail:799"
system_accounts+=" _alias:790"
_alias_descr="sqmail Alias user"
_alias_pgroup="_nofiles"
_alias_homedir="/var/qmail/alias"
system_accounts+=" _qmaild:791"
_qmaild_descr="sqmail Daemon user"
_qmaild_pgroup="_nofiles"
_qmaild_homedir="/var/qmail/"
system_accounts+=" _qmaill:792"
_qmaill_descr="sqmail Log user"
_qmaill_pgroup="_nofiles"
_qmaill_homedir="/var/qmail/"
system_accounts+=" _qmailp:793"
_qmailp_descr="sqmail Password user"
_qmailp_pgroup="_nofiles"
_qmailp_homedir="/var/qmail/"
system_accounts+=" _qmailq:794"
_qmailq_descr="sqmail Queue user"
_qmailq_pgroup="_sqmail"
_qmailq_homedir="/var/qmail/queue"
system_accounts+=" _qmailr:795"
_qmailr_descr="sqmail Remote user"
_qmailr_pgroup="_sqmail"
_qmailr_homedir="/var/qmail/"
system_accounts+=" _qmails:796"
_qmails_descr="sqmail Send user"
_qmails_pgroup="_sqmail"
_qmails_homedir="/var/qmail/"
system_accounts+=" _sqmtls:797"
_sqmtls_descr="sqmail TLS user"
_sqmtls_pgroup="_nofiles"
_sqmtls_homedir="/var/qmail/ssl"
do_configure() {
pwd >home
echo "${CC} ${CFLAGS} -DIDN2 -I${XBPS_CROSS_BASE}/usr/include/fehQlibs" >../conf-cc
echo "${CC} ${LDFLAGS}" >../conf-ld
echo "/var/qmail" >../conf-home
printf '%s\n' _sqmail _nofiles >../conf-groups
printf '%s\n' _alias _qmaild _qmaill root _qmailp _qmailq _qmailr _qmails >../conf-users
cat >../conf-ids <<EOF
798:_nofiles:sqmail group for auxiliar files:
799:_sqmail:sqmail group for binary files:
#
790:_alias:sqmail Alias user:_nofiles:alias
791:_qmaild:sqmail Daemon user:_nofiles
792:_qmaill:sqmail Log user:_nofiles
793:_qmailp:sqmail Password user:_nofiles
794:_qmailq:sqmail Queue user:_sqmail:queue
795:_qmailr:sqmail Remote user:_sqmail
796:_qmails:sqmail Send user:_sqmail
797:_sqmtls:sqmail TLS user:_nofiles:ssl
EOF
cat >auto_uids.c <<EOF
int auto_uida = 790;
int auto_uidd = 791;
int auto_uidl = 792;
int auto_uido = 0;
int auto_uidp = 793;
int auto_uidq = 794;
int auto_uidr = 795;
int auto_uids = 796;
int auto_gidn = 798;
int auto_gidq = 799;
EOF
echo >socket.lib
echo -lssl -lcrypto -ldl >ssl.lib
}
do_build() {
ln -sf /usr/include/ucspissl.h .
ln -sf /usr/lib/ucspissl.a .
make
}
do_install() {
for f in $(cat $(printf '%s\n' it-*=d |grep -v setup)) predate datemail; do
vbin $f
done
vsconf config
vsconf config-fast
for f in ../man/*.?; do
vman $f
done
rm ${DESTDIR}/usr/bin/hostname
rm ${DESTDIR}/usr/share/man/man8/hostname.8
vsv qmail-send
vsv qmail-smtpd
vsv qmail-smtpsd
vsv qmail-smtpsub
vlicense ../doc/LICENSE
mv ${DESTDIR}/usr/bin/maildirmake ${DESTDIR}/usr/bin/maildirmake.sqmail
mv ${DESTDIR}/usr/share/man/man1/maildirmake.1 ${DESTDIR}/usr/share/man/man1/maildirmake.sqmail.1
mv ${DESTDIR}/usr/share/man/man5/maildir.5 ${DESTDIR}/usr/share/man/man5/maildir.sqmail.5
mv ${DESTDIR}/usr/share/man/man5/mbox.5 ${DESTDIR}/usr/share/man/man5/mbox.sqmail.5
ln -sf sendmail ${DESTDIR}/usr/bin/mailq
vdoc ${FILESDIR}/README.voidlinux
vsconf ${FILESDIR}/ssl.env
}