summaryrefslogtreecommitdiff
path: root/community/nginx
diff options
context:
space:
mode:
Diffstat (limited to 'community/nginx')
-rw-r--r--community/nginx/PKGBUILD26
-rw-r--r--community/nginx/logrotate (renamed from community/nginx/nginx.logrotate)3
-rw-r--r--community/nginx/nginx73
-rw-r--r--community/nginx/nginx.install4
-rw-r--r--community/nginx/rc.d68
5 files changed, 19 insertions, 155 deletions
diff --git a/community/nginx/PKGBUILD b/community/nginx/PKGBUILD
index cd886d655..ec2e6b079 100644
--- a/community/nginx/PKGBUILD
+++ b/community/nginx/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 83352 2013-01-30 09:08:04Z bpiotrowski $
+# $Id: PKGBUILD 88940 2013-04-25 04:37:43Z bpiotrowski $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Miroslaw Szot <mss@czlug.icis.pcz.pl>
@@ -7,7 +7,7 @@ _cfgdir=/etc/nginx
_tmpdir=/var/lib/nginx
pkgname=nginx
-pkgver=1.2.6
+pkgver=1.4.0
pkgrel=2
pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server'
arch=('i686' 'x86_64' 'mips64el')
@@ -27,13 +27,11 @@ backup=(${_cfgdir:1}/fastcgi.conf
${_cfgdir:1}/win-utf
etc/logrotate.d/nginx)
source=(http://nginx.org/download/nginx-$pkgver.tar.gz
- rc.d
service
- nginx.logrotate)
-md5sums=('1350d26eb9b66364d9143fb3c4366ab6'
- 'f62c7c9b5a53471d4666a4c49ad363fb'
- '62d494d23aef31d0b867161f9fffa6eb'
- 'b38744739022876554a0444d92e6603b')
+ logrotate)
+sha256sums=('84aeb7a131fccff036dc80283dd98c989d2844eb84359cfe7c4863475de923a9'
+ '77da8ce4d8378048606a25e09270ee187d6b226ee750b6cb4313af5549f5156a'
+ '9523a1fdd5eb61bf62f3049f6ee088b198e36d5edcce2d9b08bbeb2930aa5a16')
build() {
cd "$srcdir"/$pkgname-$pkgver
@@ -57,8 +55,10 @@ build() {
--with-file-aio \
--with-http_dav_module \
--with-http_geoip_module \
+ --with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_realip_module \
+ --with-http_spdy_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--add-module=/usr/lib/passenger/ext/nginx \
@@ -80,9 +80,6 @@ package() {
cd "$srcdir"/$pkgname-$pkgver
make DESTDIR="$pkgdir" install
- install -d "$pkgdir"/etc/logrotate.d
- install -m644 "$srcdir"/nginx.logrotate "$pkgdir"/etc/logrotate.d/nginx
-
sed -e 's|\<user\s\+\w\+;|user html;|g' \
-e '44s|html|/usr/share/nginx/html|' \
-e '54s|html|/usr/share/nginx/html|' \
@@ -92,11 +89,14 @@ package() {
install -d "$pkgdir"/$_tmpdir
install -dm700 "$pkgdir"/$_tmpdir/proxy
+ chmod 750 "$pkgdir"/var/log/nginx
+ chown http:log "$pkgdir"/var/log/nginx
+
install -d "$pkgdir"/usr/share/nginx
mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx
- install -D -m755 "$srcdir"/rc.d "$pkgdir"/etc/rc.d/nginx
+ install -Dm644 "$srcdir"/logrotate "$pkgdir"/etc/logrotate.d/nginx
install -Dm644 "$srcdir"/service "$pkgdir"/usr/lib/systemd/system/nginx.service
- install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/nginx/LICENSE
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/nginx/LICENSE
rm -rf "$pkgdir"/var/run
}
diff --git a/community/nginx/nginx.logrotate b/community/nginx/logrotate
index d490d5d9b..3d082bcf8 100644
--- a/community/nginx/nginx.logrotate
+++ b/community/nginx/logrotate
@@ -1,5 +1,6 @@
-/var/log/nginx/*.log {
+/var/log/nginx/*log {
missingok
+ create 640 http log
sharedscripts
compress
postrotate
diff --git a/community/nginx/nginx b/community/nginx/nginx
deleted file mode 100644
index 9de10e99a..000000000
--- a/community/nginx/nginx
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/bash
-
-# general config
-
-NGINX_CONFIG="/etc/nginx/conf/nginx.conf"
-
-. /etc/conf.d/nginx
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-function check_config {
- stat_busy "Checking configuration"
- /usr/sbin/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 /var/run/nginx.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"
- NGINX_PID=`cat /var/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 /var/run/nginx.pid ]; then
- status "Reloading Nginx Configuration" kill -HUP `cat /var/run/nginx.pid`
- fi
- ;;
- check)
- check_config
- ;;
- *)
- echo "usage: $0 {start|stop|restart|reload|check|careless_start}"
-esac
diff --git a/community/nginx/nginx.install b/community/nginx/nginx.install
index b31ee41d7..0daccc639 100644
--- a/community/nginx/nginx.install
+++ b/community/nginx/nginx.install
@@ -1,4 +1,8 @@
post_upgrade() {
+ if [[ $(vercmp $2 1.2.7-4) -le 0 ]]; then
+ chmod 750 var/log/nginx
+ chown http:log var/log/nginx
+ fi
if [[ $(vercmp $2 1.2.1-2) -le 0 ]]; then
echo " >>> Since 1.2.1-2 several changes has been made in package:"
echo " - *.conf files have been moved to /etc/nginx"
diff --git a/community/nginx/rc.d b/community/nginx/rc.d
deleted file mode 100644
index eb9031e81..000000000
--- a/community/nginx/rc.d
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-function check_config {
- stat_busy "Checking nginx configuration"
- /usr/sbin/nginx -t -q -c /etc/nginx/nginx.conf
- 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 /var/run/nginx.pid ]; then
- stat_fail
- # probably ;)
- stat_busy "Nginx is already running"
- stat_die
- fi
- /usr/sbin/nginx -c /etc/nginx/nginx.conf &>/dev/null
- if [ $? -ne 0 ]; then
- stat_fail
- else
- add_daemon nginx
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping nginx"
- PID=$(cat /var/run/nginx.pid)
- kill -QUIT $PID &>/dev/null
- if [ $? -ne 0 ]; then
- stat_fail
- else
- for i in {1..10}; do
- [ -d /proc/$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 /var/run/nginx.pid ]; then
- status "Reloading nginx configuration" kill -HUP $(cat /var/run/nginx.pid)
- fi
- ;;
- check)
- check_config
- ;;
- *)
- echo "usage: $0 {start|stop|restart|reload|check|careless_start}"
-esac