diff options
author | Alexander Kuznecov | 2015-07-01 02:42:02 +0600 |
---|---|---|
committer | Alexander Kuznecov | 2015-07-01 02:42:02 +0600 |
commit | 0511ef131f62addafb04f3b4ced488472da6dcb9 (patch) | |
tree | aa0fc1c6b509d36f52e88dfe2cab5cadace59ee8 | |
download | aur-0511ef131f62addafb04f3b4ced488472da6dcb9.tar.gz |
Init with 1.9.2-1
-rw-r--r-- | .SRCINFO | 77 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 213 | ||||
-rw-r--r-- | nginx.conf | 1 | ||||
-rw-r--r-- | nginx.logrotate | 11 | ||||
-rw-r--r-- | nginx.service | 18 | ||||
-rw-r--r-- | nginx.sh | 73 |
7 files changed, 398 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..81d670877171 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,77 @@ +pkgbase = nginx-custom-dev + pkgdesc = Development version of lightweight HTTP server and IMAP/POP3 proxy server with standard, additional and 3d party modules + pkgver = 1.9.2 + pkgrel = 1 + url = http://nginx.org + arch = i686 + arch = x86_64 + license = custom + makedepends = libxslt + makedepends = gd + makedepends = git + depends = pcre + depends = zlib + depends = openssl + depends = pam + depends = geoip + depends = geoip-database + depends = gd + depends = libxslt + provides = nginx + conflicts = nginx + conflicts = nginx-unstable + conflicts = nginx-svn + conflicts = nginx-devel + conflicts = nginx-custom + conflicts = nginx-full + backup = etc/nginx/nginx.conf + backup = etc/nginx/koi-win + backup = etc/nginx/koi-utf + backup = etc/nginx/win-utf + backup = etc/nginx/mime.types + backup = etc/nginx/fastcgi.conf + backup = etc/nginx/fastcgi_params + backup = etc/nginx/scgi_params + backup = etc/nginx/uwsgi_params + backup = etc/logrotate.d/nginx + source = nginx.sh + source = nginx.conf + source = nginx.logrotate + source = nginx.service + source = http://nginx.org/download/nginx-1.9.2.tar.gz + source = ngx_fancyindex.tar.gz::https://github.com/aperezdc/ngx-fancyindex/archive/v0.3.5.tar.gz + source = ngx_cachepurge.tar.gz::http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz + source = ngx_slowfscache.tar.gz::http://labs.frickle.com/files/ngx_slowfs_cache-1.10.tar.gz + source = ngx_uploadprogress.source::https://github.com/masterzen/nginx-upload-progress-module/tarball/v0.9.1 + source = ngx_headersmore.source::https://github.com/agentzh/headers-more-nginx-module/tarball/v0.26 + source = ngx_echo.source::https://github.com/agentzh/echo-nginx-module/tarball/v0.58 + source = ngx_upstreamfair.source::https://github.com/gnosek/nginx-upstream-fair/tarball/a18b4099fbd458111983200e098b6f0c8efed4bc + source = ngx_authpam.tar.gz::https://github.com/stogh/ngx_http_auth_pam_module/archive/v1.4.tar.gz + source = ngx_pagespeed.zip::https://github.com/pagespeed/ngx_pagespeed/archive/v1.9.32.4-beta.zip + source = psol.tar.gz::https://dl.google.com/dl/page-speed/psol/1.9.32.4.tar.gz + source = ngx_accesskey.tar.gz::http://wiki.nginx.org/images/5/51/Nginx-accesskey-2.0.3.tar.gz + source = ngx_rtmp.zip::https://github.com/arut/nginx-rtmp-module/archive/v1.1.7.zip + source = ngx_davext.tar.gz::https://github.com/arut/nginx-dav-ext-module/archive/v0.0.3.tar.gz + source = ngx_naxsi.tar.gz::https://github.com/nbs-system/naxsi/archive/0.53-2.tar.gz + md5sums = d56559ed5e8cc0b1c7adbe33f2300c4c + md5sums = 845cab784b50f1666bbf89d7435ac7af + md5sums = 79031b58828462dec53a9faed9ddb36a + md5sums = 6696dc228a567506bca3096b5197c9db + md5sums = 572a0f217f845d3592b5ca779066d1c3 + md5sums = 6d28dfd6cef1f130a1df97d61425798c + md5sums = 3d4ec04bbc16c3b555fa20392c1119d1 + md5sums = 68a1af12d5c1218fb2b3e05ed7ff6f0c + md5sums = f7dee95dbe8ada5f4d8e9d59ca1f4797 + md5sums = 439380d1db636049cb201836f46b6243 + md5sums = 6fe61c5b44b2e338c66e1e33ff7e95ab + md5sums = ac5e7f485476af70e0ee1c52016cddaf + md5sums = a5c0fb3af7158297c1457739947b9b0c + md5sums = 17f64b7d60f6ae6bef15faaf28ae3db2 + md5sums = 9f4d11cabbe5cd0c6945a4a89c82bff0 + md5sums = 9b5304346d5139b1841f5baa01ab0cbe + md5sums = a81e63cd4cf28eaf0c87d27c44e4c44a + md5sums = 2cb502dbda335be4ebd5fed0b3182bae + md5sums = 348b50914a1eedaed09a2509621adf43 + +pkgname = nginx-custom-dev + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..bde15336a7f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.gz +*.zip +*.source +src/ +pkg/
\ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3f6cfd0d2cc6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,213 @@ +# Maintainer: Alexander Kuznecov <alexander@kuznetcov.me> + +_pkgname="nginx" +_user="http" +_group="http" +_doc_root="/usr/share/${_pkgname}/html" +_sysconf_path="etc" +_conf_path="${_sysconf_path}/${_pkgname}" +_tmp_path="/var/spool/${_pkgname}" +_pid_path="/run" +_lock_path="/var/lock" +_log_path="/var/log/${_pkgname}" + +### 3d party modules: +_cachepurge_ver="2.3" +_cachepurge_dirname="ngx_cachepurge" +_slowfscache_ver="1.10" +_slowfscache_dirname="ngx_slowfscache" +_echo_ver="v0.58" +_echo_dirname="ngx_echo" +_headersmore_ver="v0.26" +_headersmore_dirname="ngx_headersmore" +_uploadprogress_ver="v0.9.1" +_uploadprogress_dirname="ngx_uploadprogress" +_upstreamfair_hash="a18b4099fbd458111983200e098b6f0c8efed4bc" +_upstreamfair_dirname="ngx_upstreamfair" +_fancyindex_ver="v0.3.5" +_fancyindex_dirname="ngx_fancyindex" +_authpam_ver="1.4" +_authpam_dirname="ngx_authpam" +_pagespeed_ver="1.9.32.4" +_pagespeed_dirname="ngx_pagespeed" +_accesskey_ver="2.0.3" +_accesskey_dirname="ngx_accesskey" +_rtmp_ver="v1.1.7" +_rtmp_dirname="ngx_rtmp" +_davext_ver="v0.0.3" +_davext_dirname="ngx_davext" +_naxsi_ver="0.53-2" +_naxsi_dirname="ngx_naxsi" + +pkgname=nginx-custom-dev +pkgver=1.9.2 +pkgrel=1 +pkgdesc="Development version of lightweight HTTP server and IMAP/POP3 proxy server with standard, additional and 3d party modules" +arch=('i686' 'x86_64') + +depends=('pcre' 'zlib' 'openssl' 'pam' 'geoip' 'geoip-database' 'gd' 'libxslt') +makedepends=( + 'libxslt' + 'gd' + 'git' +) + +url="http://nginx.org" +license=('custom') +conflicts=('nginx' 'nginx-unstable' 'nginx-svn' 'nginx-devel' 'nginx-custom' 'nginx-full') +provides=('nginx') +backup=("${_conf_path}/nginx.conf" + "${_conf_path}/koi-win" + "${_conf_path}/koi-utf" + "${_conf_path}/win-utf" + "${_conf_path}/mime.types" + "${_conf_path}/fastcgi.conf" + "${_conf_path}/fastcgi_params" + "${_conf_path}/scgi_params" + "${_conf_path}/uwsgi_params" + "etc/logrotate.d/nginx") +_user=http +_group=http + +source=("nginx.sh" + "nginx.conf" + "nginx.logrotate" + "nginx.service" + "http://nginx.org/download/nginx-$pkgver.tar.gz" + "${_fancyindex_dirname}.tar.gz::https://github.com/aperezdc/ngx-fancyindex/archive/${_fancyindex_ver}.tar.gz" + "${_cachepurge_dirname}.tar.gz::http://labs.frickle.com/files/ngx_cache_purge-${_cachepurge_ver}.tar.gz" + "${_slowfscache_dirname}.tar.gz::http://labs.frickle.com/files/ngx_slowfs_cache-${_slowfscache_ver}.tar.gz" + "${_uploadprogress_dirname}.source::https://github.com/masterzen/nginx-upload-progress-module/tarball/${_uploadprogress_ver}" + "${_headersmore_dirname}.source::https://github.com/agentzh/headers-more-nginx-module/tarball/${_headersmore_ver}" + "${_echo_dirname}.source::https://github.com/agentzh/echo-nginx-module/tarball/${_echo_ver}" + "${_upstreamfair_dirname}.source::https://github.com/gnosek/nginx-upstream-fair/tarball/${_upstreamfair_hash}" + "${_authpam_dirname}.tar.gz::https://github.com/stogh/ngx_http_auth_pam_module/archive/v${_authpam_ver}.tar.gz" + "${_pagespeed_dirname}.zip::https://github.com/pagespeed/ngx_pagespeed/archive/v${_pagespeed_ver}-beta.zip" + "psol.tar.gz::https://dl.google.com/dl/page-speed/psol/${_pagespeed_ver}.tar.gz" + "${_accesskey_dirname}.tar.gz::http://wiki.nginx.org/images/5/51/Nginx-accesskey-${_accesskey_ver}.tar.gz" + "${_rtmp_dirname}.zip::https://github.com/arut/nginx-rtmp-module/archive/${_rtmp_ver}.zip" + "${_davext_dirname}.tar.gz::https://github.com/arut/nginx-dav-ext-module/archive/${_davext_ver}.tar.gz" + "${_naxsi_dirname}.tar.gz::https://github.com/nbs-system/naxsi/archive/${_naxsi_ver}.tar.gz" +) + +md5sums=('d56559ed5e8cc0b1c7adbe33f2300c4c' + '845cab784b50f1666bbf89d7435ac7af' + '79031b58828462dec53a9faed9ddb36a' + '6696dc228a567506bca3096b5197c9db' + '572a0f217f845d3592b5ca779066d1c3' + '6d28dfd6cef1f130a1df97d61425798c' + '3d4ec04bbc16c3b555fa20392c1119d1' + '68a1af12d5c1218fb2b3e05ed7ff6f0c' + 'f7dee95dbe8ada5f4d8e9d59ca1f4797' + '439380d1db636049cb201836f46b6243' + '6fe61c5b44b2e338c66e1e33ff7e95ab' + 'ac5e7f485476af70e0ee1c52016cddaf' + 'a5c0fb3af7158297c1457739947b9b0c' + '17f64b7d60f6ae6bef15faaf28ae3db2' + '9f4d11cabbe5cd0c6945a4a89c82bff0' + '9b5304346d5139b1841f5baa01ab0cbe' + 'a81e63cd4cf28eaf0c87d27c44e4c44a' + '2cb502dbda335be4ebd5fed0b3182bae' + '348b50914a1eedaed09a2509621adf43') + +build() { + local _src_dir="${srcdir}/${_pkgname}-${pkgver}" + + mv ngx-fancyindex-* ${_fancyindex_dirname} + mv ngx_cache_purge-* ${_cachepurge_dirname} + mv ngx_slowfs_cache-* ${_slowfscache_dirname} + mv openresty-headers-more-nginx-module-* ${_headersmore_dirname} + mv openresty-echo-nginx-module-* ${_echo_dirname} + mv masterzen-nginx-upload-progress-module-* ${_uploadprogress_dirname} + mv gnosek-nginx-upstream-fair-* ${_upstreamfair_dirname} + mv ngx_http_auth_pam_module-${_authpam_ver} ${_authpam_dirname} + mv ngx_pagespeed-* ${_pagespeed_dirname} + mv psol ${_pagespeed_dirname}/ + mv nginx-accesskey* ${_accesskey_dirname} + mv nginx-rtmp-module* ${_rtmp_dirname} + mv nginx-dav-ext-module* ${_davext_dirname} + mv naxsi* ${_naxsi_dirname} + + cd $_src_dir + + ./configure \ + --prefix="/${_conf_path}" \ + --conf-path="/${_conf_path}/nginx.conf" \ + --sbin-path="/usr/bin/${_pkgname}" \ + --pid-path="${_pid_path}/${_pkgname}.pid" \ + --lock-path=${_pid_path}/${_pkgname}.lock \ + --http-client-body-temp-path=${_tmp_path}/client_body_temp \ + --http-proxy-temp-path=${_tmp_path}/proxy_temp \ + --http-fastcgi-temp-path=${_tmp_path}/fastcgi_temp \ + --http-uwsgi-temp-path=${_tmp_path}/uwsgi_temp \ + --http-scgi-temp-path=${_tmp_path}scgi_temp \ + --http-log-path=${_log_path}/access.log \ + --error-log-path=${_log_path}/error.log \ + --user=${_user} \ + --group=${_group} \ + --with-debug \ + --with-ipv6 \ + --with-imap \ + --add-module=../${_naxsi_dirname}/naxsi_src/ \ + --with-imap_ssl_module \ + --with-http_ssl_module \ + --with-http_stub_status_module \ + --with-http_dav_module \ + --with-http_gzip_static_module \ + --with-http_realip_module \ + --with-http_addition_module \ + --with-http_xslt_module \ + --with-http_image_filter_module \ + --with-http_sub_module \ + --with-http_flv_module \ + --with-http_mp4_module \ + --with-http_random_index_module \ + --with-http_secure_link_module \ + --with-http_perl_module \ + --with-http_degradation_module \ + --with-http_geoip_module \ + --with-http_spdy_module \ + --with-http_gunzip_module \ + --with-http_auth_request_module \ + --add-module=../${_cachepurge_dirname} \ + --add-module=../${_echo_dirname} \ + --add-module=../${_headersmore_dirname} \ + --add-module=../${_slowfscache_dirname} \ + --add-module=../${_uploadprogress_dirname} \ + --add-module=../${_upstreamfair_dirname} \ + --add-module=../${_fancyindex_dirname} \ + --add-module=../${_authpam_dirname} \ + --add-module=../${_pagespeed_dirname} \ + --add-module=../${_accesskey_dirname} \ + --add-module=../${_rtmp_dirname} \ + --add-module=../${_davext_dirname} + + make +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + make DESTDIR="$pkgdir/" install + + sed -e "s|\<user\s\+\w\+;|user $_user $_group;|g" \ + -e '44s|html|/usr/share/nginx/html|' \ + -e '54s|html|/usr/share/nginx/html|' \ + -i ${pkgdir}/$_conf_path/nginx.conf + + mkdir -p ${pkgdir}/$_conf_path/sites-enabled/ + mkdir -p ${pkgdir}/$_conf_path/sites-available/ + + install -d "${pkgdir}/${_tmp_path}" + install -d "${pkgdir}/${_doc_root}" + + mv "${pkgdir}/${_conf_path}/html/"* "${pkgdir}/${_doc_root}" + rm -rf "${pkgdir}/${_conf_path}/html" + + install -D -m555 "${srcdir}/nginx.sh" "${pkgdir}/etc/rc.d/${_pkgname}" + install -D -m644 "${srcdir}/nginx.logrotate" "${pkgdir}/etc/logrotate.d/${_pkgname}" + install -D -m644 "${srcdir}/nginx.conf" "${pkgdir}/etc/conf.d/${_pkgname}" + install -D -m644 "${srcdir}/nginx.service" "${pkgdir}/usr/lib/systemd/system/nginx.service" + install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" + install -D -m644 "man/nginx.8" "${pkgdir}/usr/share/man/man8/nginx.8" +} + diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 000000000000..1b748a007e17 --- /dev/null +++ b/nginx.conf @@ -0,0 +1 @@ +NGINX_CONFIG=/etc/nginx/nginx.conf diff --git a/nginx.logrotate b/nginx.logrotate new file mode 100644 index 000000000000..f6f7246159d3 --- /dev/null +++ b/nginx.logrotate @@ -0,0 +1,11 @@ +/var/log/nginx/*log +/var/log/nginx/*/*log +{ + daily + missingok + create 640 http log + compress + postrotate + [ ! -f /run/nginx.pid ] || kill -USR1 `cat /run/nginx.pid` + endscript +} diff --git a/nginx.service b/nginx.service new file mode 100644 index 000000000000..c237fd3051da --- /dev/null +++ b/nginx.service @@ -0,0 +1,18 @@ +[Unit] +Description=A high performance web server and a reverse proxy server +After=network.target + +[Service] +Type=forking +PIDFile=/run/nginx.pid +PrivateDevices=yes +SyslogLevel=err + +ExecStartPre=/usr/bin/nginx -t -q -g 'pid /run/nginx.pid; error_log stderr;' +ExecStart=/usr/bin/nginx -g 'pid /run/nginx.pid; error_log stderr;' +ExecReload=/usr/bin/kill -HUP $MAINPID +KillSignal=SIGQUIT +KillMode=mixed + +[Install] +WantedBy=multi-user.target diff --git a/nginx.sh b/nginx.sh new file mode 100644 index 000000000000..472b9c53d7e6 --- /dev/null +++ b/nginx.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +# general config + +NGINX_CONFIG="/etc/nginx/nginx.conf" + +. /etc/conf.d/nginx +. /etc/rc.conf +. /etc/rc.d/functions + +function check_config { + stat_busy "Checking configuration" + /usr/bin/nginx -t -q -c "$NGINX_CONFIG" + if [ $? -ne 0 ]; then + stat_die + else + stat_done + fi +} + +case "$1" in + start) + check_config + $0 careless_start + ;; + careless_start) + stat_busy "Starting Nginx" + if [ -s /run/nginx.pid ]; then + stat_fail + # probably ;) + stat_busy "Nginx is already running" + stat_die + fi + /usr/bin/nginx -c "$NGINX_CONFIG" &>/dev/null + if [ $? -ne 0 ]; then + stat_fail + else + add_daemon nginx + stat_done + fi + ;; + stop) + stat_busy "Stopping Nginx" + NGINX_PID=`cat /run/nginx.pid 2>/dev/null` + kill -QUIT $NGINX_PID &>/dev/null + if [ $? -ne 0 ]; then + stat_fail + else + for i in `seq 1 10`; do + [ -d /proc/$NGINX_PID ] || { stat_done; rm_daemon nginx; exit 0; } + sleep 1 + done + stat_fail + fi + ;; + restart) + check_config + $0 stop + sleep 1 + $0 careless_start + ;; + reload) + check_config + if [ -s /run/nginx.pid ]; then + status "Reloading Nginx Configuration" kill -HUP `cat /run/nginx.pid` + fi + ;; + check) + check_config + ;; + *) + echo "usage: $0 {start|stop|restart|reload|check|careless_start}" +esac |