wok-next view dovecot/receipt @ rev 20845

Add neofetch, tcl2c-fork; build two versions of tklauncher (using tcl2c and tcl2c-fork) with different warnings
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Jun 23 09:45:42 2018 +0300 (2018-06-23)
parents 757d032c55c7
children d5aab818505e
line source
1 # SliTaz package receipt v2.
3 PACKAGE="dovecot"
4 VERSION="2.1.6"
5 CATEGORY="network"
6 SHORT_DESC="Dovecot IMAP and POP3 Server"
7 MAINTAINER="l.lemarinel@gmail.com"
8 LICENSE="LGPL2.1"
9 WEB_SITE="http://dovecot.org"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="http://www.dovecot.org/releases/${VERSION:0:3}/$TARBALL"
14 BUILD_DEPENDS="openssl-dev libcap-dev openldap-dev \
15 libmysqlclient mysql-dev sqlite3-dev pam-dev postgresql-dev"
17 compile_rules() {
18 ./configure \
19 --sysconfdir=/etc/dovecot \
20 --libexecdir=/usr/lib/$PACKAGE \
21 --with-ssl=openssl \
22 --with-ldap=plugin \
23 --with-sql=plugin \
24 --with-mysql \
25 --with-pgsql \
26 --with-sqlite \
27 $CONFIGURE_ARGS &&
28 fix libtool &&
29 make &&
30 make DESTDIR=$DESTDIR install || return 1
32 install -Dm755 $stuff/init.d/dovecot $install/etc/init.d/dovecot
33 }
35 genpkg_rules() {
36 mkdir -p $fs/usr/lib \
37 $fs/var/log/dovecot \
38 $fs/etc/ssl/misc
40 cp -a $install/usr/sbin $fs/usr
41 cp -a $install/usr/bin $fs/usr
42 cp -a $install/usr/lib $fs/usr
43 cp -a $install/etc $fs/
45 #cp -pa $fs/etc/dovecot/dovecot-example.conf $fs/etc/dovecot/dovecot.conf
46 cp -pa $install/usr/share/doc/dovecot/example-config/* $fs/etc/dovecot/
47 #cp -pa $src/doc/example-config/conf.d/*.conf $fs/etc/dovecot/conf.d
48 #cp -pa $src/doc/example-config/conf.d/*.ext $fs/etc/dovecot/conf.d
49 cp -pa $src/doc/*.cnf $fs/etc/ssl
50 cp -pa $src/doc/mkcert.sh $fs/etc/ssl/misc/dovmkcert.sh
52 # Remove archive file *.*a
53 find $fs -name "*.*a" -exec rm -f {} \;
55 # Fix perms
56 chmod 755 $fs/etc/ssl/misc/*
58 # Customising config.
59 sed -i -e "s/^#default_vsz_limit.*/default_vsz_limit = 50M/" \
60 $fs/etc/dovecot/conf.d/10-master.conf
62 sed -i -e "s!^#log_path =.*!log_path = /var/log/dovecot/dovecot.log!" \
63 $fs/etc/dovecot/conf.d/10-logging.conf
65 sed -i -e "s/^#listen.*/listen = */" \
66 $fs/etc/dovecot/dovecot.conf
68 # Unsafe, see CVE-2014-3566 POODLE
69 sed -i -e "s/^#ssl_protocols =.*/ssl_protocols = !SSLv2 !SSLv3/" \
70 $fs/etc/dovecot/conf.d/10-ssl.conf
71 DEPENDS="openssl libcap openldap pam postgresql libmysqlclient"
72 }
74 post_install() {
75 local user=dovecot group=dovecot
77 if ! grep -q $user "$1/etc/passwd"; then
78 chroot "$1/" addgroup -g 76 -S $group
79 chroot "$1/" adduser -u 76 -S -D -H -G $group $user
80 chroot "$1/" adduser -u 74 -S -D -H -G nogroup dovenull
81 fi
83 # Set perms for files and directories
84 chroot "$1/" chown -R $user:$group /var/log/dovecot
86 [ -n "$quiet" } || cat <<EOF
88 .------------------------------------------------.
89 | To start dovecot server you can run: |
90 | /etc/init.d/dovecot start |
91 | |
92 | Or add dovecot to RUN_DAEMONS in /etc/rcS.conf |
93 '------------------------------------------------'
94 EOF
95 }
98 post_remove() {
99 [ -d "$1/var/log/dovecot" ] && rm -rf "$1/var/log/dovecot"
100 [ -d "$1/var/run/dovecot" ] && rm -rf "$1/var/run/dovecot"
102 chroot "$1/" deluser dovecot
103 chroot "$1/" deluser dovenull
104 }