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

Use gcc49 to build mysql
author Stanislas Leduc <shann@slitaz.org>
date Fri Sep 01 20:31:42 2023 +0000 (16 months ago)
parents 83b97236db32
children
line source
1 # SliTaz package receipt.
3 PACKAGE="nginx-extras"
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 SOURCE="nginx"
12 TARBALL="$SOURCE-$VERSION.tar.gz"
13 WGET_URL="${WEB_SITE}download//$TARBALL"
15 PROVIDE="lighttpd"
16 CONFLICT="nginx"
18 SUGGESTED="php python"
19 DEPENDS="geoip libgd libxslt openssl pcre perl zlib"
20 BUILD_DEPENDS="geoip-dev libgd-dev libxslt-dev openssl-dev pcre-dev
21 tiff zlib-dev"
23 CONFIG_FILES="/etc/nginx"
25 # What is the latest version available today?
26 current_version()
27 {
28 wget -O - ${WGET_URL%/*} 2>/dev/null | \
29 sed "/latest/d;/nginx-/!d;/tar/!d;s|.*nginx-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
30 }
32 # Rules to configure and make the package.
33 compile_rules()
34 {
35 # 1.16.0 invalid:
36 # --with-http_spdy_module
38 ./configure \
39 --prefix=/usr \
40 --conf-path=/etc/nginx/nginx.conf \
41 --pid-path=/var/run/nginx.pid \
42 --lock-path=/var/lock/nginx.lock \
43 --error-log-path=/var/log/nginx/error.log \
44 --http-log-path=/var/log/nginx/access.log \
45 --http-client-body-temp-path=/var/spool/nginx/body \
46 --http-proxy-temp-path=/var/spool/nginx/proxy \
47 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
48 --with-http_ssl_module \
49 --with-http_realip_module \
50 --with-http_addition_module \
51 --with-http_xslt_module \
52 --with-http_image_filter_module \
53 --with-http_geoip_module \
54 --with-http_sub_module \
55 --with-http_dav_module \
56 --with-http_flv_module \
57 --with-http_mp4_module \
58 --with-http_gunzip_module \
59 --with-http_gzip_static_module \
60 --with-http_auth_request_module \
61 --with-http_random_index_module \
62 --with-http_secure_link_module \
63 --with-http_degradation_module \
64 --with-http_stub_status_module \
65 --with-mail \
66 --with-mail_ssl_module \
67 --with-stream \
68 --with-stream_ssl_module \
69 --with-pcre \
70 --with-pcre-jit \
71 --with-http_perl_module \
72 --user=80 \
73 --group=80 &&
74 make &&
75 make install DESTDIR=$DESTDIR
77 # not yet available - perftools dep lib
78 #--with-google_perftools_module \
79 }
81 # Rules to gen a SliTaz package suitable for Tazpkg.
82 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
83 genpkg_rules()
84 {
85 cp -a $install/* $fs
86 rm -rf $fs/usr/html
87 cp -a stuff/* $fs
88 sed -i 's/#user nobody;/user www;/' \
89 $fs/etc/nginx/nginx.conf
90 }
92 # Pre and post install commands for Tazpkg.
93 # We stop the server by default in case of upgarde.
94 pre_install()
95 {
96 [ -f /etc/init.d/$SOURCE ] &&
97 /etc/init.d/$SOURCE stop
99 # Backup configuration file.
100 if [ -d "$1/$CONFIG_FILES" ]
101 then
102 cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"
103 fi
104 }
106 post_install()
107 {
108 mkdir -p /var/spool/nginx
110 # Restore original configuration.
111 if [ -d "$1/$CONFIG_FILES.bak" ]
112 then
113 rm -rf "$1/$CONFIG_FILES"
114 mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES"
115 fi
117 # Just in case.
118 chown www.www "$1/var/log/$SOURCE"
119 if [ -z "$1" ]
120 then
121 for i in apache lighttpd
122 do
123 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
124 done
125 /etc/init.d/$SOURCE start
126 fi
128 :
129 }