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