wok annotate nginx/receipt @ rev 25382
updated unison (2.51.5 -> 2.52.1)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Jul 30 17:15:58 2022 +0100 (2022-07-30) |
parents | 83b97236db32 |
children | 4f02a37747b4 |
rev | line source |
---|---|
pascal@10450 | 1 # SliTaz package receipt. |
pascal@10450 | 2 |
pascal@10450 | 3 PACKAGE="nginx" |
Hans-G?nter@24996 | 4 VERSION="1.21.6" |
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" |
Hans-G?nter@24996 | 15 SUGGESTED="perl php 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@24427 | 21 # What is the latest version available today? |
pascal@24427 | 22 current_version() |
pascal@24427 | 23 { |
pascal@24427 | 24 wget -O - ${WGET_URL%/*} 2>/dev/null | \ |
pascal@24427 | 25 sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q |
pascal@24427 | 26 } |
pascal@24427 | 27 |
pascal@10450 | 28 # Rules to configure and make the package. |
pascal@10450 | 29 compile_rules() |
pascal@10450 | 30 { |
pascal@10450 | 31 # --with-rtsig_module enable rtsig module |
pascal@10450 | 32 # --with-select_module enable select module |
pascal@10450 | 33 # --with-poll_module enable poll module |
pascal@10450 | 34 # --with-ipv6 enable ipv6 support |
pascal@10450 | 35 # --with-http_realip_module enable ngx_http_realip_module |
pascal@10450 | 36 # --with-http_addition_module enable ngx_http_addition_module |
pascal@10450 | 37 # --with-http_xslt_module enable ngx_http_xslt_module |
pascal@10450 | 38 # --with-http_image_filter_module enable ngx_http_image_filter_module |
pascal@10450 | 39 # --with-http_geoip_module enable ngx_http_geoip_module |
pascal@10450 | 40 # --with-http_sub_module enable ngx_http_sub_module |
pascal@10450 | 41 # --with-http_random_index_module enable ngx_http_random_index_module |
pascal@10450 | 42 # --with-http_secure_link_module enable ngx_http_secure_link_module |
pascal@10450 | 43 # --with-http_perl_module enable ngx_http_perl_module |
pascal@10450 | 44 # --with-google_perftools_module enable ngx_google_perftools_module |
pascal@10450 | 45 |
Hans-G?nter@23237 | 46 ./configure \ |
Hans-G?nter@23237 | 47 --prefix=/usr \ |
Hans-G?nter@23237 | 48 --conf-path=/etc/nginx/nginx.conf \ |
Hans-G?nter@23237 | 49 --pid-path=/var/run/nginx.pid \ |
Hans-G?nter@23237 | 50 --lock-path=/var/lock/nginx.lock \ |
Hans-G?nter@23237 | 51 --error-log-path=/var/log/nginx/error.log \ |
Hans-G?nter@23237 | 52 --http-log-path=/var/log/nginx/access.log \ |
Hans-G?nter@23237 | 53 --http-client-body-temp-path=/var/spool/nginx/body \ |
Hans-G?nter@23237 | 54 --http-proxy-temp-path=/var/spool/nginx/proxy \ |
Hans-G?nter@23237 | 55 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \ |
Hans-G?nter@23237 | 56 --with-http_stub_status_module \ |
Hans-G?nter@23237 | 57 --with-http_flv_module \ |
Hans-G?nter@23237 | 58 --with-http_ssl_module \ |
Hans-G?nter@23237 | 59 --with-http_dav_module \ |
Hans-G?nter@24996 | 60 --with-mail \ |
Hans-G?nter@24996 | 61 --with-mail_ssl_module \ |
Hans-G?nter@23237 | 62 --user=80 \ |
Hans-G?nter@23237 | 63 --group=80 && |
pascal@10450 | 64 make && |
Hans-G?nter@24996 | 65 make install DESTDIR=$DESTDIR |
pascal@10450 | 66 } |
pascal@10450 | 67 |
pascal@10450 | 68 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@10450 | 69 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pascal@10450 | 70 genpkg_rules() |
pascal@10450 | 71 { |
Hans-G?nter@24996 | 72 cp -a $install/* $fs |
Hans-G?nter@23237 | 73 rm -rf $fs/usr/html |
Hans-G?nter@23237 | 74 cp -a stuff/* $fs |
Hans-G?nter@23237 | 75 sed -i 's/#user nobody;/user www;/' \ |
Hans-G?nter@23237 | 76 $fs/etc/nginx/nginx.conf |
pascal@10450 | 77 } |
pascal@10450 | 78 |
pascal@10450 | 79 # Pre and post install commands for Tazpkg. |
pascal@10450 | 80 # We stop the server by default in case of upgarde. |
pascal@10450 | 81 pre_install() |
pascal@10450 | 82 { |
Hans-G?nter@23237 | 83 [ -z "$1" ] && |
Hans-G?nter@23237 | 84 for i in httpd lighttpd apache cherokee $PACKAGE |
Hans-G?nter@23237 | 85 do |
pascal@19147 | 86 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
Hans-G?nter@23237 | 87 done |
Hans-G?nter@23237 | 88 |
Hans-G?nter@23237 | 89 # Backup configuration file. |
Hans-G?nter@23237 | 90 if [ -d "$1/$CONFIG_FILES" ] |
Hans-G?nter@23237 | 91 then |
pascal@18730 | 92 cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak" |
al@18734 | 93 fi |
pascal@10450 | 94 } |
al@18734 | 95 |
pascal@10450 | 96 post_install() |
pascal@10450 | 97 { |
al@18734 | 98 mkdir -p /var/spool/nginx |
Hans-G?nter@23237 | 99 |
Hans-G?nter@23237 | 100 # Restore original configuration. |
Hans-G?nter@23237 | 101 if [ -d "$1/$CONFIG_FILES.bak" ] |
Hans-G?nter@23237 | 102 then |
pascal@18730 | 103 rm -rf "$1/$CONFIG_FILES" |
pascal@18730 | 104 mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES" |
al@18734 | 105 fi |
Hans-G?nter@23237 | 106 |
al@18734 | 107 # Just in case. |
al@18734 | 108 chown www.www "$1/var/log/$PACKAGE" |
Hans-G?nter@23237 | 109 if [ -z "$1" ] |
Hans-G?nter@23237 | 110 then |
Hans-G?nter@23237 | 111 for i in apache lighttpd |
Hans-G?nter@23237 | 112 do |
pascal@10450 | 113 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
Hans-G?nter@23237 | 114 done |
pascal@10450 | 115 /etc/init.d/$PACKAGE start |
al@18734 | 116 fi |
al@18734 | 117 true |
pascal@10450 | 118 } |