wok annotate nginx-extras/receipt @ rev 18379

Add: nginx-extras (1.9.4)
author Nathan Neulinger <nneul@neulinger.org>
date Thu Sep 17 16:29:50 2015 +0000 (2015-09-17)
parents
children 9bc008086f63
rev   line source
nneul@18379 1 # SliTaz package receipt.
nneul@18379 2
nneul@18379 3 PACKAGE="nginx-extras"
nneul@18379 4 VERSION="1.9.4"
nneul@18379 5 CATEGORY="network"
nneul@18379 6 SHORT_DESC="Asynchronous HTTP server designed for heavy loads + mail proxy."
nneul@18379 7 MAINTAINER="pascal.bellard@slitaz.org"
nneul@18379 8 LICENSE="BSD"
nneul@18379 9 SUGGESTED="php perl python"
nneul@18379 10 TARBALL="nginx-$VERSION.tar.gz"
nneul@18379 11 WEB_SITE="http://nginx.org/"
nneul@18379 12 WGET_URL="${WEB_SITE}download//$TARBALL"
nneul@18379 13 PROVIDE="lighttpd"
nneul@18379 14 CONFIG_FILES="/etc/nginx"
nneul@18379 15 CONFLICT="nginx"
nneul@18379 16
nneul@18379 17 DEPENDS="pcre openssl zlib libgd geoip"
nneul@18379 18 BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev libgd-dev geoip-dev"
nneul@18379 19
nneul@18379 20 # Rules to configure and make the package.
nneul@18379 21 compile_rules()
nneul@18379 22 {
nneul@18379 23 cd $src
nneul@18379 24
nneul@18379 25 ./configure --prefix=/usr \
nneul@18379 26 --conf-path=/etc/nginx/nginx.conf \
nneul@18379 27 --pid-path=/var/run/nginx.pid \
nneul@18379 28 --lock-path=/var/lock/nginx.lock \
nneul@18379 29 --error-log-path=/var/log/nginx/error.log \
nneul@18379 30 --http-log-path=/var/log/nginx/access.log \
nneul@18379 31 --http-client-body-temp-path=/var/spool/nginx/body \
nneul@18379 32 --http-proxy-temp-path=/var/spool/nginx/proxy \
nneul@18379 33 --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
nneul@18379 34 --with-http_ssl_module \
nneul@18379 35 --with-http_spdy_module \
nneul@18379 36 --with-http_realip_module \
nneul@18379 37 --with-http_addition_module \
nneul@18379 38 --with-http_xslt_module \
nneul@18379 39 --with-http_image_filter_module \
nneul@18379 40 --with-http_geoip_module \
nneul@18379 41 --with-http_sub_module \
nneul@18379 42 --with-http_dav_module \
nneul@18379 43 --with-http_flv_module \
nneul@18379 44 --with-http_mp4_module \
nneul@18379 45 --with-http_gunzip_module \
nneul@18379 46 --with-http_gzip_static_module \
nneul@18379 47 --with-http_auth_request_module \
nneul@18379 48 --with-http_random_index_module \
nneul@18379 49 --with-http_secure_link_module \
nneul@18379 50 --with-http_degradation_module \
nneul@18379 51 --with-http_stub_status_module \
nneul@18379 52 --with-mail \
nneul@18379 53 --with-mail_ssl_module \
nneul@18379 54 --with-stream \
nneul@18379 55 --with-stream_ssl_module \
nneul@18379 56 --with-pcre \
nneul@18379 57 --with-pcre-jit \
nneul@18379 58 --with-http_perl_module \
nneul@18379 59 --user=80 --group=80 &&
nneul@18379 60 make &&
nneul@18379 61 make DESTDIR=$DESTDIR install
nneul@18379 62
nneul@18379 63 # not yet available - perftools dep lib
nneul@18379 64 #--with-google_perftools_module \
nneul@18379 65 }
nneul@18379 66
nneul@18379 67 # Rules to gen a SliTaz package suitable for Tazpkg.
nneul@18379 68 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
nneul@18379 69 genpkg_rules()
nneul@18379 70 {
nneul@18379 71 cp -a $install/* $fs/
nneul@18379 72 rm -rf $fs/usr/html
nneul@18379 73 cp -a stuff/* $fs
nneul@18379 74 sed -i 's/#user nobody;/user www;/' $fs/etc/nginx/nginx.conf
nneul@18379 75 }
nneul@18379 76
nneul@18379 77 # Pre and post install commands for Tazpkg.
nneul@18379 78 # We stop the server by default in case of upgarde.
nneul@18379 79 pre_install()
nneul@18379 80 {
nneul@18379 81 echo "Processing pre-install commands..."
nneul@18379 82 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
nneul@18379 83 # Backup config file.
nneul@18379 84 if [ -d $1/$CONFIG_FILES ]; then
nneul@18379 85 cp -a $1/$CONFIG_FILES $1/$CONFIG_FILES.bak
nneul@18379 86 fi
nneul@18379 87 }
nneul@18379 88 post_install()
nneul@18379 89 {
nneul@18379 90 echo "Processing post-install commands..."
nneul@18379 91 mkdir -p /var/spool/nginx
nneul@18379 92 # Restore original config.
nneul@18379 93 if [ -d $1/$CONFIG_FILES.bak ]; then
nneul@18379 94 rm -rf $1/$CONFIG_FILES
nneul@18379 95 mv $1/$CONFIG_FILES.bak $1/$CONFIG_FILES
nneul@18379 96 fi
nneul@18379 97 # Just in case.
nneul@18379 98 chown www.www $1/var/log/$PACKAGE
nneul@18379 99 if [ -z "$1" ]; then
nneul@18379 100 for i in apache lighttpd ; do
nneul@18379 101 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
nneul@18379 102 done
nneul@18379 103 /etc/init.d/$PACKAGE start
nneul@18379 104 fi
nneul@18379 105 }