wok view nginx/receipt @ rev 23287

updated perl-animation (2.4 -> 2.6)
author Hans-G?nter Theisgen
date Sun Mar 29 14:54:06 2020 +0100 (2020-03-29)
parents 3630f18392bd
children 3ae2d1f7b186
line source
1 # SliTaz package receipt.
3 PACKAGE="nginx"
4 VERSION="1.16.0"
5 CATEGORY="network"
6 SHORT_DESC="Asynchronous HTTP server designed for heavy loads and mail proxy."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="https://nginx.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}download//$TARBALL"
14 PROVIDE="lighttpd"
15 SUGGESTED="php perl python"
16 DEPENDS="openssl pcre zlib"
17 BUILD_DEPENDS="openssl-dev pcre-dev zlib-dev"
19 CONFIG_FILES="/etc/nginx"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 # --with-rtsig_module enable rtsig module
25 # --with-select_module enable select module
26 # --with-poll_module enable poll module
27 # --with-ipv6 enable ipv6 support
28 # --with-http_realip_module enable ngx_http_realip_module
29 # --with-http_addition_module enable ngx_http_addition_module
30 # --with-http_xslt_module enable ngx_http_xslt_module
31 # --with-http_image_filter_module enable ngx_http_image_filter_module
32 # --with-http_geoip_module enable ngx_http_geoip_module
33 # --with-http_sub_module enable ngx_http_sub_module
34 # --with-http_random_index_module enable ngx_http_random_index_module
35 # --with-http_secure_link_module enable ngx_http_secure_link_module
36 # --with-http_perl_module enable ngx_http_perl_module
37 # --with-google_perftools_module enable ngx_google_perftools_module
39 ./configure \
40 --prefix=/usr \
41 --conf-path=/etc/nginx/nginx.conf \
42 --pid-path=/var/run/nginx.pid \
43 --lock-path=/var/lock/nginx.lock \
44 --error-log-path=/var/log/nginx/error.log \
45 --http-log-path=/var/log/nginx/access.log \
46 --http-client-body-temp-path=/var/spool/nginx/body \
47 --http-proxy-temp-path=/var/spool/nginx/proxy \
48 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
49 --with-http_stub_status_module \
50 --with-http_flv_module \
51 --with-http_ssl_module \
52 --with-http_dav_module \
53 --with-mail --with-mail_ssl_module \
54 --user=80 \
55 --group=80 &&
56 make &&
57 make DESTDIR=$DESTDIR install
58 }
60 # Rules to gen a SliTaz package suitable for Tazpkg.
61 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
62 genpkg_rules()
63 {
64 cp -a $install/* $fs/
65 rm -rf $fs/usr/html
66 cp -a stuff/* $fs
67 sed -i 's/#user nobody;/user www;/' \
68 $fs/etc/nginx/nginx.conf
69 }
71 # Pre and post install commands for Tazpkg.
72 # We stop the server by default in case of upgarde.
73 pre_install()
74 {
75 [ -z "$1" ] &&
76 for i in httpd lighttpd apache cherokee $PACKAGE
77 do
78 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
79 done
81 # Backup configuration file.
82 if [ -d "$1/$CONFIG_FILES" ]
83 then
84 cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"
85 fi
86 }
88 post_install()
89 {
90 mkdir -p /var/spool/nginx
92 # Restore original configuration.
93 if [ -d "$1/$CONFIG_FILES.bak" ]
94 then
95 rm -rf "$1/$CONFIG_FILES"
96 mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES"
97 fi
99 # Just in case.
100 chown www.www "$1/var/log/$PACKAGE"
101 if [ -z "$1" ]
102 then
103 for i in apache lighttpd
104 do
105 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
106 done
107 /etc/init.d/$PACKAGE start
108 fi
109 true
110 }