wok annotate dovecot/receipt @ rev 23255

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