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