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

updated mpc (0.33 -> 0.34)
author Hans-G?nter Theisgen
date Wed Apr 13 13:55:09 2022 +0100 (2022-04-13)
parents 3ae2d1f7b186
children b410cca81eae
line source
1 # SliTaz package receipt.
3 PACKAGE="nginx"
4 VERSION="1.19.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="https://nginx.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}download//$TARBALL"
14 PROVIDE="lighttpd"
15 SUGGESTED="php perl 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 --with-mail_ssl_module \
61 --user=80 \
62 --group=80 &&
63 make &&
64 make DESTDIR=$DESTDIR install
65 }
67 # Rules to gen a SliTaz package suitable for Tazpkg.
68 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
69 genpkg_rules()
70 {
71 cp -a $install/* $fs/
72 rm -rf $fs/usr/html
73 cp -a stuff/* $fs
74 sed -i 's/#user nobody;/user www;/' \
75 $fs/etc/nginx/nginx.conf
76 }
78 # Pre and post install commands for Tazpkg.
79 # We stop the server by default in case of upgarde.
80 pre_install()
81 {
82 [ -z "$1" ] &&
83 for i in httpd lighttpd apache cherokee $PACKAGE
84 do
85 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
86 done
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
116 true
117 }