wok-current view dovecot/receipt @ rev 18742
docbook-xsl: I broke it again, fixing
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Dec 25 17:11:02 2015 +0200 (2015-12-25) |
parents | 70fb5fbb6fde |
children | 970c5ec9a60a |
line source
1 # SliTaz package receipt.
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 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://dovecot.org"
11 WGET_URL="http://www.dovecot.org/releases/${VERSION:0:3}/$TARBALL"
13 DEPENDS="libssl libcap openldap pam postgresql libmysqlclient"
14 BUILD_DEPENDS="openssl-dev libcap-dev openldap-dev \
15 libmysqlclient mysql-dev sqlite-dev pam-dev postgresql-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 ./configure --prefix=/usr \
22 --sysconfdir=/etc/dovecot \
23 --localstatedir=/var \
24 --libexecdir=/usr/lib/$PACKAGE \
25 --with-ssl=openssl \
26 --with-ldap=plugin \
27 --with-sql=plugin \
28 --with-mysql \
29 --with-pgsql \
30 --with-sqlite \
31 $CONFIGURE_ARGS &&
32 make &&
33 make DESTDIR=$DESTDIR install
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr/lib \
41 $fs/var/log/dovecot \
42 $fs/etc/ssl/misc
45 cp -a $install/usr/sbin $fs/usr
46 cp -a $install/usr/bin $fs/usr
47 cp -a $install/usr/lib $fs/usr
48 cp -a $install/etc $fs/
50 cp -pa $stuff/init.d $fs/etc
52 #cp -pa $fs/etc/dovecot/dovecot-example.conf $fs/etc/dovecot/dovecot.conf
53 cp -pa $install/usr/share/doc/dovecot/example-config/* $fs/etc/dovecot/
54 #cp -pa $src/doc/example-config/conf.d/*.conf $fs/etc/dovecot/conf.d
55 #cp -pa $src/doc/example-config/conf.d/*.ext $fs/etc/dovecot/conf.d
56 cp -pa $src/doc/*.cnf $fs/etc/ssl
57 cp -pa $src/doc/mkcert.sh $fs/etc/ssl/misc/dovmkcert.sh
59 # Remove archive file *.*a
60 find $fs -name "*.*a" -exec rm -f {} \;
62 # Fix perms
63 chmod 755 $fs/etc/ssl/misc/*
65 # Customising config.
66 sed -i -e "s/^#default_vsz_limit.*/default_vsz_limit = 50M/" \
67 $fs/etc/dovecot/conf.d/10-master.conf
69 sed -i -e "s!^#log_path =.*!log_path = /var/log/dovecot/dovecot.log!" \
70 $fs/etc/dovecot/conf.d/10-logging.conf
72 sed -i -e "s/^#listen.*/listen = */" \
73 $fs/etc/dovecot/dovecot.conf
75 # Unsafe, see CVE-2014-3566 POODLE
76 sed -i -e "s/^#ssl_protocols =.*/ssl_protocols = !SSLv2 !SSLv3/" \
77 $fs/etc/dovecot/conf.d/10-ssl.conf
78 }
80 #nd post install commands for Tazpkg.
81 post_install()
82 {
83 local user
84 local group
86 user=dovecot
87 group=dovecot
89 if ! grep -q $user "$1/etc/passwd"; then
90 echo -n "Adding user/group $user..."
91 chroot "$1/" addgroup -g 76 -S $group
92 chroot "$1/" adduser -u 76 -S -D -H -G $group $user
93 chroot "$1/" adduser -u 74 -S -D -H -G nogroup dovenull
94 status
95 fi
98 # Set perms for files and directories
99 chroot "$1/" chown -R ${user}.${group} /var/log/${user} \
101 cat <<EOF
102 ----
103 To start $PACKAGE server you can run :
105 /etc/init.d/$PACKAGE start
107 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
108 ----
109 EOF
110 }
113 post_remove()
114 {
115 echo "Removing stalled files..."
116 test -d "$1/var/log/dovecot" && rm -rf "$1/var/log/dovecot"
117 test -d "$1/var/run/dovecot" && rm -rf "$1/var/run/dovecot"
119 echo "Removing user/group daemon"
120 chroot "$1/" deluser dovecot
121 chroot "$1/" deluser dovenull
122 }