wok-current rev 23442

updated postfixadmin (3.2 -> 3.2.3)
author Hans-G?nter Theisgen
date Thu Apr 02 15:18:21 2020 +0100 (2020-04-02)
parents fda8ee7004a1
children 92d05037c867
files postfixadmin/receipt
line diff
     1.1 --- a/postfixadmin/receipt	Thu Apr 02 13:53:28 2020 +0100
     1.2 +++ b/postfixadmin/receipt	Thu Apr 02 15:18:21 2020 +0100
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="postfixadmin"
     1.7 -VERSION="3.2"
     1.8 +VERSION="3.2.3"
     1.9  CATEGORY="network"
    1.10  SHORT_DESC="Postfix web administration."
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
    1.12 @@ -11,53 +11,66 @@
    1.13  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.14  WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    1.15  
    1.16 -DEPENDS="php php-mysqli php-imap postfix mysql_or_postgresql"
    1.17 +DEPENDS="mysql_or_postgresql php php-imap php-mysqli postfix"
    1.18  
    1.19  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.20  genpkg_rules()
    1.21  {
    1.22 -	mkdir -p $fs/usr/share/postfixadmin \
    1.23 -		$fs/etc/postfixadmin \
    1.24 -		$fs/usr/share/doc/postfixadmin \
    1.25 -		$fs/usr/lib/postfixadmin 
    1.26 -		
    1.27 -	cp -a $src/* $fs/usr/share/postfixadmin/
    1.28 -	mv $fs/usr/share/postfixadmin/config.inc.php $fs/etc/postfixadmin
    1.29 -	ln -s /etc/postfixadmin/config.inc.php $fs/usr/share/postfixadmin/config.inc.php
    1.30 -	sed -i 's/false/true/' $fs/etc/postfixadmin/config.inc.php
    1.31 -	
    1.32 +	mkdir -p $fs/usr/share/postfixadmin
    1.33 +	mkdir -p $fs/etc/postfixadmin
    1.34 +	mkdir -p $fs/usr/share/doc/postfixadmin
    1.35 +	mkdir -p $fs/usr/lib/postfixadmin
    1.36 +
    1.37 +	cp -a $src/*		$fs/usr/share/postfixadmin/
    1.38 +	mv $fs/usr/share/postfixadmin/config.inc.php \
    1.39 +				$fs/etc/postfixadmin
    1.40 +	ln -s /etc/postfixadmin/config.inc.php \
    1.41 +				$fs/usr/share/postfixadmin/config.inc.php
    1.42 +	sed -i 's/false/true/'	$fs/etc/postfixadmin/config.inc.php
    1.43 +
    1.44  	# Remove unwanted files
    1.45 -	rm -rf $fs/usr/share/postfixadmin/debian
    1.46 -	
    1.47 -	# Move docs
    1.48 -	mv $fs/usr/share/postfixadmin/*.TXT $fs/usr/share/doc/postfixadmin
    1.49 -	mv $fs/usr/share/postfixadmin/DOCUMENTS $fs/usr/share/doc/postfixadmin
    1.50 -	mv $fs/usr/share/postfixadmin/ADDITIONS/* $fs/usr/lib/postfixadmin
    1.51 -	mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/*.pl $fs/usr/lib/postfixadmin
    1.52 -	mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/ $fs/usr/share/doc/postfixadmin
    1.53 -		
    1.54 -	rm -rf $fs/usr/share/postfixadmin/ADDITIONS
    1.55 -	
    1.56 +	rm -rf			$fs/usr/share/postfixadmin/debian
    1.57 +
    1.58 +	# Move documentation
    1.59 +	mv $fs/usr/share/postfixadmin/*.TXT \
    1.60 +				$fs/usr/share/doc/postfixadmin
    1.61 +	mv $fs/usr/share/postfixadmin/DOCUMENTS \
    1.62 +				$fs/usr/share/doc/postfixadmin
    1.63 +	mv $fs/usr/share/postfixadmin/ADDITIONS/* \
    1.64 +				$fs/usr/lib/postfixadmin
    1.65 +	mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/*.pl \
    1.66 +				$fs/usr/lib/postfixadmin
    1.67 +	mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/ \
    1.68 +				$fs/usr/share/doc/postfixadmin
    1.69 +
    1.70 +	rm -rf			$fs/usr/share/postfixadmin/ADDITIONS
    1.71 +
    1.72  	# Fix group
    1.73 -	chown -R root.root $fs/usr/share/postfixadmin/
    1.74 +	chown -R root.root	$fs/usr/share/postfixadmin/
    1.75  }
    1.76  
    1.77  post_install()
    1.78  {
    1.79  	# Configure lighttpd server
    1.80 -	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
    1.81 -		if ! grep -q /usr/share/postfixadmin/ "$1/etc/lighttpd/lighttpd.conf"; then
    1.82 -	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.83 -			if [ -z "$1" ]; then
    1.84 +	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
    1.85 +	  then
    1.86 +		if ! grep -q /usr/share/postfixadmin/ "$1/etc/lighttpd/lighttpd.conf"
    1.87 +		  then
    1.88 +			sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.89 +			if [ -z "$1" ]
    1.90 +			  then
    1.91  				# Start Web server.
    1.92  				/etc/init.d/lighttpd stop
    1.93  				/etc/init.d/lighttpd start
    1.94  			fi
    1.95  		fi
    1.96  	fi
    1.97 +
    1.98  	# Configure apache server
    1.99 -	if [ -f "$1/etc/apache/httpd.conf" ]; then
   1.100 -		if [ ! -f "$1/etc/apache/conf.d/postfixadmin" ]; then
   1.101 +	if [ -f "$1/etc/apache/httpd.conf" ]
   1.102 +	  then
   1.103 +		if [ ! -f "$1/etc/apache/conf.d/postfixadmin" ]
   1.104 +		  then
   1.105  			cat > "$1/etc/apache/conf.d/postfixadmin" <<EOT
   1.106  <IfModule mod_alias.c>
   1.107      Alias /postfixadmin /usr/share/postfixadmin
   1.108 @@ -70,7 +83,8 @@
   1.109      Allow from all
   1.110  </DirectoryMatch>
   1.111  EOT
   1.112 -			if [ -z "$1" ]; then
   1.113 +			if [ -z "$1" ]
   1.114 +			  then
   1.115  				# Start Web server.
   1.116  				/etc/init.d/apache stop
   1.117  				/etc/init.d/apache start