wok-next view postfixadmin/receipt @ rev 20674
Up putty (0.70)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat May 12 05:17:48 2018 +0300 (2018-05-12) |
parents | 2f03cb67a994 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="postfixadmin"
4 VERSION="2.3.5"
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 compile_rules() {
15 mkdir -p \
16 $install/usr/share/postfixadmin \
17 $install/etc/postfixadmin \
18 $install/usr/share/doc/postfixadmin \
19 $install/usr/lib/postfixadmin
21 cp -a $src/* $install/usr/share/postfixadmin/
23 mv $install/usr/share/postfixadmin/config.inc.php $install/etc/postfixadmin
24 ln -s /etc/postfixadmin/config.inc.php \
25 $install/usr/share/postfixadmin/config.inc.php
26 sed -i 's/false/true/' $install/etc/postfixadmin/config.inc.php
28 # Move docs
29 mv $install/usr/share/postfixadmin/ADDITIONS/* $install/usr/lib/postfixadmin
30 mv $install/usr/share/postfixadmin/VIRTUAL_VACATION/*.pl $install/usr/lib/postfixadmin/
31 mv $install/usr/share/postfixadmin/*.TXT $install/usr/share/doc/postfixadmin/
32 mv $install/usr/share/postfixadmin/DOCUMENTS $install/usr/share/doc/postfixadmin/
33 mv $install/usr/share/postfixadmin/VIRTUAL_VACATION/ $install/usr/share/doc/postfixadmin/
35 # Remove unwanted files
36 rm -rf $install/usr/share/postfixadmin/debian/
37 rm -rf $install/usr/share/postfixadmin/ADDITIONS/
39 chown -R root.root $install/usr/share/postfixadmin/
40 }
42 genpkg_rules() {
43 copy @std
44 DEPENDS="php php-mysqli php-imap postfix mysql_or_postgresql"
45 }
47 post_install() {
48 # Configure lighttpd server
49 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
50 if ! grep -q /usr/share/postfixadmin/ "$1/etc/lighttpd/lighttpd.conf"; then
51 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
52 if [ -z "$1" ]; then
53 # Start Web server.
54 /etc/init.d/lighttpd stop
55 /etc/init.d/lighttpd start
56 fi
57 fi
58 fi
59 # Configure apache server
60 if [ -f "$1/etc/apache/httpd.conf" ]; then
61 if [ ! -f "$1/etc/apache/conf.d/postfixadmin" ]; then
62 cat > "$1/etc/apache/conf.d/postfixadmin" <<EOT
63 <IfModule mod_alias.c>
64 Alias /postfixadmin /usr/share/postfixadmin
65 </IfModule>
66 <DirectoryMatch /usr/share/postfixadmin/>
67 DirectoryIndex index.php
68 Options +FollowSymLinks
69 AllowOverride None
70 Order allow,deny
71 Allow from all
72 </DirectoryMatch>
73 EOT
74 if [ -z "$1" ]; then
75 # Start Web server.
76 /etc/init.d/apache stop
77 /etc/init.d/apache start
78 fi
79 fi
80 fi
81 }