wok annotate dovecot/receipt @ rev 24600
updated ghostscript and ghostscript-dev again (9.02 -> 9.55.0)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Mar 02 07:43:51 2022 +0100 (2022-03-02) |
parents | bfabe25c21ff |
children | c370be1be30e |
rev | line source |
---|---|
pascal@11220 | 1 # SliTaz package receipt. |
pascal@11220 | 2 |
pascal@11220 | 3 PACKAGE="dovecot" |
Hans-G?nter@24498 | 4 VERSION="2.3.18" |
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@24498 | 15 BUILD_DEPENDS="libcap-dev libmysqlclient libpostgresqlclient |
Hans-G?nter@24498 | 16 mysql-dev openldap-dev openssl-dev pam-dev |
Hans-G?nter@24498 | 17 postgresql-dev sqlite-dev" |
pascal@11220 | 18 |
pascal@24439 | 19 # What is the latest version available today? |
pascal@24439 | 20 current_version() |
pascal@24439 | 21 { |
pascal@24439 | 22 wget -O - https://www.dovecot.org/download/ 2>/dev/null | \ |
pascal@24439 | 23 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-||;s|.tar.*||" | sort -Vr | sed q |
pascal@24439 | 24 } |
pascal@24439 | 25 |
pascal@11220 | 26 # Rules to configure and make the package. |
pascal@11220 | 27 compile_rules() |
pascal@11220 | 28 { |
Hans-G?nter@22657 | 29 ./configure \ |
Hans-G?nter@22657 | 30 --prefix=/usr \ |
Hans-G?nter@24498 | 31 --sysconfdir=/etc \ |
Hans-G?nter@22657 | 32 --localstatedir=/var \ |
Hans-G?nter@22657 | 33 --libexecdir=/usr/lib/$PACKAGE \ |
Hans-G?nter@22657 | 34 --with-ldap=plugin \ |
Hans-G?nter@22657 | 35 --with-mysql \ |
Hans-G?nter@22657 | 36 --with-pgsql \ |
Hans-G?nter@22657 | 37 --with-sql=plugin \ |
Hans-G?nter@22657 | 38 --with-sqlite \ |
Hans-G?nter@22657 | 39 --with-ssl=openssl \ |
gokhlayeh@11573 | 40 $CONFIGURE_ARGS && |
slaxemulator@12767 | 41 make && |
Hans-G?nter@24498 | 42 make install DESTDIR=$DESTDIR |
pascal@11220 | 43 } |
pascal@11220 | 44 |
pascal@11220 | 45 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@11220 | 46 genpkg_rules() |
pascal@11220 | 47 { |
Hans-G?nter@24498 | 48 mkdir -p $fs/etc/ssl/misc |
Hans-G?nter@22657 | 49 mkdir -p $fs/usr/lib |
Hans-G?nter@22657 | 50 mkdir -p $fs/var/log/dovecot |
Hans-G?nter@22657 | 51 |
Hans-G?nter@24498 | 52 cp -a $install/etc $fs |
Hans-G?nter@24498 | 53 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@24498 | 54 cp -a $install/usr/lib $fs/usr |
Hans-G?nter@24498 | 55 cp -a $install/usr/sbin $fs/usr |
erjo@12043 | 56 |
Hans-G?nter@24498 | 57 cp -pa $stuff/init.d $fs/etc |
Hans-G?nter@22657 | 58 cp -pa $install/usr/share/doc/dovecot/example-config/* \ |
Hans-G?nter@24498 | 59 $fs/etc/dovecot |
Hans-G?nter@24498 | 60 cp -pa $src/doc/*.cnf $fs/etc/ssl |
Hans-G?nter@24498 | 61 cp -pa $src/doc/mkcert.sh $fs/etc/ssl/misc/dovmkcert.sh |
Hans-G?nter@22657 | 62 |
Hans-G?nter@22657 | 63 # Remove archive files *.*a |
Hans-G?nter@24498 | 64 find $fs -name "*.*a" -exec rm -f {} \; |
Hans-G?nter@24498 | 65 |
Hans-G?nter@22657 | 66 # Fix permissions |
Hans-G?nter@24498 | 67 chmod 755 $fs/etc/ssl/misc/* |
Hans-G?nter@22657 | 68 |
Hans-G?nter@22657 | 69 # Customising configuration. |
Hans-G?nter@24498 | 70 sed -i -e "s|^#default_vsz_limit.*|default_vsz_limit = 50M|" \ |
Hans-G?nter@24498 | 71 $fs/etc/dovecot/conf.d/10-master.conf |
erjo@12149 | 72 |
Hans-G?nter@24498 | 73 sed -i -e "s|^#log_path =.*|log_path = /var/log/dovecot/dovecot.log|" \ |
Hans-G?nter@24498 | 74 $fs/etc/dovecot/conf.d/10-logging.conf |
Hans-G?nter@24498 | 75 |
Hans-G?nter@24498 | 76 sed -i -e "s|^#listen.*|listen = *|" \ |
Hans-G?nter@24498 | 77 $fs/etc/dovecot/dovecot.conf |
pascal@17238 | 78 |
pascal@17238 | 79 # Unsafe, see CVE-2014-3566 POODLE |
Hans-G?nter@24498 | 80 sed -i -e "s|^#ssl_protocols =.*|ssl_protocols = !SSLv2 !SSLv3|" \ |
Hans-G?nter@24498 | 81 $fs/etc/dovecot/conf.d/10-ssl.conf |
pascal@11220 | 82 } |
erjo@12043 | 83 |
Hans-G?nter@24498 | 84 # Post install commands for Tazpkg. |
erjo@12043 | 85 post_install() |
erjo@12043 | 86 { |
erjo@12043 | 87 local user |
erjo@12043 | 88 local group |
Hans-G?nter@22657 | 89 |
erjo@12043 | 90 user=dovecot |
erjo@12043 | 91 group=dovecot |
Hans-G?nter@22657 | 92 |
Hans-G?nter@22657 | 93 if ! grep -q $user "$1/etc/passwd" |
Hans-G?nter@22657 | 94 then |
pascal@20319 | 95 echo |
Hans-G?nter@24498 | 96 echo -n "Adding user and group $user..." |
pascal@18730 | 97 chroot "$1/" addgroup -g 76 -S $group |
pascal@18730 | 98 chroot "$1/" adduser -u 76 -S -D -H -G $group $user |
pascal@18730 | 99 chroot "$1/" adduser -u 74 -S -D -H -G nogroup dovenull |
erjo@12043 | 100 status |
erjo@12043 | 101 fi |
erjo@12043 | 102 |
Hans-G?nter@22657 | 103 # Set permissions for files and directories |
pascal@18730 | 104 chroot "$1/" chown -R ${user}.${group} /var/log/${user} \ |
erjo@12043 | 105 |
Hans-G?nter@24498 | 106 # Create certificate, if neccessary |
Hans-G?nter@24498 | 107 [ -f "$1/etc/ssl/certs/dovecot.pem" ] || |
Hans-G?nter@24498 | 108 chroot "$1/" sh -c 'cd etc/ssl; ./misc/dovmkcert.sh' |
Hans-G?nter@24498 | 109 |
erjo@12043 | 110 cat <<EOF |
erjo@12043 | 111 ---- |
erjo@12043 | 112 To start $PACKAGE server you can run : |
erjo@12043 | 113 |
erjo@12043 | 114 /etc/init.d/$PACKAGE start |
erjo@12043 | 115 |
erjo@12043 | 116 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf |
erjo@12043 | 117 ---- |
erjo@12043 | 118 EOF |
erjo@12043 | 119 } |
erjo@12043 | 120 |
Hans-G?nter@24498 | 121 # Post remove commands for Tazpkg. |
erjo@12043 | 122 post_remove() |
erjo@12043 | 123 { |
Hans-G?nter@24498 | 124 echo "Removing obsolete files..." |
pascal@18730 | 125 test -d "$1/var/log/dovecot" && rm -rf "$1/var/log/dovecot" |
pascal@18730 | 126 test -d "$1/var/run/dovecot" && rm -rf "$1/var/run/dovecot" |
erjo@12043 | 127 |
Hans-G?nter@24498 | 128 echo "Removing user and group dovecot" |
slaxemulator@12767 | 129 chroot "$1/" deluser dovecot |
slaxemulator@12767 | 130 chroot "$1/" deluser dovenull |
erjo@12043 | 131 } |