[Frugalware-darcs] frugalware-current: nginx-0.5.24-1-i686

voroskoi voroskoi at frugalware.org
Thu Jun 7 10:57:02 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=frugalware-current;a=darcs_commitdiff;h=20070607084748-dd049-356db4cae31bb479b5e553d6a9549983654f662f.gz;

[nginx-0.5.24-1-i686
voroskoi <voroskoi at frugalware.org>**20070607084748
 new package
] {
adddir ./source/network-extra/nginx
addfile ./source/network-extra/nginx/FrugalBuild
hunk ./source/network-extra/nginx/FrugalBuild 1
+# Compiling Time: 0.30 SBU
+# Maintainer: voroskoi <voroskoi at frugalware.org>
+
+pkgname=3Dnginx
+pkgver=3D0.5.24
+pkgrel=3D1
+pkgdesc=3D"[engine x] is a HTTP server and mail proxy server."
+url=3D"http://nginx.net/"
+license=3D"BSD"
+depends=3D('glibc' 'pcre' 'openssl' 'zlib')
+groups=3D('network-extra')
+archs=3D('i686' 'x86_64')
+provides=3D('httpd')
+backup=3D(etc/$pkgname/$pkgname.conf)
+up2date=3D"lynx -dump $url |Flasttar"
+source=3D(http://sysoev.ru/nginx/nginx-$pkgver.tar.gz rc.$pkgname nginx.lo=
grotate \
+	nginx-install.patch)
+
+build() {
+	Fpatchall
+	Fmake --prefix=3D$Fsysconfdir/$pkgname \
+		--sbin-path=3D$Fprefix/sbin/nginx \
+		--pid-path=3D$Flocalstatedir/run/$pkgname.pid \
+		--http-log-path=3D$Flocalstatedir/log/$pkgname/access.log \
+		--error-log-path=3D$Flocalstatedir/log/$pkgname/error.log \
+		--lock-path=3D$Flocalstatedir/lock/nginx.lock \
+		--http-client-body-temp-path=3D$Flocalstatedir/spool/$pkgname/client_bod=
y_temp \
+		--http-proxy-temp-path=3D$Flocalstatedir/spool/$pkgname/proxy_temp \
+		--http-fastcgi-temp-path=3D$Flocalstatedir/spool/$pkgname/fastcgi_temp \
+		--with-rtsig_module \
+		--with-select_module \
+		--with-poll_module \
+		--with-http_ssl_module \
+		--with-http_realip_module \
+		--with-http_addition_module \
+		--with-http_sub_module \
+		--with-http_dav_module \
+		--with-http_flv_module \
+		--with-http_stub_status_module \
+		--with-mail --with-mail_ssl_module
+	Fmakeinstall DESTDIR=3D$Fdestdir
+	Ffile $pkgname.logrotate $Fsysconfdir/logrotate.d/$pkgname
+
+	# does not start without it
+	Fmkdir $Flocalstatedir/spool/$pkgname
+
+	# fix nginx's home dir
+	Fmkdir $Flocalstatedir/www
+	Fmv $Fsysconfdir/$pkgname/html $Flocalstatedir/www/$pkgname
+	Fln $Flocalstatedir/www/$pkgname $Fsysconfdir/$pkgname/html
+}
+sha1sums=3D('e950b7a6bd9e6d8a90f84b67d99488b2a97f8165'\
+          'e8cc09710ba365eb932d1710f4aac629e49452ff'\
+          'da58d8a74dbb081c3dfb69317999e10f1ebf991e'\
+          '3a4cc4564ce610400e012d7c391107f33a258f1e')
+
+# optimization OK
addfile ./source/network-extra/nginx/nginx-install.patch
hunk ./source/network-extra/nginx/nginx-install.patch 1
+--- auto/install-orig	2006-12-16 13:31:19.000000000 +0100
++++ auto/install	2006-12-16 13:32:47.000000000 +0100
+@@ -7,7 +7,7 @@
+     cat << END                                                >> $NGX_MAK=
EFILE
+ =

+ install_perl_modules:
+-	cd $NGX_OBJS/src/http/modules/perl && make install
++	cd $NGX_OBJS/src/http/modules/perl && make DESTDIR=3D\$(DESTDIR) install
+ END
+ =

+     NGX_INSTALL_PERL_MODULES=3Dinstall_perl_modules
+@@ -19,42 +19,41 @@
+ =

+ install:	$NGX_OBJS${ngx_dirsep}nginx${ngx_binext}	\
+ 		$NGX_INSTALL_PERL_MODULES
+-	test -d '$NGX_PREFIX' || mkdir -p '$NGX_PREFIX'
++	test -d '\$(DESTDIR)/$NGX_PREFIX' || mkdir -p '\$(DESTDIR)/$NGX_PREFIX'
+ =

+-	test -d '`dirname "$NGX_SBIN_PATH"`' \
+-		|| mkdir -p '`dirname "$NGX_SBIN_PATH"`'
+-	test ! -f '$NGX_SBIN_PATH' || mv '$NGX_SBIN_PATH' '$NGX_SBIN_PATH.old'
+-	cp $NGX_OBJS/nginx '$NGX_SBIN_PATH'
++	test -d '\$(DESTDIR)/`dirname "$NGX_SBIN_PATH"`' \
++		|| mkdir -p '\$(DESTDIR)/`dirname "$NGX_SBIN_PATH"`'
++	test ! -f '\$(DESTDIR)/$NGX_SBIN_PATH' || mv '\$(DESTDIR)/$NGX_SBIN_PATH=
' '\$(DESTDIR)/$NGX_SBIN_PATH.old'
++	cp $NGX_OBJS/nginx '\$(DESTDIR)/$NGX_SBIN_PATH'
+ =

+-	test -d '`dirname "$NGX_CONF_PATH"`' \
+-		|| mkdir -p '`dirname "$NGX_CONF_PATH"`'
++	test -d '\$(DESTDIR)/`dirname "$NGX_CONF_PATH"`' \
++		|| mkdir -p '\$(DESTDIR)/`dirname "$NGX_CONF_PATH"`'
+ =

+-	cp conf/koi-win '`dirname "$NGX_CONF_PATH"`'
+-	cp conf/koi-utf '`dirname "$NGX_CONF_PATH"`'
+-	cp conf/win-utf '`dirname "$NGX_CONF_PATH"`'
++	cp conf/koi-win '\$(DESTDIR)/`dirname "$NGX_CONF_PATH"`'
++	cp conf/koi-utf '\$(DESTDIR)/`dirname "$NGX_CONF_PATH"`'
++	cp conf/win-utf '\$(DESTDIR)/`dirname "$NGX_CONF_PATH"`'
++	cp conf/fastcgi_params '\$(DESTDIR)/`dirname "$NGX_CONF_PATH"`'
+ =

+-	test -f '`dirname "$NGX_CONF_PATH"`/mime.types' || \
+-		cp conf/mime.types '`dirname "$NGX_CONF_PATH"`/mime.types'
+-	cp conf/mime.types '`dirname "$NGX_CONF_PATH"`/mime.types.default'
++	test -f '\$(DESTDIR)/`dirname "$NGX_CONF_PATH"`/mime.types' || \
++		cp conf/mime.types '\$(DESTDIR)/`dirname "$NGX_CONF_PATH"`/mime.types'
+ =

+-	test -f '$NGX_CONF_PATH' || cp conf/nginx.conf '$NGX_CONF_PATH'
+-	cp conf/nginx.conf '`dirname "$NGX_CONF_PATH"`/nginx.conf.default'
++	test -f '\$(DESTDIR)/$NGX_CONF_PATH' || cp conf/nginx.conf '\$(DESTDIR)/=
$NGX_CONF_PATH'
+ =

+-	test -d '`dirname "$NGX_PID_PATH"`' \
+-		|| mkdir -p '`dirname "$NGX_PID_PATH"`'
++	test -d '\$(DESTDIR)/`dirname "$NGX_PID_PATH"`' \
++		|| mkdir -p '\$(DESTDIR)/`dirname "$NGX_PID_PATH"`'
+ =

+-	test -d '`dirname "$NGX_HTTP_LOG_PATH"`' || \
+-		mkdir -p '`dirname "$NGX_HTTP_LOG_PATH"`'
++	test -d '\$(DESTDIR)/`dirname "$NGX_HTTP_LOG_PATH"`' || \
++		mkdir -p '\$(DESTDIR)/`dirname "$NGX_HTTP_LOG_PATH"`'
+ =

+-	test -d '$NGX_PREFIX/html' || cp -r html '$NGX_PREFIX'
++	test -d '\$(DESTDIR)/$NGX_PREFIX/html' || cp -r html '\$(DESTDIR)/$NGX_P=
REFIX'
+ END
+ =

+ =

+ if test -n "$NGX_ERROR_LOG_PATH"; then
+     cat << END                                                >> $NGX_MAK=
EFILE
+ =

+-	test -d '`dirname "$NGX_ERROR_LOG_PATH"`' || \
+-		mkdir -p '`dirname "$NGX_ERROR_LOG_PATH"`'
++	test -d '\$(DESTDIR)/`dirname "$NGX_ERROR_LOG_PATH"`' || \
++		mkdir -p '\$(DESTDIR)/`dirname "$NGX_ERROR_LOG_PATH"`'
+ END
+ =

+ fi
addfile ./source/network-extra/nginx/nginx.logrotate
hunk ./source/network-extra/nginx/nginx.logrotate 1
+/var/log/ngnix/*log {
+	create 640 root log
+	compress
+	postrotate
+		kill -HUP `cat /var/run/nginx.pid 2>/dev/null` 2> /dev/null || true
+	endscript
+}
addfile ./source/network-extra/nginx/rc.nginx
hunk ./source/network-extra/nginx/rc.nginx 1
+#!/bin/bash
+
+# (c) 2007 Andras Voroskoi <voroskoi at frugalware.org>
+# rc.nginx for FrugalWare
+# distributed under GPL License
+
+# chkconfig: 2345 85 15
+# description: Starts or stops the nginx web and mail server
+
+source /lib/initscripts/functions
+TEXTDOMAIN=3Dnginx
+TEXTDOMAINDIR=3D/lib/initscripts/messages
+
+actions=3D(restart start stop)
+daemon=3D$"nginx daemon"
+
+pid=3D"cat /var/run/nginx.pid 2> /dev/null"
+
+rc_start() {
+	start_msg
+	if [ "$(eval $pid)" =3D=3D "" ]; then
+		/usr/sbin/nginx
+		ok $?
+	else
+		ok 999
+	fi
+}
+
+rc_stop() {
+	stop_msg
+	if [ "$(eval $pid)" !=3D "" ]; then
+		kill "$(eval $pid)"
+		ok $?
+	else
+		ok 999
+	fi
+}
+
+rc_exec $1
}


More information about the Frugalware-darcs mailing list