Commit d0692d57 authored by AlmAck's avatar AlmAck
Browse files

postfix 3.2.4, fix #32

parent 9db4fc14
pkgname=postfix
pkgver=3.2.2
pkgrel=2
pkgver=3.2.4
pkgrel=1
pkgdesc='Fast, easy to administer, secure mail server'
url='http://www.postfix.org/'
arch=('x86_64')
......@@ -9,19 +9,19 @@ depends=('openssl' 'pcre' 'icu' 'libsasl' 'libldap' 'db'
'libmariadbclient' 'postgresql-libs' 'sqlite3' 'tinycdb')
source=("ftp://ftp.porcupine.org/mirrors/postfix-release/official/${pkgname}-${pkgver}.tar.gz"{,.gpg2}
'aliases.patch'
'postfix.service')
sha1sums=('1a0d01e79ced46b38e8bd5b7a726a1622cf1bc07'
'aa243ba67f8b7665c2de155724f2a76b36195b08'
'postfix.service'
'sysusers.d')
sha1sums=('86de2f38ca0894f42b9473bec6ac061ed6369c9a'
'6eff4e3c46c5dacb0ab01a84b83b5baac18ee3af'
'5fc3de6c7df1e5851a0a379e825148868808318b'
'dd12885d367bebaf0fc9d2e9823a7f82086b6ee9')
'dd12885d367bebaf0fc9d2e9823a7f82086b6ee9'
'5b364374b134cade1d9465d68f59a61f883d484f')
backup=('etc/postfix/'{access,aliases,canonical,generic,header_checks,main.cf,master.cf,relocated,transport,virtual})
validpgpkeys=('622C7C012254C186677469C50C0B590E80CA15A7') # Wietse Venema
conflicts=('smtp-server' 'smtp-forwarder' 'postfix-tools')
provides=('smtp-server' 'smtp-forwarder' 'postfix-tools')
replaces=('postfix-tools')
install=postfix.install
build() {
cd $pkgname-$pkgver
......@@ -32,8 +32,9 @@ build() {
-DHAS_MYSQL -I/usr/include/mysql
-DHAS_PGSQL -I/usr/include/postgresql
-DHAS_SQLITE
-DHAS_CDB
-DDEF_COMMAND_DIR=\"/usr/bin\"
-DDEF_DAEMON_DIR=\"/usr/lib/postfix\"
-DDEF_DAEMON_DIR=\"/usr/lib/postfix/bin\"
-DDEF_SENDMAIL_PATH=\"/usr/bin/sendmail\"
-DDEF_README_DIR=\"/usr/share/doc/postfix\"
-DDEF_MANPAGE_DIR=\"/usr/share/man\"
......@@ -60,21 +61,38 @@ build() {
}
package() {
cd $pkgname-$pkgver
cd $pkgname-$pkgver
sed 's:bin/postconf -dhx:bin/postconf -c conf -dhx:g' -i postfix-install
LD_LIBRARY_PATH=lib:$LD_LIBRARY_PATH \
sh postfix-install -non-interactive install_root="$pkgdir"
sed 's:bin/postconf -dhx:bin/postconf -c conf -dhx:g' -i postfix-install
LD_LIBRARY_PATH=lib:$LD_LIBRARY_PATH \
sh postfix-install -non-interactive install_root="$pkgdir"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 $srcdir/postfix.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 ../postfix.service "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
install -Dm644 ../sysusers.d "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
for name in posttls-finger {smtp,qmqp}-{sink,source}; do
for name in posttls-finger {smtp,qmqp}-{sink,source}; do
install -Dm644 "man/man1/${name}.1" "$pkgdir/usr/share/man/man1/${name}.1"
install -Dm755 "bin/${name}" "$pkgdir/usr/bin/${name}"
done
done
# now set permissions right to appease the pacman gods
sed -r \
-e '/override=1/d' \
-e '/absolute path name/d' \
-e 's/\$POSTCONF -/$POSTCONF -c .\/etc\/postfix -/g' \
-e '/(if \[|chmod|chown|find|mkdir|test)/s/\$path/.\/$path/g' \
libexec/post-install > ../arch-post-install
cd "${pkgdir}"
LD_LIBRARY_PATH=usr/lib/postfix:$LD_LIBRARY_PATH \
sh "${srcdir}/arch-post-install" \
command_directory=usr/bin \
config_directory=etc/postfix \
meta_directory=etc/postfix \
setgid_group=75 \
mail_owner=73 \
set-permissions
cd "$pkgdir"
patch -p0 -i "$srcdir"/aliases.patch
sed 's/^\(\$manpage[^:]*\):/\1.gz:/' -i "etc/postfix/postfix-files"
patch --no-backup-if-mismatch -p0 -i "${srcdir}"/aliases.patch
sed 's/^\(\$manpage[^:]*\):/\1.gz:/' -i "etc/postfix/postfix-files"
}
post_install() {
getent group postdrop &>/dev/null || groupadd -g 75 postdrop >/dev/null
getent group postfix &>/dev/null || groupadd -g 73 postfix >/dev/null
getent passwd postfix &>/dev/null || useradd -u 73 -d /var/spool/postfix -g postfix -s /bin/false postfix >/dev/null
true
}
pre_remove() {
getent passwd postfix &>/dev/null && userdel postfix >/dev/null
getent group postfix &>/dev/null && groupdel postfix >/dev/null
getent group postdrop &>/dev/null && groupdel postdrop >/dev/null
true
}
g postdrop 75 -
u postfix 73 - /var/spool/postfix
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment