wok view nginx-extras/receipt @ rev 19624
Up openssh (7.4p1)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jan 12 09:29:46 2017 +0100 (2017-01-12) |
parents | 9e01bc6321ea |
children | c83afd3687bf |
line source
1 # SliTaz package receipt.
3 PACKAGE="nginx-extras"
4 VERSION="1.9.4"
5 CATEGORY="network"
6 SHORT_DESC="Asynchronous HTTP server designed for heavy loads + mail proxy."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 SUGGESTED="php perl python"
10 TARBALL="nginx-$VERSION.tar.gz"
11 WEB_SITE="http://nginx.org/"
12 WGET_URL="${WEB_SITE}download//$TARBALL"
13 PROVIDE="lighttpd"
14 CONFIG_FILES="/etc/nginx"
15 CONFLICT="nginx"
17 DEPENDS="pcre openssl zlib libgd geoip libxslt"
18 BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev libgd-dev geoip-dev libxslt-dev"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 ./configure \
24 --prefix=/usr \
25 --conf-path=/etc/nginx/nginx.conf \
26 --pid-path=/var/run/nginx.pid \
27 --lock-path=/var/lock/nginx.lock \
28 --error-log-path=/var/log/nginx/error.log \
29 --http-log-path=/var/log/nginx/access.log \
30 --http-client-body-temp-path=/var/spool/nginx/body \
31 --http-proxy-temp-path=/var/spool/nginx/proxy \
32 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
33 --with-http_ssl_module \
34 --with-http_spdy_module \
35 --with-http_realip_module \
36 --with-http_addition_module \
37 --with-http_xslt_module \
38 --with-http_image_filter_module \
39 --with-http_geoip_module \
40 --with-http_sub_module \
41 --with-http_dav_module \
42 --with-http_flv_module \
43 --with-http_mp4_module \
44 --with-http_gunzip_module \
45 --with-http_gzip_static_module \
46 --with-http_auth_request_module \
47 --with-http_random_index_module \
48 --with-http_secure_link_module \
49 --with-http_degradation_module \
50 --with-http_stub_status_module \
51 --with-mail \
52 --with-mail_ssl_module \
53 --with-stream \
54 --with-stream_ssl_module \
55 --with-pcre \
56 --with-pcre-jit \
57 --with-http_perl_module \
58 --user=80 --group=80 &&
59 make &&
60 make DESTDIR=$DESTDIR install
62 # not yet available - perftools dep lib
63 #--with-google_perftools_module \
64 }
66 # Rules to gen a SliTaz package suitable for Tazpkg.
67 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
68 genpkg_rules()
69 {
70 cp -a $install/* $fs/
71 rm -rf $fs/usr/html
72 cp -a stuff/* $fs
73 sed -i 's/#user nobody;/user www;/' $fs/etc/nginx/nginx.conf
74 }
76 # Pre and post install commands for Tazpkg.
77 # We stop the server by default in case of upgarde.
78 pre_install()
79 {
80 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
81 # Backup config file.
82 if [ -d "$1/$CONFIG_FILES" ]; then
83 cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"
84 fi
85 }
87 post_install()
88 {
89 mkdir -p /var/spool/nginx
91 # Restore original config.
92 if [ -d "$1/$CONFIG_FILES.bak" ]; then
93 rm -rf "$1/$CONFIG_FILES"
94 mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES"
95 fi
97 # Just in case.
98 chown www.www "$1/var/log/$PACKAGE"
99 if [ -z "$1" ]; then
100 for i in apache lighttpd; do
101 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
102 done
103 /etc/init.d/$PACKAGE start
104 fi
106 :
107 }