wok view postfixadmin/receipt @ rev 25396
updated vidalia (0.2.21 -> 0.3.1)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Aug 02 10:16:02 2022 +0100 (2022-08-02) |
parents | 92d05037c867 |
children | 0262035dc1e7 |
line source
1 # SliTaz package receipt.
3 PACKAGE="postfixadmin"
4 VERSION="3.2.3"
5 CATEGORY="network"
6 SHORT_DESC="Postfix web administration."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL"
9 WEB_SITE="https://github.com/postfixadmin/postfixadmin"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$WEB_SITE/archive/$TARBALL"
14 DEPENDS="mysql_or_postgresql php php-imap php-mysqli postfix"
16 current_version()
17 {
18 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
19 sed '/archive.*tar/!d;s|.*/postfixadmin-\(.*\).tar.*|\1|;q'
20 }
22 # Rules to gen a SliTaz package suitable for Tazpkg.
23 genpkg_rules()
24 {
25 mkdir -p $fs/usr/share/postfixadmin
26 mkdir -p $fs/etc/postfixadmin
27 mkdir -p $fs/usr/share/doc/postfixadmin
28 mkdir -p $fs/usr/lib/postfixadmin
30 cp -a $src/* $fs/usr/share/postfixadmin/
31 mv $fs/usr/share/postfixadmin/config.inc.php \
32 $fs/etc/postfixadmin
33 ln -s /etc/postfixadmin/config.inc.php \
34 $fs/usr/share/postfixadmin/config.inc.php
35 sed -i 's/false/true/' $fs/etc/postfixadmin/config.inc.php
37 # Remove unwanted files
38 rm -rf $fs/usr/share/postfixadmin/debian
40 # Move documentation
41 mv $fs/usr/share/postfixadmin/*.TXT \
42 $fs/usr/share/doc/postfixadmin
43 mv $fs/usr/share/postfixadmin/DOCUMENTS \
44 $fs/usr/share/doc/postfixadmin
45 mv $fs/usr/share/postfixadmin/ADDITIONS/* \
46 $fs/usr/lib/postfixadmin
47 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/*.pl \
48 $fs/usr/lib/postfixadmin
49 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/ \
50 $fs/usr/share/doc/postfixadmin
52 rm -rf $fs/usr/share/postfixadmin/ADDITIONS
54 # Fix group
55 chown -R root.root $fs/usr/share/postfixadmin/
56 }
58 post_install()
59 {
60 # Configure lighttpd server
61 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
62 then
63 if ! grep -q /usr/share/postfixadmin/ "$1/etc/lighttpd/lighttpd.conf"
64 then
65 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
66 if [ -z "$1" ]
67 then
68 # Start Web server.
69 /etc/init.d/lighttpd stop
70 /etc/init.d/lighttpd start
71 fi
72 fi
73 fi
75 # Configure apache server
76 if [ -f "$1/etc/apache/httpd.conf" ]
77 then
78 if [ ! -f "$1/etc/apache/conf.d/postfixadmin" ]
79 then
80 cat > "$1/etc/apache/conf.d/postfixadmin" <<EOT
81 <IfModule mod_alias.c>
82 Alias /postfixadmin /usr/share/postfixadmin
83 </IfModule>
84 <DirectoryMatch /usr/share/postfixadmin/>
85 DirectoryIndex index.php
86 Options +FollowSymLinks
87 AllowOverride None
88 Order allow,deny
89 Allow from all
90 </DirectoryMatch>
91 EOT
92 if [ -z "$1" ]
93 then
94 # Start Web server.
95 /etc/init.d/apache stop
96 /etc/init.d/apache start
97 fi
98 fi
99 fi
100 }