wok-6.x annotate postfixadmin/receipt @ rev 25414
updated wordpress (5.4.1 -> 6.0.1)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Aug 04 08:44:13 2022 +0100 (2022-08-04) |
parents | 92d05037c867 |
children |
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@24055 | 16 current_version() |
pascal@24055 | 17 { |
pascal@24055 | 18 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \ |
pascal@24055 | 19 sed '/archive.*tar/!d;s|.*/postfixadmin-\(.*\).tar.*|\1|;q' |
pascal@24055 | 20 } |
pascal@24055 | 21 |
pascal@7824 | 22 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@7824 | 23 genpkg_rules() |
pascal@7824 | 24 { |
Hans-G?nter@23442 | 25 mkdir -p $fs/usr/share/postfixadmin |
Hans-G?nter@23442 | 26 mkdir -p $fs/etc/postfixadmin |
Hans-G?nter@23442 | 27 mkdir -p $fs/usr/share/doc/postfixadmin |
Hans-G?nter@23442 | 28 mkdir -p $fs/usr/lib/postfixadmin |
Hans-G?nter@23442 | 29 |
Hans-G?nter@23442 | 30 cp -a $src/* $fs/usr/share/postfixadmin/ |
Hans-G?nter@23442 | 31 mv $fs/usr/share/postfixadmin/config.inc.php \ |
Hans-G?nter@23442 | 32 $fs/etc/postfixadmin |
Hans-G?nter@23442 | 33 ln -s /etc/postfixadmin/config.inc.php \ |
Hans-G?nter@23442 | 34 $fs/usr/share/postfixadmin/config.inc.php |
Hans-G?nter@23442 | 35 sed -i 's/false/true/' $fs/etc/postfixadmin/config.inc.php |
Hans-G?nter@23442 | 36 |
erjo@12150 | 37 # Remove unwanted files |
Hans-G?nter@23442 | 38 rm -rf $fs/usr/share/postfixadmin/debian |
Hans-G?nter@23442 | 39 |
Hans-G?nter@23442 | 40 # Move documentation |
Hans-G?nter@23442 | 41 mv $fs/usr/share/postfixadmin/*.TXT \ |
Hans-G?nter@23442 | 42 $fs/usr/share/doc/postfixadmin |
Hans-G?nter@23442 | 43 mv $fs/usr/share/postfixadmin/DOCUMENTS \ |
Hans-G?nter@23442 | 44 $fs/usr/share/doc/postfixadmin |
Hans-G?nter@23442 | 45 mv $fs/usr/share/postfixadmin/ADDITIONS/* \ |
Hans-G?nter@23442 | 46 $fs/usr/lib/postfixadmin |
Hans-G?nter@23442 | 47 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/*.pl \ |
Hans-G?nter@23442 | 48 $fs/usr/lib/postfixadmin |
Hans-G?nter@23442 | 49 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/ \ |
Hans-G?nter@23442 | 50 $fs/usr/share/doc/postfixadmin |
Hans-G?nter@23442 | 51 |
Hans-G?nter@23442 | 52 rm -rf $fs/usr/share/postfixadmin/ADDITIONS |
Hans-G?nter@23442 | 53 |
erjo@12041 | 54 # Fix group |
Hans-G?nter@23442 | 55 chown -R root.root $fs/usr/share/postfixadmin/ |
pascal@7824 | 56 } |
pascal@7824 | 57 |
pascal@7824 | 58 post_install() |
pascal@7824 | 59 { |
pascal@7824 | 60 # Configure lighttpd server |
Hans-G?nter@23442 | 61 if [ -f "$1/etc/lighttpd/lighttpd.conf" ] |
Hans-G?nter@23442 | 62 then |
Hans-G?nter@23442 | 63 if ! grep -q /usr/share/postfixadmin/ "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23442 | 64 then |
Hans-G?nter@23442 | 65 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 | 66 if [ -z "$1" ] |
Hans-G?nter@23442 | 67 then |
pascal@7824 | 68 # Start Web server. |
pascal@7824 | 69 /etc/init.d/lighttpd stop |
pascal@7824 | 70 /etc/init.d/lighttpd start |
pascal@7824 | 71 fi |
pascal@7824 | 72 fi |
pascal@7824 | 73 fi |
Hans-G?nter@23442 | 74 |
pascal@7824 | 75 # Configure apache server |
Hans-G?nter@23442 | 76 if [ -f "$1/etc/apache/httpd.conf" ] |
Hans-G?nter@23442 | 77 then |
Hans-G?nter@23442 | 78 if [ ! -f "$1/etc/apache/conf.d/postfixadmin" ] |
Hans-G?nter@23442 | 79 then |
pascal@18730 | 80 cat > "$1/etc/apache/conf.d/postfixadmin" <<EOT |
pascal@7824 | 81 <IfModule mod_alias.c> |
pascal@7824 | 82 Alias /postfixadmin /usr/share/postfixadmin |
pascal@7824 | 83 </IfModule> |
pascal@7824 | 84 <DirectoryMatch /usr/share/postfixadmin/> |
pascal@7824 | 85 DirectoryIndex index.php |
pascal@7824 | 86 Options +FollowSymLinks |
pascal@7824 | 87 AllowOverride None |
pascal@7824 | 88 Order allow,deny |
pascal@7824 | 89 Allow from all |
pascal@7824 | 90 </DirectoryMatch> |
pascal@7824 | 91 EOT |
Hans-G?nter@23442 | 92 if [ -z "$1" ] |
Hans-G?nter@23442 | 93 then |
pascal@7824 | 94 # Start Web server. |
pascal@7824 | 95 /etc/init.d/apache stop |
pascal@7824 | 96 /etc/init.d/apache start |
pascal@7824 | 97 fi |
pascal@7824 | 98 fi |
pascal@7824 | 99 fi |
pascal@7824 | 100 } |