wok-current view nginx-extras/receipt @ rev 23237

updated nginx and nginx-extras (1.9.4 -> 1.16.0)
author Hans-G?nter Theisgen
date Wed Mar 25 08:10:44 2020 +0100 (2020-03-25)
parents c83afd3687bf
children 2e9639a37ee1
line source
1 # SliTaz package receipt.
3 PACKAGE="nginx-extras"
4 VERSION="1.16.0"
5 CATEGORY="network"
6 SHORT_DESC="Asynchronous HTTP server designed for heavy loads and mail proxy."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="http://nginx.org/"
11 TARBALL="nginx-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}download//$TARBALL"
14 PROVIDE="lighttpd"
15 CONFLICT="nginx"
16 SUGGESTED="php perl python"
17 DEPENDS="geoip libgd libxslt openssl pcre zlib"
18 BUILD_DEPENDS="geoip-dev libgd-dev libxslt-dev openssl-dev pcre-dev
19 tiff zlib-dev"
21 CONFIG_FILES="/etc/nginx"
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 ./configure \
27 --prefix=/usr \
28 --conf-path=/etc/nginx/nginx.conf \
29 --pid-path=/var/run/nginx.pid \
30 --lock-path=/var/lock/nginx.lock \
31 --error-log-path=/var/log/nginx/error.log \
32 --http-log-path=/var/log/nginx/access.log \
33 --http-client-body-temp-path=/var/spool/nginx/body \
34 --http-proxy-temp-path=/var/spool/nginx/proxy \
35 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
36 --with-http_ssl_module \
37 --with-http_spdy_module \
38 --with-http_realip_module \
39 --with-http_addition_module \
40 --with-http_xslt_module \
41 --with-http_image_filter_module \
42 --with-http_geoip_module \
43 --with-http_sub_module \
44 --with-http_dav_module \
45 --with-http_flv_module \
46 --with-http_mp4_module \
47 --with-http_gunzip_module \
48 --with-http_gzip_static_module \
49 --with-http_auth_request_module \
50 --with-http_random_index_module \
51 --with-http_secure_link_module \
52 --with-http_degradation_module \
53 --with-http_stub_status_module \
54 --with-mail \
55 --with-mail_ssl_module \
56 --with-stream \
57 --with-stream_ssl_module \
58 --with-pcre \
59 --with-pcre-jit \
60 --with-http_perl_module \
61 --user=80 \
62 --group=80 &&
63 make &&
64 make DESTDIR=$DESTDIR install
66 # not yet available - perftools dep lib
67 #--with-google_perftools_module \
68 }
70 # Rules to gen a SliTaz package suitable for Tazpkg.
71 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
72 genpkg_rules()
73 {
74 cp -a $install/* $fs
75 rm -rf $fs/usr/html
76 cp -a stuff/* $fs
77 sed -i 's/#user nobody;/user www;/' \
78 $fs/etc/nginx/nginx.conf
79 }
81 # Pre and post install commands for Tazpkg.
82 # We stop the server by default in case of upgarde.
83 pre_install()
84 {
85 [ -f /etc/init.d/$PACKAGE ] &&
86 /etc/init.d/$PACKAGE stop
88 # Backup configuration file.
89 if [ -d "$1/$CONFIG_FILES" ]
90 then
91 cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"
92 fi
93 }
95 post_install()
96 {
97 mkdir -p /var/spool/nginx
99 # Restore original configuration.
100 if [ -d "$1/$CONFIG_FILES.bak" ]
101 then
102 rm -rf "$1/$CONFIG_FILES"
103 mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES"
104 fi
106 # Just in case.
107 chown www.www "$1/var/log/$PACKAGE"
108 if [ -z "$1" ]
109 then
110 for i in apache lighttpd
111 do
112 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
113 done
114 /etc/init.d/$PACKAGE start
115 fi
117 :
118 }