wok-current view dovecot/receipt @ rev 15450
Up: edje-dev (1.7.9)
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Tue Nov 05 20:58:04 2013 +0100 (2013-11-05) |
parents | 3bae6b83919f |
children | 0d8a1a3edc72 |
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/var/run/dovecot \
43 $fs/etc/ssl/misc
46 cp -a $install/usr/sbin $fs/usr
47 cp -a $install/usr/bin $fs/usr
48 cp -a $install/usr/lib $fs/usr
49 cp -a $install/etc $fs/
51 cp -pa $stuff/init.d $fs/etc
53 #cp -pa $fs/etc/dovecot/dovecot-example.conf $fs/etc/dovecot/dovecot.conf
54 cp -pa $install/usr/share/doc/dovecot/example-config/* $fs/etc/dovecot/
55 #cp -pa $src/doc/example-config/conf.d/*.conf $fs/etc/dovecot/conf.d
56 #cp -pa $src/doc/example-config/conf.d/*.ext $fs/etc/dovecot/conf.d
57 cp -pa $src/doc/*.cnf $fs/etc/ssl
58 cp -pa $src/doc/mkcert.sh $fs/etc/ssl/misc/dovmkcert.sh
60 # Remove archive file *.*a
61 find $fs -name "*.*a" -exec rm -f {} \;
63 # Fix perms
64 chmod 755 $fs/etc/ssl/misc/*
66 # Customising config.
67 sed -i -e "s/^#default_vsz_limit.*/default_vsz_limit = 50M"/ \
68 $fs/etc/dovecot/conf.d/10-master.conf
70 sed -i -e "s!^#log_path =.*!log_path = /var/log/dovecot/dovecot.log"! \
71 $fs/etc/dovecot/conf.d/10-logging.conf
73 sed -i -e "s/^#listen.*/listen = *"/ \
74 $fs/etc/dovecot/dovecot.conf
75 }
77 #nd post install commands for Tazpkg.
78 post_install()
79 {
80 local user
81 local group
83 user=dovecot
84 group=dovecot
86 if ! grep -q $user $1/etc/passwd; then
87 echo -n "Adding user/group $user..."
88 chroot $1/ addgroup -g 76 -S $group
89 chroot $1/ adduser -u 76 -S -D -H -G $group $user
90 chroot $1/ adduser -u 74 -S -D -H -G nogroup dovenull
91 status
92 fi
95 # Set perms for files and directories
96 chroot $1/ chown -R ${user}.${group} /var/log/${user} \
97 /var/run/${user}
99 cat <<EOF
100 ----
101 To start $PACKAGE server you can run :
103 /etc/init.d/$PACKAGE start
105 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
106 ----
107 EOF
108 }
111 post_remove()
112 {
113 echo "Removing stalled files..."
114 test -d $1/var/log/dovecot && rm -rf $1/var/log/dovecot
115 test -d $1/var/run/dovecot && rm -rf $1/var/run/dovecot
117 echo "Removing user/group daemon"
118 chroot "$1/" deluser dovecot
119 chroot "$1/" deluser dovenull
120 }