void-packages/srcpkgs/opensmtpd/template
2018-01-16 18:56:46 +01:00

58 lines
1.9 KiB
Bash

# Template file for 'opensmtpd'
pkgname=opensmtpd
version=6.0.3p1
revision=4
build_style=gnu-configure
configure_args="--sysconfdir=/etc/smtpd --sbindir=/usr/bin
--with-path-socket=/run --with-mantype=doc --with-pie --with-table-db
--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt
--with-maildir=/var/mail
ac_cv_func_arc4random=yes
ac_cv_func_arc4random_buf=yes
ac_cv_func_arc4random_stir=no
ac_cv_func_arc4random_uniform=yes
ac_cv_search_arc4random=-lcrypto
ac_cv_func_explicit_bzero=no
ac_cv_func_reallocarray=no
ac_cv_func_strlcat=no
ac_cv_func_strlcpy=no"
hostmakedepends="automake libtool pkg-config bison"
makedepends="zlib-devel libressl-devel libevent-devel db-devel libasr-devel"
depends="ca-certificates"
conf_files="/etc/smtpd/smtpd.conf /etc/smtpd/aliases"
provides="smtp-forwarder-0_1 smtp-server-0_1"
replaces="smtp-forwarder>=0 smtp-server>=0"
short_desc="Free implementation of the server-side SMTP protocol"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="BSD, ISC, MIT"
homepage="https://www.opensmtpd.org"
distfiles="https://www.opensmtpd.org/archives/${pkgname}-${version}.tar.gz"
checksum=291881862888655565e8bbe3cfb743310f5dc0edb6fd28a889a9a547ad767a81
CFLAGS=-D_DEFAULT_SOURCE
system_accounts="_smtpd _smtpq"
case "$XBPS_TARGET_MACHINE" in
*-musl) configure_args+=" --with-libfts=${XBPS_CROSS_BASE}/usr"
makedepends+=" musl-fts-devel"
;;
esac
pre_configure() {
touch README AUTHORS NEWS ChangeLog
autoreconf -fi
# XXX hardcode the libevent major version for now.
# XXX the configure test needs to execute a binary to
# XXX get this result.
sed -e 's,^\(libevent_major_version\)=.*$,\1=2,' -i configure
sed -ri 's,/etc/mail,/etc/smtpd,g' smtpd/smtpd.conf
}
post_install() {
for f in newaliases mailq makemap sendmail; do
ln -s smtpctl ${DESTDIR}/usr/bin/$f
done
vsv opensmtpd
vlicense LICENSE
vinstall /dev/null 644 etc/smtpd aliases
}