wok view nginx/receipt @ rev 15274
mingw32-gcc: remove a wrong error trigger
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 25 16:27:31 2013 +0000 (2013-09-25) |
parents | d4a28e8d9c5b |
children | 23c3aed67cd9 |
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 PROVIDE="lighttpd"
13 CONFIG_FILES="/etc/nginx"
15 DEPENDS="pcre openssl zlib"
16 BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
23 # --with-rtsig_module enable rtsig module
24 # --with-select_module enable select module
25 # --with-poll_module enable poll module
26 # --with-ipv6 enable ipv6 support
27 # --with-http_realip_module enable ngx_http_realip_module
28 # --with-http_addition_module enable ngx_http_addition_module
29 # --with-http_xslt_module enable ngx_http_xslt_module
30 # --with-http_image_filter_module enable ngx_http_image_filter_module
31 # --with-http_geoip_module enable ngx_http_geoip_module
32 # --with-http_sub_module enable ngx_http_sub_module
33 # --with-http_random_index_module enable ngx_http_random_index_module
34 # --with-http_secure_link_module enable ngx_http_secure_link_module
35 # --with-http_perl_module enable ngx_http_perl_module
36 # --with-google_perftools_module enable ngx_google_perftools_module
38 ./configure --prefix=/usr \
39 --conf-path=/etc/nginx/nginx.conf \
40 --pid-path=/var/run/nginx.pid \
41 --lock-path=/var/lock/nginx.lock \
42 --error-log-path=/var/log/nginx/error.log \
43 --http-log-path=/var/log/nginx/access.log \
44 --http-client-body-temp-path=/var/spool/nginx/body \
45 --http-proxy-temp-path=/var/spool/nginx/proxy \
46 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
47 --with-http_stub_status_module \
48 --with-http_flv_module \
49 --with-http_ssl_module \
50 --with-http_dav_module \
51 --with-mail --with-mail_ssl_module \
52 --user=80 --group=80 &&
53 make &&
54 make DESTDIR=$DESTDIR install
55 }
57 # Rules to gen a SliTaz package suitable for Tazpkg.
58 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
59 genpkg_rules()
60 {
61 cp -a $install/* $fs/
62 rm -rf $fs/usr/html
63 cp -a stuff/* $fs
64 sed -i 's/#user nobody;/user www;/' $fs/etc/nginx/nginx.conf
65 }
67 # Pre and post install commands for Tazpkg.
68 # We stop the server by default in case of upgarde.
69 pre_install()
70 {
71 echo "Processing pre-install commands..."
72 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
73 # Backup config file.
74 if [ -d $1/$CONFIG_FILES ]; then
75 cp -a $1/$CONFIG_FILES $1/$CONFIG_FILES.bak
76 fi
77 }
78 post_install()
79 {
80 echo "Processing post-install commands..."
81 mkdir -p /var/spool/nginx
82 # Restore original config.
83 if [ -d $1/$CONFIG_FILES.bak ]; then
84 rm -rf $1/$CONFIG_FILES
85 mv $1/$CONFIG_FILES.bak $1/$CONFIG_FILES
86 fi
87 # Just in case.
88 chown www.www $1/var/log/$PACKAGE
89 if [ -z "$1" ]; then
90 for i in apache lighttpd ; do
91 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
92 done
93 /etc/init.d/$PACKAGE start
94 fi
95 }