wok-next annotate dovecot/receipt @ rev 21504
updated atftp (0.7.1 -> 0.7.2)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Jun 19 07:32:57 2020 +0100 (2020-06-19) |
parents | 7d220edb0d73 |
children |
rev | line source |
---|---|
al@20534 | 1 # SliTaz package receipt v2. |
pascal@11220 | 2 |
pascal@11220 | 3 PACKAGE="dovecot" |
Hans-G?nter@21343 | 4 VERSION="2.3.10" |
pascal@11220 | 5 CATEGORY="network" |
al@20534 | 6 SHORT_DESC="Dovecot IMAP and POP3 Server" |
Hans-G?nter@21249 | 7 MAINTAINER="maintainer@slitaz.org" |
pascal@15021 | 8 LICENSE="LGPL2.1" |
al@21020 | 9 WEB_SITE="https://dovecot.org/" |
al@20534 | 10 |
pascal@11220 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
Hans-G?nter@21249 | 12 WGET_URL="http://www.dovecot.org/releases/${VERSION%.*}/$TARBALL" |
slaxemulator@12767 | 13 |
Hans-G?nter@21249 | 14 BUILD_DEPENDS="libcap-dev libmysqlclient mysql-dev openldap-dev |
Hans-G?nter@21249 | 15 openssl-dev pam-dev postgresql-dev sqlite3-dev" |
pascal@11220 | 16 |
Hans-G?nter@21249 | 17 compile_rules() |
Hans-G?nter@21249 | 18 { |
Hans-G?nter@21249 | 19 ./configure \ |
Hans-G?nter@21249 | 20 --sysconfdir=/etc/dovecot \ |
Hans-G?nter@21249 | 21 --libexecdir=/usr/lib/$PACKAGE \ |
Hans-G?nter@21249 | 22 --with-ssl=openssl \ |
Hans-G?nter@21249 | 23 --with-ldap=plugin \ |
Hans-G?nter@21249 | 24 --with-sql=plugin \ |
Hans-G?nter@21249 | 25 --with-mysql \ |
Hans-G?nter@21249 | 26 --with-pgsql \ |
Hans-G?nter@21249 | 27 --with-sqlite \ |
gokhlayeh@11573 | 28 $CONFIGURE_ARGS && |
al@20569 | 29 fix libtool && |
slaxemulator@12767 | 30 make && |
al@21020 | 31 make DESTDIR=$install install || return 1 |
al@20534 | 32 |
al@20534 | 33 install -Dm755 $stuff/init.d/dovecot $install/etc/init.d/dovecot |
pascal@11220 | 34 } |
pascal@11220 | 35 |
Hans-G?nter@21249 | 36 genpkg_rules() |
Hans-G?nter@21249 | 37 { |
erjo@12043 | 38 mkdir -p $fs/usr/lib \ |
erjo@12043 | 39 $fs/var/log/dovecot \ |
erjo@12060 | 40 $fs/etc/ssl/misc |
al@20534 | 41 |
Hans-G?nter@21249 | 42 cp -a $install/usr/sbin $fs/usr |
Hans-G?nter@21249 | 43 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@21249 | 44 cp -a $install/usr/lib $fs/usr |
Hans-G?nter@21249 | 45 cp -a $install/etc $fs/ |
erjo@12043 | 46 |
Hans-G?nter@21249 | 47 #cp -pa $fs/etc/dovecot/dovecot-example.conf $fs/etc/dovecot/dovecot.conf |
erjo@12060 | 48 cp -pa $install/usr/share/doc/dovecot/example-config/* $fs/etc/dovecot/ |
Hans-G?nter@21249 | 49 #cp -pa $src/doc/example-config/conf.d/*.conf $fs/etc/dovecot/conf.d |
Hans-G?nter@21249 | 50 #cp -pa $src/doc/example-config/conf.d/*.ext $fs/etc/dovecot/conf.d |
Hans-G?nter@21249 | 51 cp -pa $src/doc/*.cnf $fs/etc/ssl |
Hans-G?nter@21249 | 52 cp -pa $src/doc/mkcert.sh $fs/etc/ssl/misc/dovmkcert.sh |
al@20534 | 53 |
pascal@11220 | 54 # Remove archive file *.*a |
pascal@11220 | 55 find $fs -name "*.*a" -exec rm -f {} \; |
al@20534 | 56 |
Hans-G?nter@21249 | 57 # Fix permissions |
erjo@12060 | 58 chmod 755 $fs/etc/ssl/misc/* |
al@20534 | 59 |
Hans-G?nter@21249 | 60 # Customising configuration |
pascal@17238 | 61 sed -i -e "s/^#default_vsz_limit.*/default_vsz_limit = 50M/" \ |
erjo@12060 | 62 $fs/etc/dovecot/conf.d/10-master.conf |
erjo@12149 | 63 |
pascal@17238 | 64 sed -i -e "s!^#log_path =.*!log_path = /var/log/dovecot/dovecot.log!" \ |
erjo@12060 | 65 $fs/etc/dovecot/conf.d/10-logging.conf |
al@20534 | 66 |
pascal@17238 | 67 sed -i -e "s/^#listen.*/listen = */" \ |
erjo@12060 | 68 $fs/etc/dovecot/dovecot.conf |
pascal@17238 | 69 |
pascal@17238 | 70 # Unsafe, see CVE-2014-3566 POODLE |
pascal@17238 | 71 sed -i -e "s/^#ssl_protocols =.*/ssl_protocols = !SSLv2 !SSLv3/" \ |
pascal@17238 | 72 $fs/etc/dovecot/conf.d/10-ssl.conf |
al@20534 | 73 DEPENDS="openssl libcap openldap pam postgresql libmysqlclient" |
pascal@11220 | 74 } |
erjo@12043 | 75 |
Hans-G?nter@21249 | 76 post_install() |
Hans-G?nter@21249 | 77 { |
al@20534 | 78 local user=dovecot group=dovecot |
al@20534 | 79 |
Hans-G?nter@21249 | 80 if ! grep -q $user "$1/etc/passwd" |
Hans-G?nter@21249 | 81 then |
pascal@18730 | 82 chroot "$1/" addgroup -g 76 -S $group |
al@20534 | 83 chroot "$1/" adduser -u 76 -S -D -H -G $group $user |
al@20534 | 84 chroot "$1/" adduser -u 74 -S -D -H -G nogroup dovenull |
erjo@12043 | 85 fi |
erjo@12043 | 86 |
Hans-G?nter@21249 | 87 # Set permissions for files and directories |
al@20534 | 88 chroot "$1/" chown -R $user:$group /var/log/dovecot |
erjo@12043 | 89 |
al@20534 | 90 [ -n "$quiet" } || cat <<EOF |
erjo@12043 | 91 |
al@20534 | 92 .------------------------------------------------. |
al@20534 | 93 | To start dovecot server you can run: | |
al@20534 | 94 | /etc/init.d/dovecot start | |
al@20534 | 95 | | |
al@20534 | 96 | Or add dovecot to RUN_DAEMONS in /etc/rcS.conf | |
al@20534 | 97 '------------------------------------------------' |
erjo@12043 | 98 EOF |
erjo@12043 | 99 } |
erjo@12043 | 100 |
erjo@12043 | 101 |
Hans-G?nter@21249 | 102 post_remove() |
Hans-G?nter@21249 | 103 { |
al@20534 | 104 [ -d "$1/var/log/dovecot" ] && rm -rf "$1/var/log/dovecot" |
al@20534 | 105 [ -d "$1/var/run/dovecot" ] && rm -rf "$1/var/run/dovecot" |
al@20534 | 106 |
al@20534 | 107 chroot "$1/" deluser dovecot |
slaxemulator@12767 | 108 chroot "$1/" deluser dovenull |
erjo@12043 | 109 } |