wok-next rev 20716

Up nginx (1.14.0)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun May 27 14:40:56 2018 +0300 (2018-05-27)
parents a8db78a48611
children 5d10d266ccef
files nginx-extras/receipt nginx-extras/stuff/etc/init.d/nginx nginx/receipt nginx/stuff/etc/init.d/nginx nginx/stuff/nginx
line diff
     1.1 --- a/nginx-extras/receipt	Sun May 27 13:10:46 2018 +0300
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,108 +0,0 @@
     1.4 -# SliTaz package receipt.
     1.5 -
     1.6 -PACKAGE="nginx-extras"
     1.7 -VERSION="1.9.4"
     1.8 -CATEGORY="network"
     1.9 -SHORT_DESC="Asynchronous HTTP server designed for heavy loads + mail proxy."
    1.10 -MAINTAINER="pascal.bellard@slitaz.org"
    1.11 -LICENSE="BSD"
    1.12 -SUGGESTED="php perl python"
    1.13 -TARBALL="nginx-$VERSION.tar.gz"
    1.14 -WEB_SITE="http://nginx.org/"
    1.15 -WGET_URL="${WEB_SITE}download//$TARBALL"
    1.16 -PROVIDE="lighttpd"
    1.17 -CONFIG_FILES="/etc/nginx"
    1.18 -CONFLICT="nginx"
    1.19 -
    1.20 -DEPENDS="pcre openssl zlib libgd geoip libxslt"
    1.21 -BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev libgd-dev geoip-dev libxslt-dev \
    1.22 -perl-dev"
    1.23 -
    1.24 -# Rules to configure and make the package.
    1.25 -compile_rules()
    1.26 -{
    1.27 -	./configure \
    1.28 -		--prefix=/usr \
    1.29 -		--conf-path=/etc/nginx/nginx.conf \
    1.30 -		--pid-path=/var/run/nginx.pid \
    1.31 -		--lock-path=/var/lock/nginx.lock \
    1.32 -		--error-log-path=/var/log/nginx/error.log \
    1.33 -		--http-log-path=/var/log/nginx/access.log \
    1.34 -		--http-client-body-temp-path=/var/spool/nginx/body \
    1.35 -		--http-proxy-temp-path=/var/spool/nginx/proxy \
    1.36 -		--http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
    1.37 -		--with-http_ssl_module \
    1.38 -		--with-http_spdy_module \
    1.39 -		--with-http_realip_module \
    1.40 -		--with-http_addition_module \
    1.41 -		--with-http_xslt_module \
    1.42 -		--with-http_image_filter_module \
    1.43 -		--with-http_geoip_module \
    1.44 -		--with-http_sub_module \
    1.45 -		--with-http_dav_module \
    1.46 -		--with-http_flv_module \
    1.47 -		--with-http_mp4_module \
    1.48 -		--with-http_gunzip_module \
    1.49 -		--with-http_gzip_static_module \
    1.50 -		--with-http_auth_request_module \
    1.51 -		--with-http_random_index_module \
    1.52 -		--with-http_secure_link_module \
    1.53 -		--with-http_degradation_module \
    1.54 -		--with-http_stub_status_module \
    1.55 -		--with-mail \
    1.56 -		--with-mail_ssl_module \
    1.57 -		--with-stream \
    1.58 -		--with-stream_ssl_module \
    1.59 -		--with-pcre \
    1.60 -		--with-pcre-jit \
    1.61 -		--with-http_perl_module \
    1.62 -		--user=80 --group=80 &&
    1.63 -	make &&
    1.64 -	make DESTDIR=$DESTDIR install
    1.65 -
    1.66 -	# not yet available - perftools dep lib
    1.67 -	#--with-google_perftools_module \
    1.68 -}
    1.69 -
    1.70 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.71 -# On SliTaz Lighttpd runs as user/group : www/www or 80/80.
    1.72 -genpkg_rules()
    1.73 -{
    1.74 -	cp -a $install/* $fs/
    1.75 -	rm -rf $fs/usr/html
    1.76 -	cp -a stuff/* $fs
    1.77 -	sed -i 's/#user  nobody;/user  www;/' $fs/etc/nginx/nginx.conf
    1.78 -}
    1.79 -
    1.80 -# Pre and post install commands for Tazpkg.
    1.81 -# We stop the server by default in case of upgarde.
    1.82 -pre_install()
    1.83 -{
    1.84 -	[ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
    1.85 -	# Backup config file.
    1.86 -	if [ -d "$1/$CONFIG_FILES" ]; then
    1.87 -		cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"
    1.88 -	fi
    1.89 -}
    1.90 -
    1.91 -post_install()
    1.92 -{
    1.93 -	mkdir -p /var/spool/nginx
    1.94 -
    1.95 -	# Restore original config.
    1.96 -	if [ -d "$1/$CONFIG_FILES.bak" ]; then
    1.97 -		rm -rf "$1/$CONFIG_FILES"
    1.98 -		mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES"
    1.99 -	fi
   1.100 -
   1.101 -	# Just in case.
   1.102 -	chown www.www "$1/var/log/$PACKAGE"
   1.103 -	if [ -z "$1" ]; then
   1.104 -		for i in apache lighttpd; do
   1.105 -			[ -f /etc/init.d/$i ] && /etc/init.d/$i stop
   1.106 -		done
   1.107 -		/etc/init.d/$PACKAGE start
   1.108 -	fi
   1.109 -
   1.110 -	:
   1.111 -}
     2.1 --- a/nginx-extras/stuff/etc/init.d/nginx	Sun May 27 13:10:46 2018 +0300
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,54 +0,0 @@
     2.4 -#!/bin/sh
     2.5 -# /etc/init.d/nginx: Start, stop and restart web server on SliTaz,
     2.6 -# at boot time or with the command line. Daemons options are configured
     2.7 -# with /etc/daemons.conf
     2.8 -#
     2.9 -. /etc/init.d/rc.functions
    2.10 -. /etc/daemons.conf
    2.11 -
    2.12 -NAME=Nginx
    2.13 -DESC="$(_ 'web server')"
    2.14 -DAEMON=/usr/sbin/nginx
    2.15 -OPTIONS=$NGINX_OPTIONS
    2.16 -PIDFILE=/var/run/nginx.pid
    2.17 -
    2.18 -case "$1" in
    2.19 -  start)
    2.20 -    if active_pidfile $PIDFILE nginx ; then
    2.21 -      _ '%s is already running.' $NAME
    2.22 -      exit 1
    2.23 -    fi
    2.24 -    action 'Starting %s: %s...' "$DESC" $NAME
    2.25 -    $DAEMON $OPTIONS
    2.26 -    status
    2.27 -    ;;
    2.28 -  stop)
    2.29 -    if ! active_pidfile $PIDFILE nginx ; then
    2.30 -      _ '%s is not running.' $NAME
    2.31 -      exit 1
    2.32 -    fi
    2.33 -    action 'Stopping %s: %s...' "$DESC" $NAME
    2.34 -    kill $(cat $PIDFILE)
    2.35 -    rm $PIDFILE
    2.36 -    status
    2.37 -    ;;
    2.38 -  restart)
    2.39 -    if ! active_pidfile $PIDFILE nginx ; then
    2.40 -      _ '%s is not running.' $NAME
    2.41 -      exit 1
    2.42 -    fi
    2.43 -    action 'Restarting %s: %s...' "$DESC" $NAME
    2.44 -    kill $(cat $PIDFILE)
    2.45 -    rm $PIDFILE
    2.46 -    sleep 2
    2.47 -    $DAEMON $OPTIONS
    2.48 -    status
    2.49 -    ;;
    2.50 -  *)
    2.51 -    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    2.52 -    newline
    2.53 -    exit 1
    2.54 -    ;;
    2.55 -esac
    2.56 -
    2.57 -exit 0
     3.1 --- a/nginx/receipt	Sun May 27 13:10:46 2018 +0300
     3.2 +++ b/nginx/receipt	Sun May 27 14:40:56 2018 +0300
     3.3 @@ -1,40 +1,56 @@
     3.4 -# SliTaz package receipt.
     3.5 +# SliTaz package receipt v2.
     3.6  
     3.7  PACKAGE="nginx"
     3.8 -VERSION="1.9.4"
     3.9 +VERSION="1.14.0"
    3.10  CATEGORY="network"
    3.11 -SHORT_DESC="Asynchronous HTTP server designed for heavy loads + mail proxy."
    3.12 +SHORT_DESC="Asynchronous HTTP server designed for heavy loads + mail proxy"
    3.13  MAINTAINER="pascal.bellard@slitaz.org"
    3.14  LICENSE="BSD"
    3.15 -SUGGESTED="php perl python"
    3.16 +WEB_SITE="https://nginx.org/"
    3.17 +
    3.18  TARBALL="$PACKAGE-$VERSION.tar.gz"
    3.19 -WEB_SITE="http://nginx.org/"
    3.20 -WGET_URL="${WEB_SITE}download//$TARBALL"
    3.21 -PROVIDE="lighttpd"
    3.22 -CONFIG_FILES="/etc/nginx"
    3.23 +WGET_URL="https://nginx.org/download/$TARBALL"
    3.24  
    3.25 -DEPENDS="pcre openssl zlib"
    3.26 -BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev"
    3.27 +BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev libgd-dev geoip-dev libxslt-dev \
    3.28 +perl-dev"
    3.29 +SPLIT="nginx-extras:extras"
    3.30  
    3.31 -# Rules to configure and make the package.
    3.32 -compile_rules()
    3.33 -{
    3.34 -#  --with-rtsig_module                enable rtsig module
    3.35 -#  --with-select_module               enable select module
    3.36 -#  --with-poll_module                 enable poll module
    3.37 -#  --with-ipv6                        enable ipv6 support
    3.38 -#  --with-http_realip_module          enable ngx_http_realip_module
    3.39 -#  --with-http_addition_module        enable ngx_http_addition_module
    3.40 -#  --with-http_xslt_module            enable ngx_http_xslt_module
    3.41 -#  --with-http_image_filter_module    enable ngx_http_image_filter_module
    3.42 -#  --with-http_geoip_module           enable ngx_http_geoip_module
    3.43 -#  --with-http_sub_module             enable ngx_http_sub_module
    3.44 -#  --with-http_random_index_module    enable ngx_http_random_index_module
    3.45 -#  --with-http_secure_link_module     enable ngx_http_secure_link_module
    3.46 -#  --with-http_perl_module            enable ngx_http_perl_module
    3.47 -#  --with-google_perftools_module     enable ngx_google_perftools_module
    3.48 +compile_rules() {
    3.49 +	case $SET in
    3.50 +		'') SET_ARGS="";;
    3.51 +		extras)
    3.52 +			SET_ARGS="\
    3.53 +				--with-http_ssl_module \
    3.54 +				--with-http_v2_module \
    3.55 +				--with-http_realip_module \
    3.56 +				--with-http_addition_module \
    3.57 +				--with-http_xslt_module \
    3.58 +				--with-http_image_filter_module \
    3.59 +				--with-http_geoip_module \
    3.60 +				--with-http_sub_module \
    3.61 +				--with-http_mp4_module \
    3.62 +				--with-http_gunzip_module \
    3.63 +				--with-http_gzip_static_module \
    3.64 +				--with-http_auth_request_module \
    3.65 +				--with-http_random_index_module \
    3.66 +				--with-http_secure_link_module \
    3.67 +				--with-http_degradation_module \
    3.68 +				--with-http_slice_module \
    3.69 +				--with-http_stub_status_module \
    3.70 +				--with-stream \
    3.71 +				--with-stream_ssl_module \
    3.72 +				--with-stream_realip_module \
    3.73 +				--with-stream_geoip_module \
    3.74 +				--with-stream_ssl_preread_module \
    3.75 +				--with-pcre \
    3.76 +				--with-pcre-jit \
    3.77 +				--with-http_perl_module \
    3.78 +				"
    3.79 +			;;
    3.80 +	esac
    3.81  
    3.82 -	./configure --prefix=/usr \
    3.83 +	./configure \
    3.84 +		--prefix=/usr \
    3.85  		--conf-path=/etc/nginx/nginx.conf \
    3.86  		--pid-path=/var/run/nginx.pid \
    3.87  		--lock-path=/var/lock/nginx.lock \
    3.88 @@ -43,54 +59,65 @@
    3.89  		--http-client-body-temp-path=/var/spool/nginx/body \
    3.90  		--http-proxy-temp-path=/var/spool/nginx/proxy \
    3.91  		--http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
    3.92 +		--user=80 \
    3.93 +		--group=80 \
    3.94 +		\
    3.95  		--with-http_stub_status_module \
    3.96  		--with-http_flv_module \
    3.97  		--with-http_ssl_module \
    3.98  		--with-http_dav_module \
    3.99 -		--with-mail --with-mail_ssl_module \
   3.100 -		--user=80 --group=80 &&
   3.101 +		--with-mail \
   3.102 +		--with-mail_ssl_module \
   3.103 +		$SET_ARGS &&
   3.104  	make &&
   3.105 -	make DESTDIR=$DESTDIR install
   3.106 +	make install || return 1
   3.107 +
   3.108 +	sed -i 's/#user  nobody;/user  www;/' $install/etc/nginx/nginx.conf
   3.109 +	install -Dm755 $stuff/nginx $install/etc/init.d/nginx
   3.110  }
   3.111  
   3.112 -# Rules to gen a SliTaz package suitable for Tazpkg.
   3.113 -# On SliTaz Lighttpd runs as user/group : www/www or 80/80.
   3.114 -genpkg_rules()
   3.115 -{
   3.116 -	cp -a $install/* $fs/
   3.117 -	rm -rf $fs/usr/html
   3.118 -	cp -a stuff/* $fs
   3.119 -	sed -i 's/#user  nobody;/user  www;/' $fs/etc/nginx/nginx.conf
   3.120 +genpkg_rules() {
   3.121 +	copy @std
   3.122 +	CONFIG_FILES="/etc/nginx/"
   3.123 +	SUGGESTED="php perl python"
   3.124 +	case $PACKAGE in
   3.125 +		nginx)
   3.126 +			DEPENDS="libpcre openssl zlib"
   3.127 +			PROVIDE="lighttpd"
   3.128 +			;;
   3.129 +		nginx-extras)
   3.130 +			CAT="network|with extra modules"
   3.131 +			DEPENDS="geoip libgd libpcre libxml2 libxslt openssl perl-core zlib"
   3.132 +			PROVIDE="lighttpd nginx"
   3.133 +			;;
   3.134 +	esac
   3.135  }
   3.136  
   3.137 -# Pre and post install commands for Tazpkg.
   3.138 -# We stop the server by default in case of upgarde.
   3.139 -pre_install()
   3.140 -{
   3.141 -	[ -z "$1" ] && for i in httpd lighttpd apache cherokee $PACKAGE ; do
   3.142 -		[ -f /etc/init.d/$i ] && /etc/init.d/$i stop
   3.143 -	done
   3.144 -	# Backup config file.
   3.145 -	if [ -d "$1/$CONFIG_FILES" ]; then
   3.146 -		cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"
   3.147 +# We stop the server by default in case of upgarde
   3.148 +pre_install() {
   3.149 +	[ -z "$1" -a -f /etc/init.d/nginx ] && /etc/init.d/nginx stop
   3.150 +	# Backup config file
   3.151 +	if [ -d   "$1/etc/nginx" ]; then
   3.152 +		cp -a "$1/etc/nginx" "$1/etc/nginx.bak"
   3.153  	fi
   3.154  }
   3.155  
   3.156 -post_install()
   3.157 -{
   3.158 -	mkdir -p /var/spool/nginx
   3.159 -	# Restore original config.
   3.160 -	if [ -d "$1/$CONFIG_FILES.bak" ]; then
   3.161 -		rm -rf "$1/$CONFIG_FILES"
   3.162 -		mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES"
   3.163 +post_install() {
   3.164 +	mkdir -p "$1/var/spool/nginx"
   3.165 +
   3.166 +	# Restore original config
   3.167 +	if [ -d    "$1/etc/nginx.bak" ]; then
   3.168 +		rm -rf "$1/etc/nginx"
   3.169 +		mv     "$1/etc/nginx.bak" "$1/etc/nginx"
   3.170  	fi
   3.171 -	# Just in case.
   3.172 -	chown www.www "$1/var/log/$PACKAGE"
   3.173 +
   3.174 +	# Just in case
   3.175 +	chown www.www "$1/var/log/nginx/"
   3.176 +
   3.177  	if [ -z "$1" ]; then
   3.178 -		for i in apache lighttpd ; do
   3.179 +		for i in apache lighttpd; do
   3.180  			[ -f /etc/init.d/$i ] && /etc/init.d/$i stop
   3.181  		done
   3.182 -		/etc/init.d/$PACKAGE start
   3.183 +		/etc/init.d/nginx start
   3.184  	fi
   3.185 -	true
   3.186  }
     4.1 --- a/nginx/stuff/etc/init.d/nginx	Sun May 27 13:10:46 2018 +0300
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,54 +0,0 @@
     4.4 -#!/bin/sh
     4.5 -# /etc/init.d/nginx: Start, stop and restart web server on SliTaz,
     4.6 -# at boot time or with the command line. Daemons options are configured
     4.7 -# with /etc/daemons.conf
     4.8 -#
     4.9 -. /etc/init.d/rc.functions
    4.10 -. /etc/daemons.conf
    4.11 -
    4.12 -NAME=Nginx
    4.13 -DESC="$(_ 'web server')"
    4.14 -DAEMON=/usr/sbin/nginx
    4.15 -OPTIONS=$NGINX_OPTIONS
    4.16 -PIDFILE=/var/run/nginx.pid
    4.17 -
    4.18 -case "$1" in
    4.19 -  start)
    4.20 -    if active_pidfile $PIDFILE nginx ; then
    4.21 -      _ '%s is already running.' $NAME
    4.22 -      exit 1
    4.23 -    fi
    4.24 -    action 'Starting %s: %s...' "$DESC" $NAME
    4.25 -    $DAEMON $OPTIONS
    4.26 -    status
    4.27 -    ;;
    4.28 -  stop)
    4.29 -    if ! active_pidfile $PIDFILE nginx ; then
    4.30 -      _ '%s is not running.' $NAME
    4.31 -      exit 1
    4.32 -    fi
    4.33 -    action 'Stopping %s: %s...' "$DESC" $NAME
    4.34 -    kill $(cat $PIDFILE)
    4.35 -    rm $PIDFILE
    4.36 -    status
    4.37 -    ;;
    4.38 -  restart)
    4.39 -    if ! active_pidfile $PIDFILE nginx ; then
    4.40 -      _ '%s is not running.' $NAME
    4.41 -      exit 1
    4.42 -    fi
    4.43 -    action 'Restarting %s: %s...' "$DESC" $NAME
    4.44 -    kill $(cat $PIDFILE)
    4.45 -    rm $PIDFILE
    4.46 -    sleep 2
    4.47 -    $DAEMON $OPTIONS
    4.48 -    status
    4.49 -    ;;
    4.50 -  *)
    4.51 -    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    4.52 -    newline
    4.53 -    exit 1
    4.54 -    ;;
    4.55 -esac
    4.56 -
    4.57 -exit 0
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/nginx/stuff/nginx	Sun May 27 14:40:56 2018 +0300
     5.3 @@ -0,0 +1,54 @@
     5.4 +#!/bin/sh
     5.5 +# /etc/init.d/nginx: Start, stop and restart web server on SliTaz,
     5.6 +# at boot time or with the command line. Daemons options are configured
     5.7 +# with /etc/daemons.conf
     5.8 +#
     5.9 +. /etc/init.d/rc.functions
    5.10 +. /etc/daemons.conf
    5.11 +
    5.12 +NAME=Nginx
    5.13 +DESC="$(_ 'web server')"
    5.14 +DAEMON=/usr/sbin/nginx
    5.15 +OPTIONS=$NGINX_OPTIONS
    5.16 +PIDFILE=/var/run/nginx.pid
    5.17 +
    5.18 +case "$1" in
    5.19 +  start)
    5.20 +    if active_pidfile $PIDFILE nginx ; then
    5.21 +      _ '%s is already running.' $NAME
    5.22 +      exit 1
    5.23 +    fi
    5.24 +    action 'Starting %s: %s...' "$DESC" $NAME
    5.25 +    $DAEMON $OPTIONS
    5.26 +    status
    5.27 +    ;;
    5.28 +  stop)
    5.29 +    if ! active_pidfile $PIDFILE nginx ; then
    5.30 +      _ '%s is not running.' $NAME
    5.31 +      exit 1
    5.32 +    fi
    5.33 +    action 'Stopping %s: %s...' "$DESC" $NAME
    5.34 +    kill $(cat $PIDFILE)
    5.35 +    rm $PIDFILE
    5.36 +    status
    5.37 +    ;;
    5.38 +  restart)
    5.39 +    if ! active_pidfile $PIDFILE nginx ; then
    5.40 +      _ '%s is not running.' $NAME
    5.41 +      exit 1
    5.42 +    fi
    5.43 +    action 'Restarting %s: %s...' "$DESC" $NAME
    5.44 +    kill $(cat $PIDFILE)
    5.45 +    rm $PIDFILE
    5.46 +    sleep 2
    5.47 +    $DAEMON $OPTIONS
    5.48 +    status
    5.49 +    ;;
    5.50 +  *)
    5.51 +    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    5.52 +    newline
    5.53 +    exit 1
    5.54 +    ;;
    5.55 +esac
    5.56 +
    5.57 +exit 0