wok view nginx-extras/receipt @ rev 23773

Up firmware (20200515)
author Richard Dunbar <mojo@slitaz.org>
date Fri May 15 20:47:12 2020 -0400 (2020-05-15)
parents d25a28bf6b6c
children 83b97236db32
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 # 1.16.0 invalid:
27 # --with-http_spdy_module
29 ./configure \
30 --prefix=/usr \
31 --conf-path=/etc/nginx/nginx.conf \
32 --pid-path=/var/run/nginx.pid \
33 --lock-path=/var/lock/nginx.lock \
34 --error-log-path=/var/log/nginx/error.log \
35 --http-log-path=/var/log/nginx/access.log \
36 --http-client-body-temp-path=/var/spool/nginx/body \
37 --http-proxy-temp-path=/var/spool/nginx/proxy \
38 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
39 --with-http_ssl_module \
40 --with-http_realip_module \
41 --with-http_addition_module \
42 --with-http_xslt_module \
43 --with-http_image_filter_module \
44 --with-http_geoip_module \
45 --with-http_sub_module \
46 --with-http_dav_module \
47 --with-http_flv_module \
48 --with-http_mp4_module \
49 --with-http_gunzip_module \
50 --with-http_gzip_static_module \
51 --with-http_auth_request_module \
52 --with-http_random_index_module \
53 --with-http_secure_link_module \
54 --with-http_degradation_module \
55 --with-http_stub_status_module \
56 --with-mail \
57 --with-mail_ssl_module \
58 --with-stream \
59 --with-stream_ssl_module \
60 --with-pcre \
61 --with-pcre-jit \
62 --with-http_perl_module \
63 --user=80 \
64 --group=80 &&
65 make &&
66 make DESTDIR=$DESTDIR install
68 # not yet available - perftools dep lib
69 #--with-google_perftools_module \
70 }
72 # Rules to gen a SliTaz package suitable for Tazpkg.
73 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
74 genpkg_rules()
75 {
76 cp -a $install/* $fs
77 rm -rf $fs/usr/html
78 cp -a stuff/* $fs
79 sed -i 's/#user nobody;/user www;/' \
80 $fs/etc/nginx/nginx.conf
81 }
83 # Pre and post install commands for Tazpkg.
84 # We stop the server by default in case of upgarde.
85 pre_install()
86 {
87 [ -f /etc/init.d/$PACKAGE ] &&
88 /etc/init.d/$PACKAGE stop
90 # Backup configuration file.
91 if [ -d "$1/$CONFIG_FILES" ]
92 then
93 cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"
94 fi
95 }
97 post_install()
98 {
99 mkdir -p /var/spool/nginx
101 # Restore original configuration.
102 if [ -d "$1/$CONFIG_FILES.bak" ]
103 then
104 rm -rf "$1/$CONFIG_FILES"
105 mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES"
106 fi
108 # Just in case.
109 chown www.www "$1/var/log/$PACKAGE"
110 if [ -z "$1" ]
111 then
112 for i in apache lighttpd
113 do
114 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
115 done
116 /etc/init.d/$PACKAGE start
117 fi
119 :
120 }