wok-next rev 21488

updated apache (2.4.28 -> 2.4.43)
author Hans-G?nter Theisgen
date Thu Jun 18 16:38:11 2020 +0100 (2020-06-18)
parents c792ad04b500
children afe47b296882
files apache/receipt
line diff
     1.1 --- a/apache/receipt	Thu Jun 18 16:12:44 2020 +0100
     1.2 +++ b/apache/receipt	Thu Jun 18 16:38:11 2020 +0100
     1.3 @@ -1,8 +1,9 @@
     1.4  # SliTaz package receipt v2.
     1.5  
     1.6  PACKAGE="apache"
     1.7 -VERSION="2.4.28"
     1.8 +VERSION="2.4.43"
     1.9  CATEGORY="network"
    1.10 +TAGS="webserver http server"
    1.11  SHORT_DESC="Secure, efficient and extensible HTTP server"
    1.12  MAINTAINER="pascal.bellard@slitaz.org"
    1.13  LICENSE="Apache"
    1.14 @@ -11,28 +12,30 @@
    1.15  TARBALL="httpd-$VERSION.tar.bz2"
    1.16  WGET_URL="http://www.apache.org/dist/httpd/$TARBALL"
    1.17  
    1.18 -BUILD_DEPENDS="apr-util-dev apr-dev openssl-dev sed expat-dev zlib-dev \
    1.19 -util-linux-uuid-dev openldap-dev bash pcre-dev"
    1.20 +BUILD_DEPENDS="apr-dev apr-util-dev bash expat-dev openldap-dev 
    1.21 +	openssl-dev pcre-dev sed util-linux-uuid-dev zlib-dev"
    1.22  SPLIT="$PACKAGE-dev $PACKAGE-doc $PACKAGE"
    1.23  
    1.24  COOKOPTS="force-arch" # different configs in dev
    1.25  
    1.26 -compile_rules() {
    1.27 +compile_rules()
    1.28 +{
    1.29  	grep -q Slitaz config.layout || \
    1.30  		cat $stuff/slitaz.layout >> config.layout
    1.31 -	sed -i 's|mkdir |mkdir -p |' build/mkdir.sh
    1.32 +	sed -i 's|mkdir |mkdir -p |' \
    1.33 +		build/mkdir.sh
    1.34  
    1.35 -	./configure \
    1.36 -		--mandir=/usr/share/man \
    1.37 -		--enable-mods-shared=all \
    1.38 -		--enable-proxy \
    1.39 -		--enable-ssl \
    1.40 -		--enable-layout=Slitaz \
    1.41 +	./configure				\
    1.42 +		--mandir=/usr/share/man		\
    1.43 +		--enable-layout=Slitaz		\
    1.44 +		--enable-mods-shared=all	\
    1.45 +		--enable-proxy			\
    1.46 +		--enable-ssl			\
    1.47  		$CONFIGURE_ARGS &&
    1.48  	make $MAKEFLAGS &&
    1.49  	make DESTDIR=$install install || return 1
    1.50  
    1.51 -	install -Dm755 $stuff/apache $install/etc/init.d/apache
    1.52 +	install -Dm755 $stuff/apache	$install/etc/init.d/apache
    1.53  
    1.54  	mkdir -p $install/etc/apache/extra/
    1.55  	cp -a $stuff/fix-range-CVE-2011-3192.conf $install/etc/apache/extra/
    1.56 @@ -59,7 +62,8 @@
    1.57  	chown -R root:root $install
    1.58  }
    1.59  
    1.60 -genpkg_rules() {
    1.61 +genpkg_rules()
    1.62 +{
    1.63  	case $PACKAGE in
    1.64  		apache-dev)
    1.65  			copy @dev apxs /usr/share/apache/build/
    1.66 @@ -75,21 +79,23 @@
    1.67  			CONFIG_FILES="/etc/apache/ /var/www/ /etc/ssl/apache/"
    1.68  			TAZPANEL_DAEMON="edit::/etc/apache/httpd.conf|web::$WEB_SITE"
    1.69  			PROVIDE="lighttpd"
    1.70 -			TAGS="webserver http server"
    1.71  			DEPENDS="apr apr-util libldap libpcre openssl zlib"
    1.72  			;;
    1.73  	esac
    1.74  }
    1.75  
    1.76  # We stop the server by default in case of upgarde.
    1.77 -pre_install_apache() {
    1.78 +pre_install_apache()
    1.79 +{
    1.80  	[ -n "$1" ] ||
    1.81 -	for i in httpd lighttpd ngnix cherokee $PACKAGE; do
    1.82 +	for i in httpd lighttpd ngnix cherokee $PACKAGE
    1.83 +	  do
    1.84  		[ -f /etc/init.d/$i ] && /etc/init.d/$i stop
    1.85 -	done
    1.86 +	  done
    1.87  }
    1.88  
    1.89 -post_install_apache() {
    1.90 +post_install_apache()
    1.91 +{
    1.92  	local lang=$(. $1/etc/locale.conf 2>/dev/null; echo ${LANG#*_})
    1.93  	local tz=$(cat $1/etc/TZ 2>/dev/null)
    1.94  	local hostname=$(cat $1/etc/hostname 2>/dev/null)
    1.95 @@ -100,9 +106,10 @@
    1.96  	ping -c 2 $(hostname) >/dev/null 2>&1 ||
    1.97  		sed -i "s/localhost/$(hostname) localhost/" "$1/etc/hosts"
    1.98  
    1.99 -	sed -i -e "s/^#\(LoadModule.*slotmem_shm.*\)$/\1/" \
   1.100 +	sed -i	-e "s/^#\(LoadModule.*slotmem_shm.*\)$/\1/" \
   1.101  		-e "s/.*ServerName www.example.*/ServerName ${hostname:-slitaz}/" \
   1.102 -		$1/etc/apache/httpd.conf $1/etc/apache/extra/httpd-ssl.conf
   1.103 +		$1/etc/apache/httpd.conf \
   1.104 +		$1/etc/apache/extra/httpd-ssl.conf
   1.105  
   1.106  	grep -qs Apache $1/var/www/index.html &&
   1.107  	sed -i 's|^LighTTPD.*|&\nApache configs      : /etc/apache|' \
   1.108 @@ -122,12 +129,13 @@
   1.109  
   1.110  	[ -z "$quiet" ] && echo # Start new line
   1.111  	( cd "$1/$INSTALLED/"; grep -l /etc/apache/conf.d/ */receipt ) | \
   1.112 -	while read file; do
   1.113 +	while read file
   1.114 +	  do
   1.115  		pkg=$(dirname $file)
   1.116  		[ "$pkg" = "$PACKAGE" ] && continue
   1.117  		[ -z "$quiet" ] && echo "Reconfiguring $pkg for $PACKAGE..."
   1.118  		tazpkg reconfigure $pkg
   1.119 -	done
   1.120 +	  done
   1.121  	[ -f "$1/etc/php.ini" ] && tazpkg get-install php-apache --root="$1"
   1.122  	[ "$1" ] || netstat -ltn 2> /dev/null | grep -q :80 ||
   1.123  	/etc/init.d/$PACKAGE start