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