diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-08-27 13:10:05 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-08-30 06:37:17 +0000 |
commit | 1d69af069303418a509ee137419e8f417bbcce24 (patch) | |
tree | eca4db38a00a23f6a879da7b45c2677dd60b009a | |
parent | f6ad56cf5e99a98dc23c955145e7beeee39094a1 (diff) | |
download | aports-1d69af069303418a509ee137419e8f417bbcce24.tar.bz2 aports-1d69af069303418a509ee137419e8f417bbcce24.tar.xz |
main/dovecot: upgrade to 2.0.1
-rw-r--r-- | main/dovecot/APKBUILD | 54 | ||||
-rw-r--r-- | main/dovecot/dovecot-sample-config.post-install | 10 | ||||
-rw-r--r-- | main/dovecot/dovecot.pre-install | 3 |
3 files changed, 39 insertions, 28 deletions
diff --git a/main/dovecot/APKBUILD b/main/dovecot/APKBUILD index 40aae396a4..e54adce8b7 100644 --- a/main/dovecot/APKBUILD +++ b/main/dovecot/APKBUILD @@ -1,29 +1,28 @@ # Contributor: Michael Mason <ms13sp@gmail.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=dovecot -pkgver=1.2.13 -pkgrel=1 +pkgver=2.0.1 +pkgrel=0 pkgdesc="IMAP and POP3 server" url="http://www.dovecot.org/" license="LGPL-2.1" depends="openssl" -pkgusers="dovecot" -pkggroups="dovecot" +pkgusers="dovecot dovenull" +pkggroups="dovecot dovenull" depends="logrotate" makedepends="libcap-dev zlib-dev openssl-dev bzip2-dev postgresql-dev mysql-dev sqlite-dev" install="dovecot.pre-install dovecot.post-install" -subpackages="$pkgname-doc $pkgname-dev $pkgname-pgsql $pkgname-mysql - $pkgname-sqlite" -source="http://www.dovecot.org/releases/1.2/$pkgname-$pkgver.tar.gz +subpackages="$pkgname-sample-config:config $pkgname-doc $pkgname-dev + $pkgname-pgsql $pkgname-mysql $pkgname-sqlite" +source="http://www.dovecot.org/releases/2.0/$pkgname-$pkgver.tar.gz dovecot.logrotate dovecot.initd - 2281223b9cb9.patch + dovecot-sample-config.post-install " prepare() { cd "$srcdir"/$pkgname-$pkgver - patch -p1 -i "$srcdir"/2281223b9cb9.patch || return 1 } build() { @@ -31,11 +30,10 @@ build() { ./configure --prefix=/usr \ --localstatedir=/var \ - --sysconfdir=/etc/dovecot \ + --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-sql=plugin \ - --with-sql-drivers \ --with-mysql \ --with-sqlite \ --with-pgsql \ @@ -51,23 +49,18 @@ package() { "$pkgdir"/etc/ssl/dovecot install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -D "$srcdir"/dovecot.logrotate "$pkgdir"/etc/logrotate.d/dovecot + + # default config install doc/dovecot-openssl.cnf "$pkgdir"/etc/dovecot/ - mv "$pkgdir"/etc/dovecot/dovecot-example.conf \ + cp "$pkgdir"/usr/share/doc/dovecot/example-config/dovecot.conf \ "$pkgdir"/etc/dovecot/dovecot.conf || return 1 - + mkdir -p "$pkgdir"/etc/dovecot/conf.d + # fix ssl dirs in defautl config and set defautl passdb to passwd - sed -i -e 's,^#ssl_cert_file =.*,ssl_cert_file = /etc/ssl/dovecot/server.pem,' \ - -e 's,^#ssl_key_file =.*,ssl_key_file = /etc/ssl/dovecot/server.key,' \ - -e '/passdb pam {/,/^$/{ - s/passdb pam/\#passdb pam/ - s/}/\#}/ - }' \ - -e '/\#passdb passwd {/,/^$/{ - s/\#passdb passwd/passdb passwd/ - s/\#\}/\}/ - }' \ - -e 's,#log_path =.*,log_path = /var/log/dovecot.log,' \ - "$pkgdir"/etc/dovecot/dovecot.conf + sed -i -e 's,^ssl_cert =.*,ssl_cert = </etc/ssl/dovecot/server.pem,' \ + -e 's,^ssl_key =.*,ssl_key = </etc/ssl/dovecot/server.key,' \ + "$pkgdir"/usr/share/doc/dovecot/example-config/conf.d/10-ssl.conf\ + || return 1 } _mv() { @@ -96,7 +89,14 @@ sqlite() { _mv $(cd "$pkgdir" && find usr -name '*sqlite.so') } -md5sums="aaee3b5fd59e01780305553248f686bc dovecot-1.2.13.tar.gz +config() { + pkgdesc="Sample configuration files for dovecot" + install="dovecot-sample-config.post-install" + _mv usr/share/doc/dovecot/example-config + mkdir -p "$subpkgdir"/etc/dovecot/conf.d +} + +md5sums="f58749dae7826d82b96fccf2c9e3bbf7 dovecot-2.0.1.tar.gz aec5cc797ab2acf72ce3b6bb1030345f dovecot.logrotate c58b474dca20e6e60fa4f1f5b9c726e1 dovecot.initd -c8581417ce7946668839a9d0fcd93ee8 2281223b9cb9.patch" +95cf57ecc835882228bbbb019ce3abf8 dovecot-sample-config.post-install" diff --git a/main/dovecot/dovecot-sample-config.post-install b/main/dovecot/dovecot-sample-config.post-install new file mode 100644 index 0000000000..7f1a204fab --- /dev/null +++ b/main/dovecot/dovecot-sample-config.post-install @@ -0,0 +1,10 @@ +#!/bin/sh + +cd /usr/share/doc/dovecot/example-config || exit 0 + +for i in dovecot.conf conf.d/*; do + if ! [ -e /etc/dovecot/$i ]; then + cp $i /etc/dovecot/$i + fi +done + diff --git a/main/dovecot/dovecot.pre-install b/main/dovecot/dovecot.pre-install index 5acdcb5c8d..05f207f6fb 100644 --- a/main/dovecot/dovecot.pre-install +++ b/main/dovecot/dovecot.pre-install @@ -1,4 +1,5 @@ #!/bin/sh -adduser -H -h /dev/null -s /bin/false -D dovecot 2>/dev/null +adduser -H -h /dev/null -s /bin/false -D dovecot 2>/dev/null +adduser -H -h /dev/null -s /bin/false -D dovenull 2>/dev/null exit 0 |