# Contributor: Valery Kartel # Contributor: Ɓukasz Jendrysik # Contributor: Jesse Young # Maintainer: Jesse Young pkgname=exim pkgver=4.88 pkgrel=0 pkgdesc="A Message Transfer Agent" url="http://www.exim.org/" arch="all" license="GPL2" options="suid" depends="ca-certificates" pkgusers="exim" pkggroups="exim" makedepends="bash gawk perl $depends_dev db-dev pcre-dev libressl-dev libspf2-dev mariadb-dev postgresql-dev sqlite-dev libidn-dev" install="exim.pre-install" subpackages="$pkgname-cdb $pkgname-dbmdb $pkgname-dnsdb $pkgname-sqlite $pkgname-mysql $pkgname-postgresql $pkgname-utils $pkgname-scripts::noarch $pkgname-doc" source="ftp://ftp.exim.org/pub/exim/exim4/$pkgname-$pkgver.tar.bz2 exim.Makefile exim.confd exim.initd exim.logrotate" builddir="$srcdir/$pkgname-$pkgver" prepare() { default_prepare || return 1 cd "$builddir" cp "$srcdir"/$pkgname.Makefile Local/Makefile || return 1 sed -i \ -e 's/-lnsl//g' \ -e 's/^HAVE_ICONV.*$//' \ OS/Makefile-Linux } build() { cd "$builddir" make makefile || return 1 make -j1 || return 1 } package() { cd "$builddir" install -m750 -D -g mail -d "$pkgdir"/etc/mail make DESTDIR="$pkgdir" INSTALL_ARG="-no_symlink -no_chown exim" install || return 1 install -D -m644 doc/exim.8 "$pkgdir"/usr/share/man/man8/exim.8 cd "$pkgdir"/usr/sbin mv exim-${pkgver%.*}* exim chmod u+s exim for i in mailq rmail rsmtp runq sendmail newaliases; do ln -s exim $i done install -Dm644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname # Fix clamav local socket path, Add variant to spamd address sed -i \ -e 's~# av_scanner = clamd:/tmp/clamd~# av_scanner = clamd:/run/clamav/clamd.sock~' \ -e '/# spamd_address = 127.0.0.1 783/a# spamd_address = 127.0.0.1 11333 variant=rspamd' \ "$pkgdir"/etc/$pkgname/$pkgname.conf } scripts() { pkgdesc="exim scripts" depends="exim perl" cd "$builddir" make DESTDIR="$subpkgdir" \ INSTALL_ARG="exicyclog exim_checkaccess eximstats exiqgrep exigrep exinext exiqsumm exipick exiwhat convert4r3 convert4r4" \ install || return 1 rm -fr "$subpkgdir"/etc } utils() { pkgdesc="exim utils" depends="exim" cd "$builddir" make DESTDIR="$subpkgdir" \ INSTALL_ARG="exim_dbmbuild exim_dumpdb exim_tidydb exim_fixdb exim_lock" \ install || return 1 rm -fr "$subpkgdir"/etc } _mv_ext() { pkgdesc="EXIM extension: $1" depends="$pkgname" install -D -m755 "$builddir"/build-Linux-*/lookups/$1.so "$subpkgdir"/usr/lib/$pkgname/$1.so } sqlite() { _mv_ext sqlite; } mysql() { _mv_ext mysql; } postgresql() { _mv_ext pgsql; } cdb() { _mv_ext cdb; } dbmdb() { _mv_ext dbmdb; } dnsdb() { _mv_ext dnsdb; } md5sums="4cc10c910fd18bb9e299e98bc0a32ed2 exim-4.88.tar.bz2 16fdac04fe6721d9fb099456a7713beb exim.Makefile 186f4491800be8c56ce39320f24d7264 exim.confd dee893356b9fee4276acb018df1c5adf exim.initd 2eff3af519bdf8acf0292fffe89871a5 exim.logrotate" sha256sums="119d5fd7e31fc224e84dfa458fe182f200856bae7adf852a8287c242161f8a2d exim-4.88.tar.bz2 8a39c8bf1c6e1ac1beec02dfd3239836a5238440049502f5f80b38fa6158446e exim.Makefile db711754c48dfb7e3810009a1c6ffa331625c9d74d00dc8fa8256d9fa2c353f0 exim.confd c7c994777204ec45e0efe791ff818970a819b08ca67ffb252f87323346e6d1b1 exim.initd b5a6d449cb1998beb44d4144ef97e66a98b46d164445989a6d624c80549f24bc exim.logrotate" sha512sums="ea094bf703628c201de119fc5f09539475e52158e935f8f2a9e4138c4a1bfe885017145c3cc5e22aa9087b195091955c69385ebf1ea0baec64ed5c1b8e3b1caf exim-4.88.tar.bz2 58845ba0e4a9f8ac744e0810c0fd717c2be0dde0241cab3d2610145cd49f2589a9ac18bc18a0b177ee89dbdb651d61348adfede2b359a99bcc51f6e9aa2de985 exim.Makefile bb6f5ead067af19ace661cc92bcd428da97570aedd1f9dc5b61a34e7e3fb3e028be6c96d51df73353bdfcaf69a3ee053fb03d245f868d63ebf518aa96ec82d66 exim.confd 3769e74a54566362bcdf57c45fbf7d130d7a7529fbc40befce431eef0387df117c71a5b57779c507e30d5b125913b5f26c9d16b17995521a1d94997be6dc3e02 exim.initd 28e748693a6a72d9943fa9c342ff041fe650fa6977f468dee127e845e6c2a91872ce33fb6f5698838906bde3ed92de7a91cdb0349cedc40b806261867e8c06cb exim.logrotate"