wok-next view dovecot/receipt @ rev 20534
Clean default configure options when site script used.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Mar 30 19:31:50 2018 +0300 (2018-03-30) |
parents | e6615350078d |
children | 835b3b8ce6ac |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="dovecot"
4 VERSION="2.1.6"
5 CATEGORY="network"
6 SHORT_DESC="Dovecot IMAP and POP3 Server"
7 MAINTAINER="l.lemarinel@gmail.com"
8 LICENSE="LGPL2.1"
9 WEB_SITE="http://dovecot.org"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="http://www.dovecot.org/releases/${VERSION:0:3}/$TARBALL"
14 BUILD_DEPENDS="openssl-dev libcap-dev openldap-dev \
15 libmysqlclient mysql-dev sqlite3-dev pam-dev postgresql-dev"
17 compile_rules() {
18 ./configure \
19 --sysconfdir=/etc/dovecot \
20 --libexecdir=/usr/lib/$PACKAGE \
21 --with-ssl=openssl \
22 --with-ldap=plugin \
23 --with-sql=plugin \
24 --with-mysql \
25 --with-pgsql \
26 --with-sqlite \
27 $CONFIGURE_ARGS &&
28 make &&
29 make DESTDIR=$DESTDIR install || return 1
31 install -Dm755 $stuff/init.d/dovecot $install/etc/init.d/dovecot
32 }
34 genpkg_rules() {
35 mkdir -p $fs/usr/lib \
36 $fs/var/log/dovecot \
37 $fs/etc/ssl/misc
39 cp -a $install/usr/sbin $fs/usr
40 cp -a $install/usr/bin $fs/usr
41 cp -a $install/usr/lib $fs/usr
42 cp -a $install/etc $fs/
44 #cp -pa $fs/etc/dovecot/dovecot-example.conf $fs/etc/dovecot/dovecot.conf
45 cp -pa $install/usr/share/doc/dovecot/example-config/* $fs/etc/dovecot/
46 #cp -pa $src/doc/example-config/conf.d/*.conf $fs/etc/dovecot/conf.d
47 #cp -pa $src/doc/example-config/conf.d/*.ext $fs/etc/dovecot/conf.d
48 cp -pa $src/doc/*.cnf $fs/etc/ssl
49 cp -pa $src/doc/mkcert.sh $fs/etc/ssl/misc/dovmkcert.sh
51 # Remove archive file *.*a
52 find $fs -name "*.*a" -exec rm -f {} \;
54 # Fix perms
55 chmod 755 $fs/etc/ssl/misc/*
57 # Customising config.
58 sed -i -e "s/^#default_vsz_limit.*/default_vsz_limit = 50M/" \
59 $fs/etc/dovecot/conf.d/10-master.conf
61 sed -i -e "s!^#log_path =.*!log_path = /var/log/dovecot/dovecot.log!" \
62 $fs/etc/dovecot/conf.d/10-logging.conf
64 sed -i -e "s/^#listen.*/listen = */" \
65 $fs/etc/dovecot/dovecot.conf
67 # Unsafe, see CVE-2014-3566 POODLE
68 sed -i -e "s/^#ssl_protocols =.*/ssl_protocols = !SSLv2 !SSLv3/" \
69 $fs/etc/dovecot/conf.d/10-ssl.conf
70 DEPENDS="openssl libcap openldap pam postgresql libmysqlclient"
71 }
73 post_install() {
74 local user=dovecot group=dovecot
76 if ! grep -q $user "$1/etc/passwd"; then
77 chroot "$1/" addgroup -g 76 -S $group
78 chroot "$1/" adduser -u 76 -S -D -H -G $group $user
79 chroot "$1/" adduser -u 74 -S -D -H -G nogroup dovenull
80 fi
82 # Set perms for files and directories
83 chroot "$1/" chown -R $user:$group /var/log/dovecot
85 [ -n "$quiet" } || cat <<EOF
87 .------------------------------------------------.
88 | To start dovecot server you can run: |
89 | /etc/init.d/dovecot start |
90 | |
91 | Or add dovecot to RUN_DAEMONS in /etc/rcS.conf |
92 '------------------------------------------------'
93 EOF
94 }
97 post_remove() {
98 [ -d "$1/var/log/dovecot" ] && rm -rf "$1/var/log/dovecot"
99 [ -d "$1/var/run/dovecot" ] && rm -rf "$1/var/run/dovecot"
101 chroot "$1/" deluser dovecot
102 chroot "$1/" deluser dovenull
103 }