wok-next view nginx-extras/receipt @ rev 18441
gambas2: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 23 22:06:04 2015 +0200 (2015-09-23) |
parents | 9bc008086f63 |
children | 1067bb7f1e24 |
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 cd $src
25 ./configure --prefix=/usr \
26 --conf-path=/etc/nginx/nginx.conf \
27 --pid-path=/var/run/nginx.pid \
28 --lock-path=/var/lock/nginx.lock \
29 --error-log-path=/var/log/nginx/error.log \
30 --http-log-path=/var/log/nginx/access.log \
31 --http-client-body-temp-path=/var/spool/nginx/body \
32 --http-proxy-temp-path=/var/spool/nginx/proxy \
33 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
34 --with-http_ssl_module \
35 --with-http_spdy_module \
36 --with-http_realip_module \
37 --with-http_addition_module \
38 --with-http_xslt_module \
39 --with-http_image_filter_module \
40 --with-http_geoip_module \
41 --with-http_sub_module \
42 --with-http_dav_module \
43 --with-http_flv_module \
44 --with-http_mp4_module \
45 --with-http_gunzip_module \
46 --with-http_gzip_static_module \
47 --with-http_auth_request_module \
48 --with-http_random_index_module \
49 --with-http_secure_link_module \
50 --with-http_degradation_module \
51 --with-http_stub_status_module \
52 --with-mail \
53 --with-mail_ssl_module \
54 --with-stream \
55 --with-stream_ssl_module \
56 --with-pcre \
57 --with-pcre-jit \
58 --with-http_perl_module \
59 --user=80 --group=80 &&
60 make &&
61 make DESTDIR=$DESTDIR install
63 # not yet available - perftools dep lib
64 #--with-google_perftools_module \
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;/' $fs/etc/nginx/nginx.conf
75 }
77 # Pre and post install commands for Tazpkg.
78 # We stop the server by default in case of upgarde.
79 pre_install()
80 {
81 echo "Processing pre-install commands..."
82 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
83 # Backup config file.
84 if [ -d $1/$CONFIG_FILES ]; then
85 cp -a $1/$CONFIG_FILES $1/$CONFIG_FILES.bak
86 fi
87 }
88 post_install()
89 {
90 echo "Processing post-install commands..."
91 mkdir -p /var/spool/nginx
92 # Restore original config.
93 if [ -d $1/$CONFIG_FILES.bak ]; then
94 rm -rf $1/$CONFIG_FILES
95 mv $1/$CONFIG_FILES.bak $1/$CONFIG_FILES
96 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
105 }