wok view postfixadmin/receipt @ rev 21697
updated postfixadmin (2.3.5 -> 3.2)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Jun 05 17:09:07 2019 +0100 (2019-06-05) |
parents | 9e01bc6321ea |
children | 309a56b97699 |
line source
1 # SliTaz package receipt.
3 PACKAGE="postfixadmin"
4 VERSION="3.2"
5 CATEGORY="network"
6 SHORT_DESC="Postfix web administration."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL"
9 WEB_SITE="http://postfixadmin.sourceforge.net/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
14 DEPENDS="php php-mysqli php-imap postfix mysql_or_postgresql"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 genpkg_rules()
18 {
19 mkdir -p $fs/usr/share/postfixadmin \
20 $fs/etc/postfixadmin \
21 $fs/usr/share/doc/postfixadmin \
22 $fs/usr/lib/postfixadmin
24 cp -a $src/* $fs/usr/share/postfixadmin/
25 mv $fs/usr/share/postfixadmin/config.inc.php $fs/etc/postfixadmin
26 ln -s /etc/postfixadmin/config.inc.php $fs/usr/share/postfixadmin/config.inc.php
27 sed -i 's/false/true/' $fs/etc/postfixadmin/config.inc.php
29 # Remove unwanted files
30 rm -rf $fs/usr/share/postfixadmin/debian
32 # Move docs
33 mv $fs/usr/share/postfixadmin/*.TXT $fs/usr/share/doc/postfixadmin
34 mv $fs/usr/share/postfixadmin/DOCUMENTS $fs/usr/share/doc/postfixadmin
35 mv $fs/usr/share/postfixadmin/ADDITIONS/* $fs/usr/lib/postfixadmin
36 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/*.pl $fs/usr/lib/postfixadmin
37 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/ $fs/usr/share/doc/postfixadmin
39 rm -rf $fs/usr/share/postfixadmin/ADDITIONS
41 # Fix group
42 chown -R root.root $fs/usr/share/postfixadmin/
43 }
45 post_install()
46 {
47 # Configure lighttpd server
48 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
49 if ! grep -q /usr/share/postfixadmin/ "$1/etc/lighttpd/lighttpd.conf"; then
50 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
51 if [ -z "$1" ]; then
52 # Start Web server.
53 /etc/init.d/lighttpd stop
54 /etc/init.d/lighttpd start
55 fi
56 fi
57 fi
58 # Configure apache server
59 if [ -f "$1/etc/apache/httpd.conf" ]; then
60 if [ ! -f "$1/etc/apache/conf.d/postfixadmin" ]; then
61 cat > "$1/etc/apache/conf.d/postfixadmin" <<EOT
62 <IfModule mod_alias.c>
63 Alias /postfixadmin /usr/share/postfixadmin
64 </IfModule>
65 <DirectoryMatch /usr/share/postfixadmin/>
66 DirectoryIndex index.php
67 Options +FollowSymLinks
68 AllowOverride None
69 Order allow,deny
70 Allow from all
71 </DirectoryMatch>
72 EOT
73 if [ -z "$1" ]; then
74 # Start Web server.
75 /etc/init.d/apache stop
76 /etc/init.d/apache start
77 fi
78 fi
79 fi
80 }