diff --git a/srcpkgs/postfix/files/postfix/run b/srcpkgs/postfix/files/postfix/run new file mode 100755 index 00000000000..02fd26c8fbc --- /dev/null +++ b/srcpkgs/postfix/files/postfix/run @@ -0,0 +1,12 @@ +#!/bin/sh + +daemon_directory=/usr/libexec/postfix \ +data_directory=/var/lib/postfix \ +command_directory=/usr/bin \ +config_directory=/etc/postfix \ +queue_directory=/var/spool/postfix \ +mail_owner=postfix \ +setgid_group=postdrop \ +/usr/libexec/postfix/postfix-script check || exit 1 + +exec /usr/libexec/postfix/master -d diff --git a/srcpkgs/postfix/template b/srcpkgs/postfix/template index cceb2ed2118..5fdc62a130e 100644 --- a/srcpkgs/postfix/template +++ b/srcpkgs/postfix/template @@ -1,7 +1,7 @@ # Template file for 'postfix' pkgname=postfix version=2.11.1 -revision=4 +revision=5 short_desc="High-performance mail transport agent" maintainer="Juan RP " license="IBM Public License 1.0, BSD-alike" @@ -29,12 +29,12 @@ conf_files=" /etc/postfix/relocated /etc/postfix/transport /etc/postfix/virtual" -systemd_services="postfix.service true" +build_options="systemd" system_accounts="postfix" postfix_homedir="/var/spool/postfix" system_groups="postdrop" provides="smtp-server-0_1" -replaces="smtp-server>=0" +replaces="smtp-server>=0 runit-void<20141013_2" make_dirs=" /var/lib/postfix 0700 postfix root /var/spool/postfix/active 0700 postfix root @@ -81,13 +81,11 @@ do_build() { fi make ${makejobs} } - pre_install() { if [ "$CROSS_BUILD" ]; then sed -e 's,bin/postconf,/usr/bin/postconf,g' -i postfix-install fi } - do_install() { sh postfix-install -non-interactive install_root=${DESTDIR} vmkdir usr/sbin @@ -99,6 +97,9 @@ do_install() { cd $DESTDIR patch -p0 -i ${FILESDIR}/aliases.patch - # systemd. - vinstall ${FILESDIR}/postfix.service 644 usr/lib/systemd/system + # systemd + if [ "$build_option_systemd" ]; then + vinstall ${FILESDIR}/postfix.service 644 usr/lib/systemd/system + fi + vsv postfix }