wok-current view postfixadmin/receipt @ rev 12042

postfixadmin: Fis depends:wq!
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Wed Mar 07 17:41:19 2012 +0100 (2012-03-07)
parents 9724eaf37b53
children 06e15f1998a1
line source
1 # SliTaz package receipt.
3 PACKAGE="postfixadmin"
4 VERSION="2.3.5"
5 CATEGORY="network"
6 SHORT_DESC="Postfix web administration."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://postfixadmin.sourceforge.net/"
10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
11 DEPENDS="php php-mysqli postfix mysql_or_postgresql"
13 # Rules to configure and make the package.
14 compile_rules()
15 {
16 cd $src
17 }
19 # Rules to gen a SliTaz package suitable for Tazpkg.
20 genpkg_rules()
21 {
22 mkdir -p $fs/usr/share/postfixadmin $fs/etc/postfixadmin
23 cp -a $src/* $fs/usr/share/postfixadmin/
24 mv $fs/usr/share/postfixadmin/config.inc.php $fs/etc/postfixadmin
25 ln -s /etc/postfixadmin/config.inc.php $fs/usr/share/postfixadmin/config.inc.php
26 sed -i 's/false/true/' $fs/etc/postfixadmin/config.inc.php
28 # Fix group
29 chown -R root.root $fs/usr/share/postfixadmin/
30 }
32 post_install()
33 {
34 # Configure lighttpd server
35 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
36 if ! grep -q /usr/share/postfixadmin/ $1/etc/lighttpd/lighttpd.conf; then
37 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
38 if [ -z "$1" ]; then
39 # Start Web server.
40 /etc/init.d/lighttpd stop
41 /etc/init.d/lighttpd start
42 fi
43 fi
44 fi
45 # Configure apache server
46 if [ -f $1/etc/apache/httpd.conf ]; then
47 if [ ! -f $1/etc/apache/conf.d/postfixadmin ]; then
48 cat > $1/etc/apache/conf.d/postfixadmin <<EOT
49 <IfModule mod_alias.c>
50 Alias /postfixadmin /usr/share/postfixadmin
51 </IfModule>
52 <DirectoryMatch /usr/share/postfixadmin/>
53 DirectoryIndex index.php
54 Options +FollowSymLinks
55 AllowOverride None
56 Order allow,deny
57 Allow from all
58 </DirectoryMatch>
59 EOT
60 if [ -z "$1" ]; then
61 # Start Web server.
62 /etc/init.d/apache stop
63 /etc/init.d/apache start
64 fi
65 fi
66 fi
67 }