           SPELL=nginx

if [[ -z $NGINX_RELEASE ]]; then
  NGINX_RELEASE="stable"
fi

case "$NGINX_RELEASE" in
  stable)
         VERSION=1.0.15
  SECURITY_PATCH=3
  ;;
  legacy)
         VERSION=0.8.55
  ;;
  old)
         VERSION=0.7.69
  SECURITY_PATCH=2
  ;;
  devel)
         VERSION=1.1.19
  SECURITY_PATCH=3
  ;;
esac
          SOURCE=$SPELL-$VERSION.tar.gz
         SOURCE2=$SPELL-$VERSION.tar.gz.asc
   SOURCE_URL[0]=http://nginx.org/download/$SOURCE
     SOURCE2_URL=$SOURCE_URL.asc
      SOURCE_GPG=nginx.gpg:$SOURCE2:UPSTREAM_KEY
  SOURCE2_IGNORE=signature
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"

# optional modules
if list_find "$NGINX_MODULES" "push"; then
         ID_PUSH=nginx_http_push_module-0.692
         SOURCE3=${ID_PUSH}.tar.gz
  SOURCE3_URL[0]=http://pushmodule.slact.net/downloads/$SOURCE3
    SOURCE3_HASH=sha512:79821cacf5db4b1309e3f1c8d6980f83b1093dd3f291db5298bfdeb0d889fc0629625dcf3135d1cf7554b43308ef7172a4f40596928ab3069426801177ed3c1c
SOURCE_DIRECTORY3="$SOURCE_DIRECTORY/${ID_PUSH}"
fi
if list_find "$NGINX_MODULES" "auth_ldap"; then
    ID_AUTH_LDAP=ngx_http_auth_ldap_module-1.0-a3
         SOURCE4=${ID_AUTH_LDAP}.tar.gz
  SOURCE4_URL[0]=http://nginx-auth-ldap.googlecode.com/files/$SOURCE4
    SOURCE4_HASH=sha512:01629d1a002088da0fd3beb6fa73448a5e5f87838320253bb33f5a44292deca7b7ef9c185a7749a11f564a51cfbe7339b398012ec7a49f4973061702c0cae4c1
SOURCE_DIRECTORY4="$SOURCE_DIRECTORY/${ID_AUTH_LDAP}"
fi

        WEB_SITE=http://nginx.org/
      LICENSE[0]=BSD
         ENTERED=20090203
           SHORT="HTTP server and mail proxy server"
cat << EOF
nginx [engine x] is a HTTP server and mail proxy server.

The basic HTTP features:
* Handling of static files, index files, and autoindexing; open file
  descriptor cache.
* Accelerated reverse proxying without caching, simple load balancing
  and fault tolerance.
* Accelerated support without caching of remote FastCGI servers,
  simple load balancing and fault tolerance.
* Modular architecture. Filters include gzipping, byte ranges,
  chunked responses, and SSI. Multiple SSI inclusions within a single
  page can be processed in parallel if they are handled by FastCGI or
  proxied servers.
* SSL and TLS SNI support.

Mail proxy server features:
* User redirection to IMAP/POP3 backend using an external HTTP
  authentication server.
* User authentication using an external HTTP authentication server
  and connection redirection to internal SMTP backend.
* Authentication methods:
  o POP3: USER/PASS, APOP, AUTH LOGIN PLAIN CRAM-MD5
  o IMAP: LOGIN, AUTH LOGIN PLAIN CRAM-MD5
  o SMTP: AUTH LOGIN PLAIN CRAM-MD5
* SSL support.
* STARTTLS and STLS support.
EOF
