wok annotate nginx-extras/receipt @ rev 24712
updated less (551 -> 590)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Mar 14 17:50:02 2022 +0100 (2022-03-14) |
parents | 2e9639a37ee1 |
children | b410cca81eae |
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" |
pascal@24427 | 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 |
pascal@24427 | 23 # What is the latest version available today? |
pascal@24427 | 24 current_version() |
pascal@24427 | 25 { |
pascal@24427 | 26 wget -O - ${WGET_URL%/*} 2>/dev/null | \ |
pascal@24427 | 27 sed "/latest/d;/nginx-/!d;/tar/!d;s|.*nginx-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q |
pascal@24427 | 28 } |
pascal@24427 | 29 |
nneul@18379 | 30 # Rules to configure and make the package. |
nneul@18379 | 31 compile_rules() |
nneul@18379 | 32 { |
Hans-G?nter@23238 | 33 # 1.16.0 invalid: |
Hans-G?nter@23238 | 34 # --with-http_spdy_module |
Hans-G?nter@23238 | 35 |
Hans-G?nter@23237 | 36 ./configure \ |
Hans-G?nter@23237 | 37 --prefix=/usr \ |
Hans-G?nter@23237 | 38 --conf-path=/etc/nginx/nginx.conf \ |
Hans-G?nter@23237 | 39 --pid-path=/var/run/nginx.pid \ |
Hans-G?nter@23237 | 40 --lock-path=/var/lock/nginx.lock \ |
Hans-G?nter@23237 | 41 --error-log-path=/var/log/nginx/error.log \ |
Hans-G?nter@23237 | 42 --http-log-path=/var/log/nginx/access.log \ |
Hans-G?nter@23237 | 43 --http-client-body-temp-path=/var/spool/nginx/body \ |
Hans-G?nter@23237 | 44 --http-proxy-temp-path=/var/spool/nginx/proxy \ |
Hans-G?nter@23237 | 45 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \ |
Hans-G?nter@23237 | 46 --with-http_ssl_module \ |
Hans-G?nter@23237 | 47 --with-http_realip_module \ |
Hans-G?nter@23237 | 48 --with-http_addition_module \ |
Hans-G?nter@23237 | 49 --with-http_xslt_module \ |
Hans-G?nter@23237 | 50 --with-http_image_filter_module \ |
Hans-G?nter@23237 | 51 --with-http_geoip_module \ |
Hans-G?nter@23237 | 52 --with-http_sub_module \ |
Hans-G?nter@23237 | 53 --with-http_dav_module \ |
Hans-G?nter@23237 | 54 --with-http_flv_module \ |
Hans-G?nter@23237 | 55 --with-http_mp4_module \ |
Hans-G?nter@23237 | 56 --with-http_gunzip_module \ |
Hans-G?nter@23237 | 57 --with-http_gzip_static_module \ |
Hans-G?nter@23237 | 58 --with-http_auth_request_module \ |
Hans-G?nter@23237 | 59 --with-http_random_index_module \ |
Hans-G?nter@23237 | 60 --with-http_secure_link_module \ |
Hans-G?nter@23237 | 61 --with-http_degradation_module \ |
Hans-G?nter@23237 | 62 --with-http_stub_status_module \ |
Hans-G?nter@23237 | 63 --with-mail \ |
Hans-G?nter@23237 | 64 --with-mail_ssl_module \ |
Hans-G?nter@23237 | 65 --with-stream \ |
Hans-G?nter@23237 | 66 --with-stream_ssl_module \ |
Hans-G?nter@23237 | 67 --with-pcre \ |
Hans-G?nter@23237 | 68 --with-pcre-jit \ |
Hans-G?nter@23237 | 69 --with-http_perl_module \ |
Hans-G?nter@23237 | 70 --user=80 \ |
Hans-G?nter@23237 | 71 --group=80 && |
nneul@18379 | 72 make && |
nneul@18379 | 73 make DESTDIR=$DESTDIR install |
nneul@18379 | 74 |
al@18741 | 75 # not yet available - perftools dep lib |
al@18741 | 76 #--with-google_perftools_module \ |
nneul@18379 | 77 } |
nneul@18379 | 78 |
nneul@18379 | 79 # Rules to gen a SliTaz package suitable for Tazpkg. |
nneul@18379 | 80 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
nneul@18379 | 81 genpkg_rules() |
nneul@18379 | 82 { |
Hans-G?nter@23237 | 83 cp -a $install/* $fs |
Hans-G?nter@23237 | 84 rm -rf $fs/usr/html |
Hans-G?nter@23237 | 85 cp -a stuff/* $fs |
Hans-G?nter@23237 | 86 sed -i 's/#user nobody;/user www;/' \ |
Hans-G?nter@23237 | 87 $fs/etc/nginx/nginx.conf |
nneul@18379 | 88 } |
nneul@18379 | 89 |
nneul@18379 | 90 # Pre and post install commands for Tazpkg. |
nneul@18379 | 91 # We stop the server by default in case of upgarde. |
nneul@18379 | 92 pre_install() |
nneul@18379 | 93 { |
Hans-G?nter@23237 | 94 [ -f /etc/init.d/$PACKAGE ] && |
Hans-G?nter@23237 | 95 /etc/init.d/$PACKAGE stop |
Hans-G?nter@23237 | 96 |
Hans-G?nter@23237 | 97 # Backup configuration file. |
Hans-G?nter@23237 | 98 if [ -d "$1/$CONFIG_FILES" ] |
Hans-G?nter@23237 | 99 then |
pascal@18730 | 100 cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak" |
al@18741 | 101 fi |
nneul@18379 | 102 } |
al@18741 | 103 |
nneul@18379 | 104 post_install() |
nneul@18379 | 105 { |
al@18741 | 106 mkdir -p /var/spool/nginx |
al@18741 | 107 |
Hans-G?nter@23237 | 108 # Restore original configuration. |
Hans-G?nter@23237 | 109 if [ -d "$1/$CONFIG_FILES.bak" ] |
Hans-G?nter@23237 | 110 then |
pascal@18730 | 111 rm -rf "$1/$CONFIG_FILES" |
pascal@18730 | 112 mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES" |
al@18741 | 113 fi |
al@18741 | 114 |
al@18741 | 115 # Just in case. |
al@18741 | 116 chown www.www "$1/var/log/$PACKAGE" |
Hans-G?nter@23237 | 117 if [ -z "$1" ] |
Hans-G?nter@23237 | 118 then |
Hans-G?nter@23237 | 119 for i in apache lighttpd |
Hans-G?nter@23237 | 120 do |
nneul@18379 | 121 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
Hans-G?nter@23237 | 122 done |
nneul@18379 | 123 /etc/init.d/$PACKAGE start |
al@18741 | 124 fi |
al@18741 | 125 |
al@18741 | 126 : |
nneul@18379 | 127 } |