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