From 288020b526923ca767ff5d8847d1f7bffe78e0e1 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 21 Oct 2012 16:44:36 +0000 Subject: [PATCH] postfix: new version and systemd service file --- postfix/PKGBUILD | 24 ++++++++++++------------ postfix/postfix.service | 13 +++++++++++++ postfix/rc.d | 36 ------------------------------------ 3 files changed, 25 insertions(+), 48 deletions(-) create mode 100644 postfix/postfix.service delete mode 100644 postfix/rc.d diff --git a/postfix/PKGBUILD b/postfix/PKGBUILD index 740df498c..676803c05 100644 --- a/postfix/PKGBUILD +++ b/postfix/PKGBUILD @@ -5,7 +5,7 @@ # maintainer (x86_64): Manuel Tortosa pkgname=postfix -pkgver=2.8.5 +pkgver=2.9.4 pkgrel=1 pkgdesc='Secure, fast, easy to administer alternative to Sendmail' url='http://www.postfix.org/' @@ -13,18 +13,16 @@ arch=('i686' 'x86_64') license=('custom') depends=('pcre' 'libsasl' 'libmysqlclient' 'postgresql-libs' 'sqlite3' 'libldap' 'db') backup=('etc/postfix/'{access,aliases,canonical,generic,header_checks,main.cf,master.cf,relocated,transport,virtual}) -source=("ftp://ftp.porcupine.org/mirrors/postfix-release/official/${pkgname}-${pkgver}.tar.gz" \ - 'aliases.patch' \ - 'rc.d') -sha1sums=('49ef711c80b5a3434258ab24ae00940932503e80' - '5fc3de6c7df1e5851a0a379e825148868808318b' - '40c6be2eb55e6437a402f43775cdb3d22ea87a66') - provides=('smtp-server' 'smtp-forwarder') replaces=('postfix-mysql' 'postfix-pgsql') conflicts=('postfix-mysql' 'postfix-pgsql' 'smtp-server' 'smtp-forwarder') - -install=postfix.install +install=$pkgname.install +source=("ftp://ftp.porcupine.org/mirrors/postfix-release/official/${pkgname}-${pkgver}.tar.gz" + 'aliases.patch' + 'postfix.service') +sha256sums=('58343afcc727594cc1f9a3980562d8199aa55fc2cf2330da6b9ddfbf31502679' + 'f4c766efc20b4638f9fd72707ca6d4c2628279ebd79f5227276fa4ca6867c336' + 'f73f0fb12fb46cdc1b7afbfd184e0dcbd63ff6ca91f0d996a40fe184c6ab26cb') build() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -55,11 +53,13 @@ package() { install_root="${pkgdir}" \ daemon_directory="/usr/lib/${pkgname}" \ sample_directory="/etc/${pkgname}/sample" \ - manpage_directory="/usr/share/man" + manpage_directory="/usr/share/man" \ + readme_directory="/usr/share/doc/${pkgname}" - install -D -m755 ../rc.d "${pkgdir}/etc/rc.d/${pkgname}" + install -Dm644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service" install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" cd "${pkgdir}" patch -p0 < "${srcdir}"/aliases.patch + sed 's/^\(\$manpage[^:]*\):/\1.gz:/' -i "usr/lib/${pkgname}/postfix-files" } diff --git a/postfix/postfix.service b/postfix/postfix.service new file mode 100644 index 000000000..22e7b9975 --- /dev/null +++ b/postfix/postfix.service @@ -0,0 +1,13 @@ +[Unit] +Description=Postfix Mail Transport Agent +After=network.target + +[Service] +Type=forking +PIDFile=/var/spool/postfix/pid/master.pid +ExecStart=/usr/sbin/postfix start +ExecStop=/usr/sbin/postfix stop +ExecReload=/usr/sbin/postfix reload + +[Install] +WantedBy=multi-user.target diff --git a/postfix/rc.d b/postfix/rc.d deleted file mode 100644 index fa314bb84..000000000 --- a/postfix/rc.d +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -name=postfix - -case "$1" in -start) - stat_busy "Starting $name daemon" - /usr/sbin/postfix start &>/dev/null \ - && { add_daemon $name; stat_done; } \ - || { stat_fail; exit 1; } - ;; -stop) - stat_busy "Stopping $name daemon" - /usr/sbin/postfix stop &>/dev/null \ - && { rm_daemon $name; stat_done; } \ - || { stat_fail; exit 1; } - ;; -reload) - stat_busy "Reloading $name daemon" - /usr/sbin/postfix reload &>/dev/null \ - && { stat_done; } \ - || { stat_fail; exit 1; } - ;; -restart) - $0 stop - sleep 1 - $0 start - ;; -*) - echo "usage: $0 {start|stop|restart|reload}" - ;; -esac -exit 0