wok view nginx-extras/receipt @ rev 24594

updated getmail (5.14 -> 5.16)
author Hans-G?nter Theisgen
date Tue Mar 01 15:05:47 2022 +0100 (2022-03-01)
parents 2e9639a37ee1
children b410cca81eae
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 # What is the latest version available today?
24 current_version()
25 {
26 wget -O - ${WGET_URL%/*} 2>/dev/null | \
27 sed "/latest/d;/nginx-/!d;/tar/!d;s|.*nginx-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
28 }
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 # 1.16.0 invalid:
34 # --with-http_spdy_module
36 ./configure \
37 --prefix=/usr \
38 --conf-path=/etc/nginx/nginx.conf \
39 --pid-path=/var/run/nginx.pid \
40 --lock-path=/var/lock/nginx.lock \
41 --error-log-path=/var/log/nginx/error.log \
42 --http-log-path=/var/log/nginx/access.log \
43 --http-client-body-temp-path=/var/spool/nginx/body \
44 --http-proxy-temp-path=/var/spool/nginx/proxy \
45 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
46 --with-http_ssl_module \
47 --with-http_realip_module \
48 --with-http_addition_module \
49 --with-http_xslt_module \
50 --with-http_image_filter_module \
51 --with-http_geoip_module \
52 --with-http_sub_module \
53 --with-http_dav_module \
54 --with-http_flv_module \
55 --with-http_mp4_module \
56 --with-http_gunzip_module \
57 --with-http_gzip_static_module \
58 --with-http_auth_request_module \
59 --with-http_random_index_module \
60 --with-http_secure_link_module \
61 --with-http_degradation_module \
62 --with-http_stub_status_module \
63 --with-mail \
64 --with-mail_ssl_module \
65 --with-stream \
66 --with-stream_ssl_module \
67 --with-pcre \
68 --with-pcre-jit \
69 --with-http_perl_module \
70 --user=80 \
71 --group=80 &&
72 make &&
73 make DESTDIR=$DESTDIR install
75 # not yet available - perftools dep lib
76 #--with-google_perftools_module \
77 }
79 # Rules to gen a SliTaz package suitable for Tazpkg.
80 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
81 genpkg_rules()
82 {
83 cp -a $install/* $fs
84 rm -rf $fs/usr/html
85 cp -a stuff/* $fs
86 sed -i 's/#user nobody;/user www;/' \
87 $fs/etc/nginx/nginx.conf
88 }
90 # Pre and post install commands for Tazpkg.
91 # We stop the server by default in case of upgarde.
92 pre_install()
93 {
94 [ -f /etc/init.d/$PACKAGE ] &&
95 /etc/init.d/$PACKAGE stop
97 # Backup configuration file.
98 if [ -d "$1/$CONFIG_FILES" ]
99 then
100 cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"
101 fi
102 }
104 post_install()
105 {
106 mkdir -p /var/spool/nginx
108 # Restore original configuration.
109 if [ -d "$1/$CONFIG_FILES.bak" ]
110 then
111 rm -rf "$1/$CONFIG_FILES"
112 mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES"
113 fi
115 # Just in case.
116 chown www.www "$1/var/log/$PACKAGE"
117 if [ -z "$1" ]
118 then
119 for i in apache lighttpd
120 do
121 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
122 done
123 /etc/init.d/$PACKAGE start
124 fi
126 :
127 }