wok-stable view nginx/receipt @ rev 12451

Up apache (2.2.29), CVE-2014-0231
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jun 16 10:13:52 2015 +0200 (2015-06-16)
parents 1fdee4c495df
children
line source
1 # SliTaz package receipt.
3 PACKAGE="nginx"
4 VERSION="0.7.65"
5 CATEGORY="network"
6 SHORT_DESC="Asynchronous HTTP server designed for heavy loads + mail proxy."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 SUGGESTED="php perl python"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://nginx.org/"
11 WGET_URL="${WEB_SITE}download//$TARBALL"
12 DEPENDS="pcre openssl zlib"
13 BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev"
14 PROVIDE="lighttpd"
15 CONFIG_FILES="/etc/nginx"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
22 # --with-rtsig_module enable rtsig module
23 # --with-select_module enable select module
24 # --with-poll_module enable poll module
25 # --with-ipv6 enable ipv6 support
26 # --with-http_realip_module enable ngx_http_realip_module
27 # --with-http_addition_module enable ngx_http_addition_module
28 # --with-http_xslt_module enable ngx_http_xslt_module
29 # --with-http_image_filter_module enable ngx_http_image_filter_module
30 # --with-http_geoip_module enable ngx_http_geoip_module
31 # --with-http_sub_module enable ngx_http_sub_module
32 # --with-http_random_index_module enable ngx_http_random_index_module
33 # --with-http_secure_link_module enable ngx_http_secure_link_module
34 # --with-http_perl_module enable ngx_http_perl_module
35 # --with-google_perftools_module enable ngx_google_perftools_module
37 ./configure --prefix=/usr \
38 --conf-path=/etc/nginx/nginx.conf \
39 --pid-path=/var/run/nginx.pid \
40 --lock-path=/var/lock/nginx.lock \
41 --error-log-path=/var/log/nginx/error.log \
42 --http-log-path=/var/log/nginx/access.log \
43 --http-client-body-temp-path=/var/spool/nginx/body \
44 --http-proxy-temp-path=/var/spool/nginx/proxy \
45 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
46 --with-http_stub_status_module \
47 --with-http_flv_module \
48 --with-http_ssl_module \
49 --with-http_dav_module \
50 --with-mail --with-mail_ssl_module \
51 --user=80 --group=80 &&
52 make &&
53 make DESTDIR=$PWD/_pkg install
54 }
56 # Rules to gen a SliTaz package suitable for Tazpkg.
57 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
58 genpkg_rules()
59 {
60 cp -a $_pkg/* $fs/
61 rm -rf $fs/usr/html
62 cp -a stuff/* $fs
63 sed -i 's/#user nobody;/user www;/' $fs/etc/nginx/nginx.conf
64 }
66 # Pre and post install commands for Tazpkg.
67 # We stop the server by default in case of upgarde.
68 pre_install()
69 {
70 echo "Processing pre-install commands..."
71 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
72 # Backup config file.
73 if [ -d $1/$CONFIG_FILES ]; then
74 cp -a $1/$CONFIG_FILES $1/$CONFIG_FILES.bak
75 fi
76 }
77 post_install()
78 {
79 echo "Processing post-install commands..."
80 mkdir -p /var/spool/nginx
81 # Restore original config.
82 if [ -d $1/$CONFIG_FILES.bak ]; then
83 rm -rf $1/$CONFIG_FILES
84 mv $1/$CONFIG_FILES.bak $1/$CONFIG_FILES
85 fi
86 # Just in case.
87 chown www.www $1/var/log/$PACKAGE
88 if [ -z "$1" ]; then
89 for i in apache lighttpd ; do
90 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
91 done
92 /etc/init.d/$PACKAGE start
93 fi
94 }