summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorpetRUShka2015-07-01 17:33:06 +0300
committerpetRUShka2015-07-01 17:33:06 +0300
commit2b0499a26ca670ecb62a37726e906019c65b8b3f (patch)
tree55511ef80458a6748516fb5ba62326e07401c6ce
downloadaur-nginx-passenger-mod-auth-kerb-git.tar.gz
Initial import
-rw-r--r--.SRCINFO39
-rw-r--r--PKGBUILD122
-rw-r--r--nginx-passenger-mod-auth-kerb-git.install23
-rw-r--r--nginx.conf2
-rw-r--r--nginx.logrotate7
-rw-r--r--nginx.sh76
6 files changed, 269 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..dd8614ba158b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,39 @@
+pkgbase = nginx-passenger-mod-auth-kerb-git
+ pkgdesc = lightweight HTTP server and IMAP/POP3 proxy server with Kerberos and Passenger support
+ pkgver = 20120130
+ pkgrel = 5
+ url = https://github.com/fintler/nginx-mod-auth-kerb
+ install = nginx-passenger-mod-auth-kerb-git.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = rubygems
+ depends = pcre
+ depends = zlib
+ depends = openssl
+ depends = ruby
+ depends = heimdal
+ depends = spnegohelp-git
+ provides = nginx
+ conflicts = nginx
+ noextract = passenger-3.0.11.gem
+ 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_params
+ backup = etc/logrotate.d/nginx
+ source = http://nginx.org/download/nginx-1.1.14.tar.gz
+ source = nginx.sh
+ source = nginx.conf
+ source = nginx.logrotate
+ source = http://gems.rubyforge.org/gems/passenger-3.0.11.gem
+ md5sums = 16d523e395778ef35b49a2fa6ad18af0
+ md5sums = 70b39280671d3cee700bea3883852d32
+ md5sums = 323a91c795f509d50cff07e526cc127f
+ md5sums = e01e6f679c5c626e909f01687a2d37d4
+ md5sums = c0cafef2c5ba522310602f451ea4c941
+
+pkgname = nginx-passenger-mod-auth-kerb-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..08000f0f3039
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,122 @@
+pkgname=nginx-passenger-mod-auth-kerb-git
+_pkgname="nginx"
+_doc_root="/srv/http/${_pkgname}"
+_sysconf_path="etc"
+_conf_path="${_sysconf_path}/${_pkgname}"
+_tmp_path="/var/run/${_pkgname}"
+_log_path="/var/log/${_pkgname}"
+_user="http"
+_group="http"
+_gemname=passenger
+_nginx_pkgver=1.1.14
+_passenger_pkgver=3.0.11
+pkgver=20120130
+pkgrel=5
+pkgdesc="lightweight HTTP server and IMAP/POP3 proxy server with Kerberos and Passenger support"
+arch=('i686' 'x86_64')
+depends=('pcre' 'zlib' 'openssl' 'ruby' 'heimdal' 'spnegohelp-git')
+makedepends=('rubygems')
+url="https://github.com/fintler/nginx-mod-auth-kerb"
+license=('custom')
+conflicts=('nginx')
+provides=('nginx')
+noextract=($_gemname-$_passenger_pkgver.gem)
+backup=("${_conf_path#/}/nginx.conf"
+ "${_conf_path#/}/koi-win"
+ "${_conf_path#/}/koi-utf"
+ "${_conf_path#/}/win-utf"
+ "${_conf_path#/}/mime.types"
+ "${_conf_path#/}/fastcgi_params"
+ "etc/logrotate.d/nginx")
+source=("http://nginx.org/download/nginx-${_nginx_pkgver}.tar.gz"
+ "nginx.sh"
+ "nginx.conf"
+ "nginx.logrotate"
+ http://gems.rubyforge.org/gems/$_gemname-$_passenger_pkgver.gem)
+md5sums=('16d523e395778ef35b49a2fa6ad18af0'
+ '70b39280671d3cee700bea3883852d32'
+ '323a91c795f509d50cff07e526cc127f'
+ 'e01e6f679c5c626e909f01687a2d37d4'
+ 'c0cafef2c5ba522310602f451ea4c941')
+install=nginx-passenger-mod-auth-kerb-git.install
+
+_gitroot="https://github.com/fintler/nginx-mod-auth-kerb.git"
+_gitname="nginx-mod-auth-kerb"
+
+build() {
+ cd ${srcdir}
+ msg "Connecting to GIT server...."
+
+ if [ -d ${_gitname}/.git ] ; then
+ cd ${_gitname}
+ git pull origin
+ msg "The local files are updated."
+ else
+ git clone ${_gitroot} ${_gitname}
+ cd ${_gitname}
+ fi
+
+ msg "GIT checkout of nginx-mod-auth-kerb done or server timeout"
+ msg "Starting make..."
+
+ local _nginx_mod_auth_kerb_src=$srcdir/$_gitname
+ local _src_dir="${srcdir}/${_pkgname}-${_nginx_pkgver}"
+ local _build_dir="${_src_dir}/objs"
+ local _gemdir="$(ruby -e'puts Gem.default_dir')"
+
+ cd $srcdir
+ gem install --no-rdoc --no-ri -i "$pkgdir$_gemdir" $_gemname-$_passenger_pkgver.gem
+
+ cd "${_src_dir}"
+ ./configure \
+ --prefix="/${_conf_path}" \
+ --conf-path="/${_conf_path}/${_pkgname}.conf" \
+ --sbin-path="/usr/sbin/${_pkgname}" \
+ --pid-path="${_tmp_path}/${_pkgname}.pid" \
+ --lock-path="/var/lock/${_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-log-path="${_log_path}/access.log" \
+ --error-log-path="${_log_path}/error.log" \
+ --user="${_user}" --group="${_group}" \
+ --with-mail --with-mail_ssl_module \
+ --with-http_ssl_module \
+ --with-http_stub_status_module \
+ --with-file-aio \
+ --with-http_gzip_static_module \
+ --add-module=${_nginx_mod_auth_kerb_src}\
+ --add-module=../../pkg/$_gemdir/gems/passenger-$_passenger_pkgver/ext/nginx
+ #--with-http_perl_module \
+ #--with-ipv6 \
+ #--with-debug \
+ #--with-http_realip_module \
+ #--with-http_addition_module \
+ #--with-http_xslt_module \
+ #--with-http_image_filter_module \
+ #--with-http_geoip_module \
+ #--with-http_sub_module \
+ #--with-http_dav_module \
+ #--with-http_flv_module \
+ #--with-http_random_index_module \
+ #--with-http_secure_link_module \
+ #--with-http_degradation_module \
+
+ make
+ make DESTDIR="${pkgdir}" install
+
+ sed -i'' -e "s#root\s\+\w\+;#root ${_doc_root};#g" "${pkgdir}/etc/${_pkgname}/${_pkgname}.conf"
+
+ install -d "${pkgdir}/${_tmp_path}"
+
+ # move default document root outside server root
+ 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 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
+ install -D -m644 "man/nginx.8" "${pkgdir}/usr/share/man/man8/nginx.8"
+}
diff --git a/nginx-passenger-mod-auth-kerb-git.install b/nginx-passenger-mod-auth-kerb-git.install
new file mode 100644
index 000000000000..28db28e4e132
--- /dev/null
+++ b/nginx-passenger-mod-auth-kerb-git.install
@@ -0,0 +1,23 @@
+post_install() {
+ echo "Sample configuration"
+ echo ""
+ echo "http {"
+ echo " ..."
+ echo " passenger_root /gems/passenger-3.0.11/;"
+ echo " passenger_ruby /usr/bin/ruby;"
+ echo " ..."
+ echo " server {"
+ echo " ..."
+ echo " location /topsecret {"
+ echo " passenger_enabled on;"
+ echo " auth_gss on;"
+ echo " auth_gss_realm LOCALDOMAIN;"
+ echo " auth_gss_keytab /etc/krb5.keytab;"
+ echo " auth_gss_service_name HTTP;"
+ echo " root /www/rails_app/public;"
+ echo " }"
+ echo " ..."
+ echo " }"
+ echo "}"
+}
+#vim:set ts=2 sw=2 et:
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 000000000000..b24485ada76e
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,2 @@
+NGINX_CONF="/etc/nginx/nginx.conf"
+
diff --git a/nginx.logrotate b/nginx.logrotate
new file mode 100644
index 000000000000..31499544e6af
--- /dev/null
+++ b/nginx.logrotate
@@ -0,0 +1,7 @@
+/var/log/nginx/*log {
+ create 640 http log
+ compress
+ postrotate
+ nginx -s reopen
+ endscript
+}
diff --git a/nginx.sh b/nginx.sh
new file mode 100644
index 000000000000..be52bd9d4392
--- /dev/null
+++ b/nginx.sh
@@ -0,0 +1,76 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/nginx
+
+PID="/var/run/nginx/nginx.pid"
+[ -z "$NGINX_CONFIG" ] && NGINX_CONFIG="/etc/nginx/nginx.conf"
+
+function check_config {
+ stat_busy "Checking configuration"
+ /usr/sbin/nginx -q -t -c "$NGINX_CONFIG"
+ if [ $? -ne 0 ]; then
+ stat_die
+ else
+ stat_done
+ fi
+}
+
+case "$1" in
+ start)
+ [ "$_nocheck" ] && check_config
+ stat_busy "Starting Nginx"
+ if [ -s "$PID" ]; then
+ stat_fail
+ # probably ;)
+ stat_busy "Nginx is already running"
+ stat_die
+ fi
+ /usr/sbin/nginx -c "$NGINX_CONFIG" &>/dev/null
+ if [ $? -ne 0 ]; then
+ stat_fail
+ else
+ add_daemon nginx
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Nginx"
+ kill -QUIT `cat "$PID"` &>/dev/null
+ if [ $? -ne 0 ]; then
+ stat_fail
+ else
+ rm_daemon nginx
+ stat_done
+ fi
+ ;;
+ restart)
+ check_config
+ $0 stop
+ sleep 1
+ _nocheck=1
+ $0 start
+ ;;
+ reload)
+ check_config
+ if [ -s "$PID" ]; then
+ status "Reloading Nginx Configuration" kill -HUP `cat "$PID"`
+ fi
+ ;;
+ upgrade)
+ check_config
+ if [ -s "$PID" ]; then
+ status "Upgrading Nginx" kill -USR2 `cat "$PID"`
+ fi
+ sleep 1
+ if [ -f "${PID}.oldbin" ]; then
+ status "Stopping old Nginx" kill -QUIT `cat "${PID}.oldbin"`
+ fi
+ ;;
+ check)
+ check_config
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart|reload|upgrade|check}"
+esac