wok annotate dovecot/receipt @ rev 12149

dovecot: fix depends
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Thu Mar 15 00:09:31 2012 +0100 (2012-03-15)
parents f7d5cfb17be3
children 3bae6b83919f
rev   line source
pascal@11220 1 # SliTaz package receipt.
pascal@11220 2
pascal@11220 3 PACKAGE="dovecot"
erjo@12060 4 VERSION="2.1.1"
pascal@11220 5 CATEGORY="network"
pascal@11220 6 SHORT_DESC="Dovecot IMAP and POP3 Server."
pascal@11220 7 MAINTAINER="l.lemarinel@gmail.com"
pascal@11220 8 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@11220 9 WEB_SITE="www.dovecot.org"
erjo@12060 10 WGET_URL="http://www.dovecot.org/releases/${VERSION%.*}/$TARBALL"
pascal@11220 11 BUILD_DEPENDS="openssl-dev libcap-dev openldap-dev \
gokhlayeh@11431 12 libmysqlclient mysql-dev sqlite-dev pam-dev postgresql-dev"
erjo@12149 13 DEPENDS="libssl libcap libmysqlclient libpostgresqlclient pam"
pascal@11220 14
pascal@11220 15
pascal@11220 16 # Rules to configure and make the package.
pascal@11220 17 compile_rules()
pascal@11220 18 {
pascal@11220 19 cd $src
pascal@11220 20 ./configure --prefix=/usr \
erjo@12060 21 --sysconfdir=/etc \
erjo@12060 22 --localstatedir=/var \
pascal@11220 23 --libexecdir=/usr/lib/$PACKAGE \
pascal@11220 24 --with-ssl=openssl \
pascal@11220 25 --with-ldap=plugin \
pascal@11220 26 --with-sql=plugin \
pascal@11220 27 --with-mysql \
pascal@11220 28 --with-pgsql \
gokhlayeh@11573 29 --with-sqlite \
gokhlayeh@11573 30 $CONFIGURE_ARGS &&
erjo@12060 31 make && make install
erjo@12060 32 # make DESTDIR=$DESTDIR install
pascal@11220 33
pascal@11220 34 }
pascal@11220 35
pascal@11220 36 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@11220 37 genpkg_rules()
pascal@11220 38 {
erjo@12043 39 mkdir -p $fs/usr/lib \
erjo@12043 40 $fs/var/log/dovecot \
erjo@12060 41 $fs/var/run/dovecot \
erjo@12060 42 $fs/etc/ssl/misc
erjo@12060 43
pascal@11220 44
pascal@11220 45 cp -a $install/usr/sbin $fs/usr
erjo@12060 46 cp -a $install/usr/bin $fs/usr
pascal@11220 47 cp -a $install/usr/lib $fs/usr
pascal@11220 48 cp -a $install/etc $fs/
pascal@11220 49
erjo@12043 50 cp -pa $stuff/init.d $fs/etc
erjo@12043 51
erjo@12060 52 #cp -pa $fs/etc/dovecot/dovecot-example.conf $fs/etc/dovecot/dovecot.conf
erjo@12060 53 cp -pa $install/usr/share/doc/dovecot/example-config/* $fs/etc/dovecot/
erjo@12060 54 #cp -pa $src/doc/example-config/conf.d/*.conf $fs/etc/dovecot/conf.d
erjo@12060 55 #cp -pa $src/doc/example-config/conf.d/*.ext $fs/etc/dovecot/conf.d
erjo@12060 56 cp -pa $src/doc/*.cnf $fs/etc/ssl
erjo@12060 57 cp -pa $src/doc/mkcert.sh $fs/etc/ssl/misc/dovmkcert.sh
erjo@12043 58
pascal@11220 59 # Remove archive file *.*a
pascal@11220 60 find $fs -name "*.*a" -exec rm -f {} \;
pascal@11220 61
erjo@12060 62 # Fix perms
erjo@12060 63 chmod 755 $fs/etc/ssl/misc/*
erjo@12060 64
erjo@12060 65 # Customising config.
erjo@12060 66 sed -i -e "s/^#default_vsz_limit.*/default_vsz_limit = 50M"/ \
erjo@12060 67 $fs/etc/dovecot/conf.d/10-master.conf
erjo@12149 68
erjo@12060 69 sed -i -e "s!^#log_path =.*!log_path = /var/log/dovecot/dovecot.log"! \
erjo@12060 70 $fs/etc/dovecot/conf.d/10-logging.conf
erjo@12060 71
erjo@12060 72 sed -i -e "s/^#listen.*/listen = *"/ \
erjo@12060 73 $fs/etc/dovecot/dovecot.conf
pascal@11220 74 }
erjo@12043 75
erjo@12043 76 #nd post install commands for Tazpkg.
erjo@12043 77 post_install()
erjo@12043 78 {
erjo@12043 79 local user
erjo@12043 80 local group
erjo@12043 81
erjo@12043 82 user=dovecot
erjo@12043 83 group=dovecot
erjo@12043 84
erjo@12043 85 if ! grep -q $user $1/etc/passwd; then
erjo@12043 86 echo -n "Adding user/group $user..."
erjo@12043 87 chroot $1/ addgroup -S $group
erjo@12043 88 chroot $1/ adduser -S -D -H -G $group $user
erjo@12060 89 chroot $1/ adduser -S -D -H -G nogroup dovenull
erjo@12043 90 status
erjo@12043 91 fi
erjo@12043 92
erjo@12043 93
erjo@12043 94 # Set perms for files and directories
erjo@12043 95 chroot $1/ chown -R ${user}.${group} /var/log/${user} \
erjo@12043 96 /var/run/${user}
erjo@12043 97
erjo@12043 98 cat <<EOF
erjo@12043 99 ----
erjo@12043 100 To start $PACKAGE server you can run :
erjo@12043 101
erjo@12043 102 /etc/init.d/$PACKAGE start
erjo@12043 103
erjo@12043 104 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
erjo@12043 105 ----
erjo@12043 106 EOF
erjo@12043 107 }
erjo@12043 108
erjo@12043 109
erjo@12043 110 post_remove()
erjo@12043 111 {
erjo@12043 112 echo "Removing stalled files..."
erjo@12043 113 test -d /var/log/dovecot && rm -rf /var/log/dovecot
erjo@12043 114 test -d /var/run/dovecot && rm -rf /var/run/dovecot
erjo@12043 115
erjo@12043 116 echo "Removing user/group daemon"
erjo@12043 117 deluser dovecot
erjo@12060 118 deluser dovenull
erjo@12043 119 }