wok-current annotate nginx/receipt @ rev 24742
updated libffcall (2.2 -> 2.4)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Mar 16 10:31:26 2022 +0100 (2022-03-16) |
parents | 3ae2d1f7b186 |
children | b410cca81eae |
rev | line source |
---|---|
pascal@10450 | 1 # SliTaz package receipt. |
pascal@10450 | 2 |
pascal@10450 | 3 PACKAGE="nginx" |
pascal@23836 | 4 VERSION="1.19.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@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@23237 | 60 --with-mail --with-mail_ssl_module \ |
Hans-G?nter@23237 | 61 --user=80 \ |
Hans-G?nter@23237 | 62 --group=80 && |
pascal@10450 | 63 make && |
pascal@15182 | 64 make DESTDIR=$DESTDIR install |
pascal@10450 | 65 } |
pascal@10450 | 66 |
pascal@10450 | 67 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@10450 | 68 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pascal@10450 | 69 genpkg_rules() |
pascal@10450 | 70 { |
Hans-G?nter@23237 | 71 cp -a $install/* $fs/ |
Hans-G?nter@23237 | 72 rm -rf $fs/usr/html |
Hans-G?nter@23237 | 73 cp -a stuff/* $fs |
Hans-G?nter@23237 | 74 sed -i 's/#user nobody;/user www;/' \ |
Hans-G?nter@23237 | 75 $fs/etc/nginx/nginx.conf |
pascal@10450 | 76 } |
pascal@10450 | 77 |
pascal@10450 | 78 # Pre and post install commands for Tazpkg. |
pascal@10450 | 79 # We stop the server by default in case of upgarde. |
pascal@10450 | 80 pre_install() |
pascal@10450 | 81 { |
Hans-G?nter@23237 | 82 [ -z "$1" ] && |
Hans-G?nter@23237 | 83 for i in httpd lighttpd apache cherokee $PACKAGE |
Hans-G?nter@23237 | 84 do |
pascal@19147 | 85 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
Hans-G?nter@23237 | 86 done |
Hans-G?nter@23237 | 87 |
Hans-G?nter@23237 | 88 # Backup configuration file. |
Hans-G?nter@23237 | 89 if [ -d "$1/$CONFIG_FILES" ] |
Hans-G?nter@23237 | 90 then |
pascal@18730 | 91 cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak" |
al@18734 | 92 fi |
pascal@10450 | 93 } |
al@18734 | 94 |
pascal@10450 | 95 post_install() |
pascal@10450 | 96 { |
al@18734 | 97 mkdir -p /var/spool/nginx |
Hans-G?nter@23237 | 98 |
Hans-G?nter@23237 | 99 # Restore original configuration. |
Hans-G?nter@23237 | 100 if [ -d "$1/$CONFIG_FILES.bak" ] |
Hans-G?nter@23237 | 101 then |
pascal@18730 | 102 rm -rf "$1/$CONFIG_FILES" |
pascal@18730 | 103 mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES" |
al@18734 | 104 fi |
Hans-G?nter@23237 | 105 |
al@18734 | 106 # Just in case. |
al@18734 | 107 chown www.www "$1/var/log/$PACKAGE" |
Hans-G?nter@23237 | 108 if [ -z "$1" ] |
Hans-G?nter@23237 | 109 then |
Hans-G?nter@23237 | 110 for i in apache lighttpd |
Hans-G?nter@23237 | 111 do |
pascal@10450 | 112 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
Hans-G?nter@23237 | 113 done |
pascal@10450 | 114 /etc/init.d/$PACKAGE start |
al@18734 | 115 fi |
al@18734 | 116 true |
pascal@10450 | 117 } |