wok-6.x view dovecot/receipt @ rev 12685
linux: fix modules.list to use new .xz compressed modules
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 01 23:48:55 2012 +0200 (2012-05-01) |
parents | f7d5cfb17be3 |
children | 3bae6b83919f |
line source
1 # SliTaz package receipt.
3 PACKAGE="dovecot"
4 VERSION="2.1.1"
5 CATEGORY="network"
6 SHORT_DESC="Dovecot IMAP and POP3 Server."
7 MAINTAINER="l.lemarinel@gmail.com"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="www.dovecot.org"
10 WGET_URL="http://www.dovecot.org/releases/${VERSION%.*}/$TARBALL"
11 BUILD_DEPENDS="openssl-dev libcap-dev openldap-dev \
12 libmysqlclient mysql-dev sqlite-dev pam-dev postgresql-dev"
13 DEPENDS="libssl libcap libmysqlclient libpostgresqlclient pam"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 ./configure --prefix=/usr \
21 --sysconfdir=/etc \
22 --localstatedir=/var \
23 --libexecdir=/usr/lib/$PACKAGE \
24 --with-ssl=openssl \
25 --with-ldap=plugin \
26 --with-sql=plugin \
27 --with-mysql \
28 --with-pgsql \
29 --with-sqlite \
30 $CONFIGURE_ARGS &&
31 make && make install
32 # make DESTDIR=$DESTDIR install
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 mkdir -p $fs/usr/lib \
40 $fs/var/log/dovecot \
41 $fs/var/run/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
74 }
76 #nd post install commands for Tazpkg.
77 post_install()
78 {
79 local user
80 local group
82 user=dovecot
83 group=dovecot
85 if ! grep -q $user $1/etc/passwd; then
86 echo -n "Adding user/group $user..."
87 chroot $1/ addgroup -S $group
88 chroot $1/ adduser -S -D -H -G $group $user
89 chroot $1/ adduser -S -D -H -G nogroup dovenull
90 status
91 fi
94 # Set perms for files and directories
95 chroot $1/ chown -R ${user}.${group} /var/log/${user} \
96 /var/run/${user}
98 cat <<EOF
99 ----
100 To start $PACKAGE server you can run :
102 /etc/init.d/$PACKAGE start
104 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
105 ----
106 EOF
107 }
110 post_remove()
111 {
112 echo "Removing stalled files..."
113 test -d /var/log/dovecot && rm -rf /var/log/dovecot
114 test -d /var/run/dovecot && rm -rf /var/run/dovecot
116 echo "Removing user/group daemon"
117 deluser dovecot
118 deluser dovenull
119 }