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