wok-6.x view nginx/receipt @ rev 25176

updated python-formalchemy (1.5.5 -> 1.5.6)
author Hans-G?nter Theisgen
date Fri Jul 01 17:52:21 2022 +0100 (2022-07-01)
parents 83b97236db32
children
line source
1 # SliTaz package receipt.
3 PACKAGE="nginx"
4 VERSION="1.21.6"
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="https://nginx.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}download//$TARBALL"
14 PROVIDE="lighttpd"
15 SUGGESTED="perl php python"
16 DEPENDS="openssl pcre zlib"
17 BUILD_DEPENDS="openssl-dev pcre-dev zlib-dev"
19 CONFIG_FILES="/etc/nginx"
21 # What is the latest version available today?
22 current_version()
23 {
24 wget -O - ${WGET_URL%/*} 2>/dev/null | \
25 sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
26 }
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 # --with-rtsig_module enable rtsig module
32 # --with-select_module enable select module
33 # --with-poll_module enable poll module
34 # --with-ipv6 enable ipv6 support
35 # --with-http_realip_module enable ngx_http_realip_module
36 # --with-http_addition_module enable ngx_http_addition_module
37 # --with-http_xslt_module enable ngx_http_xslt_module
38 # --with-http_image_filter_module enable ngx_http_image_filter_module
39 # --with-http_geoip_module enable ngx_http_geoip_module
40 # --with-http_sub_module enable ngx_http_sub_module
41 # --with-http_random_index_module enable ngx_http_random_index_module
42 # --with-http_secure_link_module enable ngx_http_secure_link_module
43 # --with-http_perl_module enable ngx_http_perl_module
44 # --with-google_perftools_module enable ngx_google_perftools_module
46 ./configure \
47 --prefix=/usr \
48 --conf-path=/etc/nginx/nginx.conf \
49 --pid-path=/var/run/nginx.pid \
50 --lock-path=/var/lock/nginx.lock \
51 --error-log-path=/var/log/nginx/error.log \
52 --http-log-path=/var/log/nginx/access.log \
53 --http-client-body-temp-path=/var/spool/nginx/body \
54 --http-proxy-temp-path=/var/spool/nginx/proxy \
55 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
56 --with-http_stub_status_module \
57 --with-http_flv_module \
58 --with-http_ssl_module \
59 --with-http_dav_module \
60 --with-mail \
61 --with-mail_ssl_module \
62 --user=80 \
63 --group=80 &&
64 make &&
65 make install DESTDIR=$DESTDIR
66 }
68 # Rules to gen a SliTaz package suitable for Tazpkg.
69 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
70 genpkg_rules()
71 {
72 cp -a $install/* $fs
73 rm -rf $fs/usr/html
74 cp -a stuff/* $fs
75 sed -i 's/#user nobody;/user www;/' \
76 $fs/etc/nginx/nginx.conf
77 }
79 # Pre and post install commands for Tazpkg.
80 # We stop the server by default in case of upgarde.
81 pre_install()
82 {
83 [ -z "$1" ] &&
84 for i in httpd lighttpd apache cherokee $PACKAGE
85 do
86 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
87 done
89 # Backup configuration file.
90 if [ -d "$1/$CONFIG_FILES" ]
91 then
92 cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"
93 fi
94 }
96 post_install()
97 {
98 mkdir -p /var/spool/nginx
100 # Restore original configuration.
101 if [ -d "$1/$CONFIG_FILES.bak" ]
102 then
103 rm -rf "$1/$CONFIG_FILES"
104 mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES"
105 fi
107 # Just in case.
108 chown www.www "$1/var/log/$PACKAGE"
109 if [ -z "$1" ]
110 then
111 for i in apache lighttpd
112 do
113 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
114 done
115 /etc/init.d/$PACKAGE start
116 fi
117 true
118 }