opensmtpd: added runit service.

This commit is contained in:
Juan RP 2014-10-13 17:22:53 +02:00
parent 2ad27daabc
commit 72ec4488d8
3 changed files with 15 additions and 7 deletions

View file

@ -0,0 +1,2 @@
#!/bin/sh
exec logger -p mail.notice

View file

@ -0,0 +1,2 @@
#!/bin/sh
exec smtpd -d 2>&1

View file

@ -1,7 +1,7 @@
# Template file for 'opensmtpd'
pkgname=opensmtpd
version=5.4.2p1
revision=5
revision=6
build_style=gnu-configure
configure_args="--sysconfdir=/etc/smtpd --sbindir=/usr/bin
--with-maildir=/var/spool/mail --with-privsep-path=/var/db
@ -13,10 +13,11 @@ makedepends="zlib-devel libressl-devel libevent-devel db-devel"
depends="ca-certificates"
conf_files="/etc/smtpd/smtpd.conf /etc/smtpd/aliases"
system_accounts="smtpd smtpq"
systemd_services="smtpd.socket on"
smtpd_homedir="/var/spool/mail"
smtpq_homedir="/var/spool/mail"
build_options="systemd"
provides="smtp-forwarder-0_1 smtp-server-0_1"
replaces="smtp-forwarder>=0 smtp-server>=0"
replaces="runit-void<20141013_2 smtp-forwarder>=0 smtp-server>=0"
short_desc="Free implementation of the server-side SMTP protocol"
maintainer="Juan RP <xtraeme@gmail.com>"
license="BSD, ISC, MIT"
@ -34,13 +35,16 @@ pre_configure() {
sed -e 's,^\(libevent_major_version\)=.*$,\1=2,' -i configure
sed -ri 's,/etc/mail,/etc/smtpd,g' smtpd/smtpd.conf
}
post_install() {
vinstall LICENSE 644 usr/share/licenses/${pkgname}
vinstall ${FILESDIR}/smtpd.service 644 usr/lib/systemd/system
vinstall ${FILESDIR}/smtpd.socket 644 usr/lib/systemd/system
vsv opensmtpd
vlicense LICENSE
vinstall /dev/null 644 etc/smtpd aliases
vmkdir usr/sbin
ln -s /usr/bin/sendmail ${DESTDIR}/usr/sbin/sendmail
if [ "$build_option_systemd" ]; then
vinstall ${FILESDIR}/smtpd.service 644 usr/lib/systemd/system
vinstall ${FILESDIR}/smtpd.socket 644 usr/lib/systemd/system
fi
}