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