diff options
author | Leo P | 2015-12-01 14:04:37 -0500 |
---|---|---|
committer | Leo P | 2015-12-01 14:04:37 -0500 |
commit | 62c687af52180967f388a628837587682ff438d0 (patch) | |
tree | bdac601c80ce4f28da4958272e7dead7acb0010c | |
download | aur-62c687af52180967f388a628837587682ff438d0.tar.gz |
try out nchan
-rw-r--r-- | .SRCINFO | 39 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 120 | ||||
-rw-r--r-- | nginx.conf | 1 | ||||
-rw-r--r-- | nginx.logrotate | 11 | ||||
-rw-r--r-- | nginx.service | 18 |
6 files changed, 194 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..eae8f63879e4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,39 @@ +pkgbase = nginx-nchan-git + pkgdesc = Nginx + Nchan - a flexible pub/sub server (git version) + pkgver = 1.8.0.nchan.1359 + pkgrel = 1 + url = https://nchan.slact.net + arch = i686 + arch = x86_64 + license = custom + depends = pcre + depends = zlib + depends = openssl + provides = nginx + conflicts = nginx + conflicts = nginx-unstable + conflicts = nginx-svn + conflicts = nginx-devel + backup = etc/nginx/conf/nginx.conf + backup = etc/nginx/conf/koi-win + backup = etc/nginx/conf/koi-utf + backup = etc/nginx/conf/win-utf + backup = etc/nginx/conf/mime.types + backup = etc/nginx/conf/fastcgi.conf + backup = etc/nginx/conf/fastcgi_params + backup = etc/nginx/conf/scgi_params + backup = etc/nginx/conf/uwsgi_params + backup = etc/logrotate.d/nginx + source = http://nginx.org/download/nginx-1.8.0.tar.gz + source = nginx.conf + source = nginx.logrotate + source = nginx.service + source = git+https://github.com/slact/nchan.git + md5sums = 3ca4a37931e9fa301964b8ce889da8cb + md5sums = 845cab784b50f1666bbf89d7435ac7af + md5sums = 79031b58828462dec53a9faed9ddb36a + md5sums = 6696dc228a567506bca3096b5197c9db + md5sums = SKIP + +pkgname = nginx-nchan-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0c456f46045f --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +pkg/ +src/ +nchan/ +*.tar.gz +*.pkg.*
\ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8ddf3d9d2c7c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,120 @@ +#!/bin/zsh +_nginx_ver_latest=1.9.5 +_nginx_ver_stable=1.8.0 + +_nginx_ver=$_nginx_ver_stable +_pkgname=nginx + +_user="http" +_group="http" +_doc_root="/usr/share/${_pkgname}/http" +_sysconf_path="etc" +_conf_path="${_sysconf_path}/${_pkgname}" +_tmp_path="/tmp/" +_pid_path="/run" +_lock_path="/var/lock" +_access_log="/dev/stdout" +_error_log="errors.log" + +pkgver() { + pushd ${startdir}/nchan > /dev/null + _nchan_rev=$(git rev-list --count HEAD) + popd > /dev/null + echo "${_nginx_ver}.nchan${_pushmodule_ver}.${_nchan_rev}" +} + + +pkgname=nginx-nchan-git +pkgver=1.8.0.nchan.1359 +pkgrel=1 +pkgdesc="Nginx + Nchan - a flexible pub/sub server (git version)" +arch=('i686' 'x86_64') + + +depends=('pcre' 'zlib' 'openssl') +url="https://nchan.slact.net" +license=('custom') +conflicts=('nginx' 'nginx-unstable' 'nginx-svn' 'nginx-devel' ) +provides=('nginx') +backup=("${_conf_path}/conf/nginx.conf" + "${_conf_path}/conf/koi-win" + "${_conf_path}/conf/koi-utf" + "${_conf_path}/conf/win-utf" + "${_conf_path}/conf/mime.types" + "${_conf_path}/conf/fastcgi.conf" + "${_conf_path}/conf/fastcgi_params" + "${_conf_path}/conf/scgi_params" + "${_conf_path}/conf/uwsgi_params" + "etc/logrotate.d/nginx") +_user=http +_group=http + +source=("http://nginx.org/download/nginx-${_nginx_ver}.tar.gz" + "nginx.conf" + "nginx.logrotate" + "nginx.service" + "git+https://github.com/slact/nchan.git" + ) + +md5sums=('3ca4a37931e9fa301964b8ce889da8cb' + '845cab784b50f1666bbf89d7435ac7af' + '79031b58828462dec53a9faed9ddb36a' + '6696dc228a567506bca3096b5197c9db' + 'SKIP') + +build() { + local _src_dir="${srcdir}/nginx-$_nginx_ver" + local _build_dir="${_src_dir}/objs" + cd $_src_dir + + CONFIGURE=( + --prefix=/${_conf_path} + --sbin-path=/usr/bin/nginx + --pid-path=${_pid_path}/nginx.pid + --lock-path=${_pid_path}/nginx.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-http_ssl_module + --with-http_stub_status_module + --with-http_dav_module + --with-http_gzip_static_module + --with-http_realip_module + --with-http_sub_module + --with-http_flv_module + --with-http_mp4_module + --with-http_secure_link_module + --with-debug + --add-module="${srcdir}/nchan") + + ./configure ${CONFIGURE[@]} + make +} + +package() { + cd "${srcdir}/nginx-${_nginx_ver}" + make DESTDIR="$pkgdir/" install >/dev/null + + sed -i -e "s/\<user\s\+\w\+;/user $_user;/g" $pkgdir/$_conf_path/conf/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 -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}/lib/systemd/system/nginx.service" + install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/nginx/LICENSE" + +} 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 |