wok annotate postfixadmin/receipt @ rev 17744
Up zpaq (7.02)
author | necrophcodr <necrophcodr@necrophcodr.me> |
---|---|
date | Sat Mar 07 18:21:38 2015 +0000 (2015-03-07) |
parents | 06e15f1998a1 |
children | 9e01bc6321ea |
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@15375 | 8 LICENSE="GPL" |
pascal@7824 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@7824 | 10 WEB_SITE="http://postfixadmin.sourceforge.net/" |
pascal@7824 | 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
erjo@12150 | 12 DEPENDS="php php-mysqli php-imap postfix mysql_or_postgresql" |
pascal@7824 | 13 |
pascal@7824 | 14 # Rules to configure and make the package. |
pascal@7824 | 15 compile_rules() |
pascal@7824 | 16 { |
pascal@7824 | 17 cd $src |
pascal@7824 | 18 } |
pascal@7824 | 19 |
pascal@7824 | 20 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@7824 | 21 genpkg_rules() |
pascal@7824 | 22 { |
erjo@12150 | 23 mkdir -p $fs/usr/share/postfixadmin \ |
erjo@12150 | 24 $fs/etc/postfixadmin \ |
erjo@12150 | 25 $fs/usr/share/doc/postfixadmin \ |
erjo@12150 | 26 $fs/usr/lib/postfixadmin |
erjo@12150 | 27 |
pascal@7824 | 28 cp -a $src/* $fs/usr/share/postfixadmin/ |
erjo@12041 | 29 mv $fs/usr/share/postfixadmin/config.inc.php $fs/etc/postfixadmin |
erjo@12041 | 30 ln -s /etc/postfixadmin/config.inc.php $fs/usr/share/postfixadmin/config.inc.php |
erjo@12041 | 31 sed -i 's/false/true/' $fs/etc/postfixadmin/config.inc.php |
erjo@12041 | 32 |
erjo@12150 | 33 # Remove unwanted files |
erjo@12150 | 34 rm -rf $fs/usr/share/postfixadmin/debian |
erjo@12150 | 35 |
erjo@12150 | 36 # Move docs |
erjo@12150 | 37 mv $fs/usr/share/postfixadmin/*.TXT $fs/usr/share/doc/postfixadmin |
erjo@12150 | 38 mv $fs/usr/share/postfixadmin/DOCUMENTS $fs/usr/share/doc/postfixadmin |
erjo@12150 | 39 mv $fs/usr/share/postfixadmin/ADDITIONS/* $fs/usr/lib/postfixadmin |
erjo@12150 | 40 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/*.pl $fs/usr/lib/postfixadmin |
erjo@12150 | 41 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/ $fs/usr/share/doc/postfixadmin |
erjo@12150 | 42 |
erjo@12150 | 43 rm -rf $fs/usr/share/postfixadmin/ADDITIONS |
erjo@12150 | 44 |
erjo@12041 | 45 # Fix group |
erjo@12041 | 46 chown -R root.root $fs/usr/share/postfixadmin/ |
pascal@7824 | 47 } |
pascal@7824 | 48 |
pascal@7824 | 49 post_install() |
pascal@7824 | 50 { |
pascal@7824 | 51 # Configure lighttpd server |
pascal@7824 | 52 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@7824 | 53 if ! grep -q /usr/share/postfixadmin/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@7824 | 54 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 | 55 if [ -z "$1" ]; then |
pascal@7824 | 56 # Start Web server. |
pascal@7824 | 57 /etc/init.d/lighttpd stop |
pascal@7824 | 58 /etc/init.d/lighttpd start |
pascal@7824 | 59 fi |
pascal@7824 | 60 fi |
pascal@7824 | 61 fi |
pascal@7824 | 62 # Configure apache server |
pascal@7824 | 63 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@7824 | 64 if [ ! -f $1/etc/apache/conf.d/postfixadmin ]; then |
pascal@7824 | 65 cat > $1/etc/apache/conf.d/postfixadmin <<EOT |
pascal@7824 | 66 <IfModule mod_alias.c> |
pascal@7824 | 67 Alias /postfixadmin /usr/share/postfixadmin |
pascal@7824 | 68 </IfModule> |
pascal@7824 | 69 <DirectoryMatch /usr/share/postfixadmin/> |
pascal@7824 | 70 DirectoryIndex index.php |
pascal@7824 | 71 Options +FollowSymLinks |
pascal@7824 | 72 AllowOverride None |
pascal@7824 | 73 Order allow,deny |
pascal@7824 | 74 Allow from all |
pascal@7824 | 75 </DirectoryMatch> |
pascal@7824 | 76 EOT |
pascal@7824 | 77 if [ -z "$1" ]; then |
pascal@7824 | 78 # Start Web server. |
pascal@7824 | 79 /etc/init.d/apache stop |
pascal@7824 | 80 /etc/init.d/apache start |
pascal@7824 | 81 fi |
pascal@7824 | 82 fi |
pascal@7824 | 83 fi |
pascal@7824 | 84 } |
erjo@12150 | 85 |
erjo@12150 | 86 |
erjo@12150 | 87 |