diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-28 08:49:35 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-28 08:56:25 +0000 |
commit | 228e06b4e65537325ca35b93d2418dadf1f7db55 (patch) | |
tree | fda1f2581e174b070d42251d461c3f9bdc19d56a /main/postfix/APKBUILD | |
parent | 4fa7d32dfcdaf3511c6af4bc1479a2102e14345a (diff) | |
download | aports-228e06b4e65537325ca35b93d2418dadf1f7db55.tar.bz2 aports-228e06b4e65537325ca35b93d2418dadf1f7db55.tar.xz |
main/postfix: upgrade to 3.0.1
Diffstat (limited to 'main/postfix/APKBUILD')
-rw-r--r-- | main/postfix/APKBUILD | 113 |
1 files changed, 41 insertions, 72 deletions
diff --git a/main/postfix/APKBUILD b/main/postfix/APKBUILD index 6aec137535..307a64da97 100644 --- a/main/postfix/APKBUILD +++ b/main/postfix/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Ćukasz Jendrysik <scadu@yandex.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=postfix -pkgver=2.11.3 -pkgrel=1 +pkgver=3.0.1 +pkgrel=0 pkgdesc="Secure and fast drop-in replacement for Sendmail (MTA)" url="http://www.postfix.org/" arch="all" @@ -16,19 +16,9 @@ subpackages="$pkgname-doc $pkgname-ldap $pkgname-mysql $pkgname-pcre options="suid" source="ftp://ftp.porcupine.org/mirrors/$pkgname-release/official/$pkgname-$pkgver.tar.gz $pkgname.initd - dynamic-maps.patch no-glibc.patch - dynamicmaps.cf - postfix-ldap.post-install - postfix-mysql.post-install - postfix-pcre.post-install - postfix-pgsql.post-install - postfix-sqlite.post-install " -# the dynamic maps patch is taken from mandriva -# http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/postfix/current/SOURCES - _shared_libs() { file --mime-type "$@" | \ awk -F: '$2 ~ /sharedlib/ {print $1}' @@ -41,7 +31,6 @@ prepare() { *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done - cp ../dynamicmaps.cf conf/ sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \ -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/postfix/aliases|" \ @@ -52,7 +41,7 @@ prepare() { build () { cd "$srcdir/$pkgname-$pkgver" # needed for dynamic maps. - local ccargs="-DHAS_DLOPEN -DHAS_SHL_LOAD" + local ccargs="-DHAS_SHL_LOAD" local auxlibs="$LDFLAGS -lpthread -lcrypt" ccargs="$ccargs -DDEF_DAEMON_DIR=\\\"/usr/lib/postfix\\\"" @@ -92,57 +81,56 @@ build () { OPT="$CFLAGS" \ CCARGS="$ccargs" \ AUXLIBS="$auxlibs" \ + dynamicmaps=yes \ + shared=yes \ makefiles || return 1 - make -j1 OPT="$CFLAGS" || return 1 + make OPT="$CFLAGS" || return 1 +} + +_mvline() { + local regex="$1" + local outfile="$3.d/$2" + local infile="$3" + sed -i -E -e "\|$regex|{ +w $outfile +d +}" $infile } package() { cd "$srcdir/$pkgname-$pkgver" - for i in $(_shared_libs lib/*.a); do - j=${i#lib/lib} - ln -s ${i#lib/} lib/libpostfix-${j%.a}.so.1 - done - - # install to pkgdir - LD_LIBRARY_PATH=$PWD/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} make \ - non-interactive-package \ + make non-interactive-package \ install_root="$pkgdir" \ - config_directory=/usr/share/doc/$pkgname/defaults \ readme_directory=/usr/share/doc/$pkgname/readme \ manpage_directory=/usr/share/man \ || return 1 - install -d "$pkgdir"/usr/lib - for i in $(_shared_libs lib/*.a); do - j=${i#lib/lib} - install $i "$pkgdir"/usr/lib/libpostfix-${j%.a}.so.1 || return 1 - done - # fix permissions for i in postdrop postqueue; do chgrp postdrop "$pkgdir"/usr/sbin/$i chmod g+s "$pkgdir"/usr/sbin/$i done - mkdir -p "$pkgdir"/etc/postfix - mv "$pkgdir"/usr/share/doc/$pkgname/defaults/*.cf \ - "$pkgdir"/usr/share/doc/$pkgname/defaults/aliases \ - "$pkgdir"/usr/share/doc/$pkgname/defaults/canonical \ - "$pkgdir"/usr/share/doc/$pkgname/defaults/generic \ - "$pkgdir"/usr/share/doc/$pkgname/defaults/header_checks \ - "$pkgdir"/usr/share/doc/$pkgname/defaults/relocated \ - "$pkgdir"/usr/share/doc/$pkgname/defaults/transport \ - "$pkgdir"/usr/share/doc/$pkgname/defaults/virtual \ - "$pkgdir"/etc/postfix/ || return 1 + mkdir -p "$pkgdir"/usr/share/doc/postfix/defaults/ \ + "$pkgdir"/usr/share/licenses/${pkgname}/ + mv "$pkgdir"/etc/postfix/*.default \ + "$pkgdir"/usr/share/doc/postfix/defaults/ || return 1 + mv "$pkgdir"/etc/postfix/*LICENSE* \ + "$pkgdir"/usr/share/licenses/${pkgname}/ || return 1 install -d -o postfix -g postfix "$pkgdir"/var/spool/postfix install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname - install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE chown postfix "$pkgdir"/var/spool/postfix/* "$pkgdir"/var/lib/postfix \ || return 1 chgrp postdrop "$pkgdir"/var/spool/postfix/maildrop \ "$pkgdir"/var/spool/postfix/public || return 1 + + cd "$pkgdir"/etc/postfix/ || return 1 + for map in ldap mysql pcre pgsql sqlite; do + msg "split $map" + _mvline "^\s*$map" "$map" dynamicmaps.cf || return 1 + done } _mv_dict() { @@ -150,10 +138,12 @@ _mv_dict() { shift pkgdesc="$m map support for postfix" depends= - install="postfix-${m}.post-install" - mkdir -p "$subpkgdir"/usr/lib/postfix - mv "$pkgdir"/usr/lib/postfix/dict_${m}.so \ - "$subpkgdir"/usr/lib/postfix/ + mkdir -p "$subpkgdir"/usr/lib/postfix \ + "$subpkgdir"/etc/postfix/dynamicmaps.cf.d + mv "$pkgdir"/usr/lib/postfix/postfix-${m}.so \ + "$subpkgdir"/usr/lib/postfix/ || return 1 + mv "$pkgdir"/etc/postfix/dynamicmaps.cf.d/${m} \ + "$subpkgdir"/etc/postfix/dynamicmaps.cf.d/ || return 1 } ldap() { _mv_dict ldap ; } @@ -162,33 +152,12 @@ pcre() { _mv_dict pcre ; } pgsql() { _mv_dict pgsql ; } sqlite() { _mv_dict sqlite ; } -md5sums="c3f0f51d8865559b40e9350eb3816011 postfix-2.11.3.tar.gz +md5sums="3ec1416e7d4fba9566297c8fcf7a348c postfix-3.0.1.tar.gz d773f01dcc965d219a8a37b88f89c5bf postfix.initd -c03239969df760e2a74c4e048ce514a1 dynamic-maps.patch -cd39f4c05a6462c121a3ab3612d6a5bd no-glibc.patch -442efd1a95b0c061dfb8ab75456e0f24 dynamicmaps.cf -2ebe51a882eb9d6d7866583eb6af3969 postfix-ldap.post-install -2ebe51a882eb9d6d7866583eb6af3969 postfix-mysql.post-install -fd16ec00b60269c4ede4a0a0a514cefa postfix-pcre.post-install -2ebe51a882eb9d6d7866583eb6af3969 postfix-pgsql.post-install -2ebe51a882eb9d6d7866583eb6af3969 postfix-sqlite.post-install" -sha256sums="04e5146e6e56261baae9f63c590348a4b12ce22d3d46260e26e97233f40802c3 postfix-2.11.3.tar.gz +b7ed1614fafb5fed6253b1a62f76b709 no-glibc.patch" +sha256sums="cd2bd6447fe3368bb1a39f482f8dd1eec87c63067a0eb75f9aec8e4eadd21328 postfix-3.0.1.tar.gz 6b3fe71542ab783c7adddbfa161f7e2dcb2325913ad5d611ca56f730876ce4ab postfix.initd -cfa5000955f1941082567a9e50764f52851f33c468f534c0431f6932d73e8ffb dynamic-maps.patch -ad2d6b6889ea2e8b1eab05c87f153a1a2ce82e3a877e1235b595a990266dfc04 no-glibc.patch -2041ff6cd71fe16f3d75603ff40d90a08a8b97f0883e1de1d58563ab1521b5ea dynamicmaps.cf -fbd75ef31a5d78d5f82b67e08e5bf5ada380afa58a69ef4a07d756c47b3bb498 postfix-ldap.post-install -fbd75ef31a5d78d5f82b67e08e5bf5ada380afa58a69ef4a07d756c47b3bb498 postfix-mysql.post-install -8dbe9339aeac4932e5ee383bfe497512607cd819fe67c38cbf7273118c4b0f71 postfix-pcre.post-install -fbd75ef31a5d78d5f82b67e08e5bf5ada380afa58a69ef4a07d756c47b3bb498 postfix-pgsql.post-install -fbd75ef31a5d78d5f82b67e08e5bf5ada380afa58a69ef4a07d756c47b3bb498 postfix-sqlite.post-install" -sha512sums="b371f1099b1e6e653242a9b4f3812b38b6a9145a4f4c1c9fa5bef6a02e1a9a8f4ec2979c8946f6c873e303ac54f5dd1a84b934eeea8169e2ce187028c36c857e postfix-2.11.3.tar.gz +e8d7c4b3edab2388c9aba6c9ce70ff141ae7aacbd6480e233711241d90b14563 no-glibc.patch" +sha512sums="17916f6dc7113589b011dbf6a6bb54cb9f6d0d5f176fb3c877d4a5a09ac62c4faf088bf1eba0b41c6d2b9d55660fd4c52d4ba2a01f82db3679322756b6da6f37 postfix-3.0.1.tar.gz c179534a7243bcf8c19b5367a703b54fcc88b7587ce7ef07ec111cfe00053779eed23b3ccda81eb20059599b857cae0a57cc02613526209f3dd966d65abd9a3f postfix.initd -1a92089410691d400953472be522c872be1456521203560a4feadb632cb85cfacaf3721108d62111873fb23478976b8a949077734cf801374ca58bcaf363922c dynamic-maps.patch -4d2624ee98f798f8818789433b05cce4ee337750e93ee49c4074bc0c741c678d426c42bd09088596d5010f0bc680ec3b5aed630acfd3d5513512f6a6af15b61c no-glibc.patch -49b8205166f575e5fb9bdaaaaa042dc1be9b556331bf659a55b1115c9fa48486896941f18ca9fb633dd54675079f29a9d69d53c214170731c2127862456ec90b dynamicmaps.cf -b35931865eb15b5cd6a2b95bbf486cd064d1447eac1a91d507a7d23155229ac7e7fdf6b8518e663c5c7072b201786c72aead0d95e94d8708a9b5a7c3f37be138 postfix-ldap.post-install -b35931865eb15b5cd6a2b95bbf486cd064d1447eac1a91d507a7d23155229ac7e7fdf6b8518e663c5c7072b201786c72aead0d95e94d8708a9b5a7c3f37be138 postfix-mysql.post-install -845871cacebb8c4d2073783db06a704c993d258f3113ac6c416e742f87649e8eababceb5f8426849256e7815c492e24654468ee76e7607d91b506e8cba78f2ed postfix-pcre.post-install -b35931865eb15b5cd6a2b95bbf486cd064d1447eac1a91d507a7d23155229ac7e7fdf6b8518e663c5c7072b201786c72aead0d95e94d8708a9b5a7c3f37be138 postfix-pgsql.post-install -b35931865eb15b5cd6a2b95bbf486cd064d1447eac1a91d507a7d23155229ac7e7fdf6b8518e663c5c7072b201786c72aead0d95e94d8708a9b5a7c3f37be138 postfix-sqlite.post-install" +cf9ef0d07e54011107da57e2855cbda10047c100047e2cc2fdede072ace1fc6c060a6b1cfc8c277417a28a23ecd3c6ffdc061da1673e8f61d2ed11899f1efb25 no-glibc.patch" |