wok-next annotate nginx/receipt @ rev 16646
gnome-vfs-dev: update deps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue May 13 06:18:31 2014 +0000 (2014-05-13) |
parents | 92c944abb6f5 |
children | f2bdc266fba2 |
rev | line source |
---|---|
pascal@10450 | 1 # SliTaz package receipt. |
pascal@10450 | 2 |
pascal@10450 | 3 PACKAGE="nginx" |
pascal@10450 | 4 VERSION="0.7.65" |
pascal@10450 | 5 CATEGORY="network" |
pascal@10450 | 6 SHORT_DESC="Asynchronous HTTP server designed for heavy loads + mail proxy." |
pascal@10450 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15601 | 8 LICENSE="BSD" |
pascal@10450 | 9 SUGGESTED="php perl python" |
pascal@10450 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@10450 | 11 WEB_SITE="http://nginx.org/" |
pascal@10450 | 12 WGET_URL="${WEB_SITE}download//$TARBALL" |
pascal@15182 | 13 PROVIDE="lighttpd" |
pascal@15182 | 14 CONFIG_FILES="/etc/nginx" |
pascal@15182 | 15 |
pascal@10450 | 16 DEPENDS="pcre openssl zlib" |
pascal@10450 | 17 BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev" |
pascal@10450 | 18 |
pascal@10450 | 19 # Rules to configure and make the package. |
pascal@10450 | 20 compile_rules() |
pascal@10450 | 21 { |
pascal@10450 | 22 cd $src |
pascal@10450 | 23 |
pascal@10450 | 24 # --with-rtsig_module enable rtsig module |
pascal@10450 | 25 # --with-select_module enable select module |
pascal@10450 | 26 # --with-poll_module enable poll module |
pascal@10450 | 27 # --with-ipv6 enable ipv6 support |
pascal@10450 | 28 # --with-http_realip_module enable ngx_http_realip_module |
pascal@10450 | 29 # --with-http_addition_module enable ngx_http_addition_module |
pascal@10450 | 30 # --with-http_xslt_module enable ngx_http_xslt_module |
pascal@10450 | 31 # --with-http_image_filter_module enable ngx_http_image_filter_module |
pascal@10450 | 32 # --with-http_geoip_module enable ngx_http_geoip_module |
pascal@10450 | 33 # --with-http_sub_module enable ngx_http_sub_module |
pascal@10450 | 34 # --with-http_random_index_module enable ngx_http_random_index_module |
pascal@10450 | 35 # --with-http_secure_link_module enable ngx_http_secure_link_module |
pascal@10450 | 36 # --with-http_perl_module enable ngx_http_perl_module |
pascal@10450 | 37 # --with-google_perftools_module enable ngx_google_perftools_module |
pascal@10450 | 38 |
pascal@10450 | 39 ./configure --prefix=/usr \ |
pascal@10450 | 40 --conf-path=/etc/nginx/nginx.conf \ |
pascal@10450 | 41 --pid-path=/var/run/nginx.pid \ |
pascal@10450 | 42 --lock-path=/var/lock/nginx.lock \ |
pascal@10450 | 43 --error-log-path=/var/log/nginx/error.log \ |
pascal@10450 | 44 --http-log-path=/var/log/nginx/access.log \ |
pascal@10450 | 45 --http-client-body-temp-path=/var/spool/nginx/body \ |
pascal@10450 | 46 --http-proxy-temp-path=/var/spool/nginx/proxy \ |
pascal@10450 | 47 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \ |
pascal@10450 | 48 --with-http_stub_status_module \ |
pascal@10450 | 49 --with-http_flv_module \ |
pascal@10450 | 50 --with-http_ssl_module \ |
pascal@10450 | 51 --with-http_dav_module \ |
pascal@10450 | 52 --with-mail --with-mail_ssl_module \ |
pascal@10450 | 53 --user=80 --group=80 && |
pascal@10450 | 54 make && |
pascal@15182 | 55 make DESTDIR=$DESTDIR install |
pascal@10450 | 56 } |
pascal@10450 | 57 |
pascal@10450 | 58 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@10450 | 59 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pascal@10450 | 60 genpkg_rules() |
pascal@10450 | 61 { |
pascal@15182 | 62 cp -a $install/* $fs/ |
mojo@14777 | 63 rm -rf $fs/usr/html |
mojo@14777 | 64 cp -a stuff/* $fs |
mojo@14777 | 65 sed -i 's/#user nobody;/user www;/' $fs/etc/nginx/nginx.conf |
pascal@10450 | 66 } |
pascal@10450 | 67 |
pascal@10450 | 68 # Pre and post install commands for Tazpkg. |
pascal@10450 | 69 # We stop the server by default in case of upgarde. |
pascal@10450 | 70 pre_install() |
pascal@10450 | 71 { |
mojo@14777 | 72 echo "Processing pre-install commands..." |
mojo@14777 | 73 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop |
mojo@14777 | 74 # Backup config file. |
mojo@14777 | 75 if [ -d $1/$CONFIG_FILES ]; then |
pascal@10450 | 76 cp -a $1/$CONFIG_FILES $1/$CONFIG_FILES.bak |
mojo@14777 | 77 fi |
pascal@10450 | 78 } |
pascal@10450 | 79 post_install() |
pascal@10450 | 80 { |
mojo@14777 | 81 echo "Processing post-install commands..." |
mojo@14777 | 82 mkdir -p /var/spool/nginx |
mojo@14777 | 83 # Restore original config. |
mojo@14777 | 84 if [ -d $1/$CONFIG_FILES.bak ]; then |
pascal@10450 | 85 rm -rf $1/$CONFIG_FILES |
pascal@10450 | 86 mv $1/$CONFIG_FILES.bak $1/$CONFIG_FILES |
mojo@14777 | 87 fi |
mojo@14777 | 88 # Just in case. |
mojo@14777 | 89 chown www.www $1/var/log/$PACKAGE |
mojo@14777 | 90 if [ -z "$1" ]; then |
pascal@10450 | 91 for i in apache lighttpd ; do |
pascal@10450 | 92 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
pascal@10450 | 93 done |
pascal@10450 | 94 /etc/init.d/$PACKAGE start |
mojo@14777 | 95 fi |
pascal@10450 | 96 } |