wok-6.x view postfixadmin/receipt @ rev 23529
updated python-pip (19.0.3 -> 20.0.2)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Apr 06 14:44:29 2020 +0100 (2020-04-06) |
parents | 309a56b97699 |
children | 5ea0ce1cecc0 |
line source
1 # SliTaz package receipt.
3 PACKAGE="postfixadmin"
4 VERSION="3.2.3"
5 CATEGORY="network"
6 SHORT_DESC="Postfix web administration."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL"
9 WEB_SITE="https://github.com/postfixadmin/postfixadmin"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$WEB_SITE/archive/$TARBALL"
14 DEPENDS="mysql_or_postgresql php php-imap php-mysqli postfix"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 genpkg_rules()
18 {
19 mkdir -p $fs/usr/share/postfixadmin
20 mkdir -p $fs/etc/postfixadmin
21 mkdir -p $fs/usr/share/doc/postfixadmin
22 mkdir -p $fs/usr/lib/postfixadmin
24 cp -a $src/* $fs/usr/share/postfixadmin/
25 mv $fs/usr/share/postfixadmin/config.inc.php \
26 $fs/etc/postfixadmin
27 ln -s /etc/postfixadmin/config.inc.php \
28 $fs/usr/share/postfixadmin/config.inc.php
29 sed -i 's/false/true/' $fs/etc/postfixadmin/config.inc.php
31 # Remove unwanted files
32 rm -rf $fs/usr/share/postfixadmin/debian
34 # Move documentation
35 mv $fs/usr/share/postfixadmin/*.TXT \
36 $fs/usr/share/doc/postfixadmin
37 mv $fs/usr/share/postfixadmin/DOCUMENTS \
38 $fs/usr/share/doc/postfixadmin
39 mv $fs/usr/share/postfixadmin/ADDITIONS/* \
40 $fs/usr/lib/postfixadmin
41 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/*.pl \
42 $fs/usr/lib/postfixadmin
43 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/ \
44 $fs/usr/share/doc/postfixadmin
46 rm -rf $fs/usr/share/postfixadmin/ADDITIONS
48 # Fix group
49 chown -R root.root $fs/usr/share/postfixadmin/
50 }
52 post_install()
53 {
54 # Configure lighttpd server
55 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
56 then
57 if ! grep -q /usr/share/postfixadmin/ "$1/etc/lighttpd/lighttpd.conf"
58 then
59 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
60 if [ -z "$1" ]
61 then
62 # Start Web server.
63 /etc/init.d/lighttpd stop
64 /etc/init.d/lighttpd start
65 fi
66 fi
67 fi
69 # Configure apache server
70 if [ -f "$1/etc/apache/httpd.conf" ]
71 then
72 if [ ! -f "$1/etc/apache/conf.d/postfixadmin" ]
73 then
74 cat > "$1/etc/apache/conf.d/postfixadmin" <<EOT
75 <IfModule mod_alias.c>
76 Alias /postfixadmin /usr/share/postfixadmin
77 </IfModule>
78 <DirectoryMatch /usr/share/postfixadmin/>
79 DirectoryIndex index.php
80 Options +FollowSymLinks
81 AllowOverride None
82 Order allow,deny
83 Allow from all
84 </DirectoryMatch>
85 EOT
86 if [ -z "$1" ]
87 then
88 # Start Web server.
89 /etc/init.d/apache stop
90 /etc/init.d/apache start
91 fi
92 fi
93 fi
94 }