mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 09:57:14 +08:00
postfix: new version and systemd service file
This commit is contained in:
parent
6acee47aed
commit
288020b526
@ -5,7 +5,7 @@
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
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"
|
||||
}
|
||||
|
13
postfix/postfix.service
Normal file
13
postfix/postfix.service
Normal file
@ -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
|
36
postfix/rc.d
36
postfix/rc.d
@ -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
|
Loading…
Reference in New Issue
Block a user