Commit 1d69af06 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/dovecot: upgrade to 2.0.1

parent f6ad56cf
# 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"
#!/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
#!/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
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