wok annotate postfixadmin/receipt @ rev 13372
compiz-ccsm: fix dep - close bug 36
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Sep 14 22:36:12 2012 +0200 (2012-09-14) |
parents | c4e464160942 |
children | 51a1ebbda768 |
rev | line source |
---|---|
pascal@7824 | 1 # SliTaz package receipt. |
pascal@7824 | 2 |
pascal@7824 | 3 PACKAGE="postfixadmin" |
erjo@12041 | 4 VERSION="2.3.5" |
pascal@7824 | 5 CATEGORY="network" |
pascal@7824 | 6 SHORT_DESC="Postfix web administration." |
pascal@7824 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@7824 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@7824 | 9 WEB_SITE="http://postfixadmin.sourceforge.net/" |
pascal@7824 | 10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
erjo@12150 | 11 DEPENDS="php php-mysqli php-imap postfix mysql_or_postgresql" |
pascal@7824 | 12 |
pascal@7824 | 13 # Rules to configure and make the package. |
pascal@7824 | 14 compile_rules() |
pascal@7824 | 15 { |
pascal@7824 | 16 cd $src |
pascal@7824 | 17 } |
pascal@7824 | 18 |
pascal@7824 | 19 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@7824 | 20 genpkg_rules() |
pascal@7824 | 21 { |
erjo@12150 | 22 mkdir -p $fs/usr/share/postfixadmin \ |
erjo@12150 | 23 $fs/etc/postfixadmin \ |
erjo@12150 | 24 $fs/usr/share/doc/postfixadmin \ |
erjo@12150 | 25 $fs/usr/lib/postfixadmin |
erjo@12150 | 26 |
pascal@7824 | 27 cp -a $src/* $fs/usr/share/postfixadmin/ |
erjo@12041 | 28 mv $fs/usr/share/postfixadmin/config.inc.php $fs/etc/postfixadmin |
erjo@12041 | 29 ln -s /etc/postfixadmin/config.inc.php $fs/usr/share/postfixadmin/config.inc.php |
erjo@12041 | 30 sed -i 's/false/true/' $fs/etc/postfixadmin/config.inc.php |
erjo@12041 | 31 |
erjo@12150 | 32 # Remove unwanted files |
erjo@12150 | 33 rm -rf $fs/usr/share/postfixadmin/debian |
erjo@12150 | 34 |
erjo@12150 | 35 # Move docs |
erjo@12150 | 36 mv $fs/usr/share/postfixadmin/*.TXT $fs/usr/share/doc/postfixadmin |
erjo@12150 | 37 mv $fs/usr/share/postfixadmin/DOCUMENTS $fs/usr/share/doc/postfixadmin |
erjo@12150 | 38 mv $fs/usr/share/postfixadmin/ADDITIONS/* $fs/usr/lib/postfixadmin |
erjo@12150 | 39 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/*.pl $fs/usr/lib/postfixadmin |
erjo@12150 | 40 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/ $fs/usr/share/doc/postfixadmin |
erjo@12150 | 41 |
erjo@12150 | 42 rm -rf $fs/usr/share/postfixadmin/ADDITIONS |
erjo@12150 | 43 |
erjo@12041 | 44 # Fix group |
erjo@12041 | 45 chown -R root.root $fs/usr/share/postfixadmin/ |
pascal@7824 | 46 } |
pascal@7824 | 47 |
pascal@7824 | 48 post_install() |
pascal@7824 | 49 { |
pascal@7824 | 50 # Configure lighttpd server |
pascal@7824 | 51 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@7824 | 52 if ! grep -q /usr/share/postfixadmin/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@7824 | 53 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf |
pascal@7824 | 54 if [ -z "$1" ]; then |
pascal@7824 | 55 # Start Web server. |
pascal@7824 | 56 /etc/init.d/lighttpd stop |
pascal@7824 | 57 /etc/init.d/lighttpd start |
pascal@7824 | 58 fi |
pascal@7824 | 59 fi |
pascal@7824 | 60 fi |
pascal@7824 | 61 # Configure apache server |
pascal@7824 | 62 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@7824 | 63 if [ ! -f $1/etc/apache/conf.d/postfixadmin ]; then |
pascal@7824 | 64 cat > $1/etc/apache/conf.d/postfixadmin <<EOT |
pascal@7824 | 65 <IfModule mod_alias.c> |
pascal@7824 | 66 Alias /postfixadmin /usr/share/postfixadmin |
pascal@7824 | 67 </IfModule> |
pascal@7824 | 68 <DirectoryMatch /usr/share/postfixadmin/> |
pascal@7824 | 69 DirectoryIndex index.php |
pascal@7824 | 70 Options +FollowSymLinks |
pascal@7824 | 71 AllowOverride None |
pascal@7824 | 72 Order allow,deny |
pascal@7824 | 73 Allow from all |
pascal@7824 | 74 </DirectoryMatch> |
pascal@7824 | 75 EOT |
pascal@7824 | 76 if [ -z "$1" ]; then |
pascal@7824 | 77 # Start Web server. |
pascal@7824 | 78 /etc/init.d/apache stop |
pascal@7824 | 79 /etc/init.d/apache start |
pascal@7824 | 80 fi |
pascal@7824 | 81 fi |
pascal@7824 | 82 fi |
pascal@7824 | 83 } |
erjo@12150 | 84 |
erjo@12150 | 85 |
erjo@12150 | 86 |