X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by lists.alpinelinux.org (Postfix) with ESMTP id 1B08C1EFC2C for ; Mon, 1 Nov 2010 15:20:47 +0000 (UTC) Received: by iwn39 with SMTP id 39so7114602iwn.13 for ; Mon, 01 Nov 2010 08:20:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=woCnzbMNj6EmHcpZFQGMr7DSBPugbWHscyaM3/qsvtM=; b=MoB7nDQ5kC8HTIG3mDYowhb7rIkNOzFGi74+0ydU1MwUpvYBXtY4Gek7CnZLiv4HFR votxMWsA/QKlSr2RKPoo98FHbnYeOtGPQbukcROE9HPiA/BDMJ3A35PQC+S7DGIKfSGe W0OPM7+3Zti0Lk6VeTgZOJvxH2hDEGuV5rXIs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=q7cbJF/5LRbj44o2FvssawonFEzAffuVEixjxVcDZAQvqx/bKrg056WB7Lj/5BCVqr xGUZdPaAQT7oP6G8K40Yvl9gEp82aC3Yxcf92/SBhnrn+E54ae8GTXdcdYp37y7aGGMP w/cmW398JF3gz8G19AInyykcAZqAXFhY8xbwI= Received: by 10.231.11.11 with SMTP id r11mr1344903ibr.105.1288624845634; Mon, 01 Nov 2010 08:20:45 -0700 (PDT) Received: from localhost.localdomain (c-71-228-19-24.hsd1.il.comcast.net [71.228.19.24]) by mx.google.com with ESMTPS id gy41sm8566693ibb.5.2010.11.01.08.20.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Nov 2010 08:20:39 -0700 (PDT) From: Cameron Banta To: alpine-devel@lists.alpinelinux.org Cc: Cameron Banta Subject: [alpine-devel] [PATCH] main/nginx New package Date: Mon, 1 Nov 2010 15:20:08 +0000 Message-Id: <1288624808-1532-1-git-send-email-cbanta@gmail.com> X-Mailer: git-send-email 1.7.3.2 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- main/nginx/APKBUILD | 58 ++++++++++++++++++++++++++++++++++++++++++++ main/nginx/nginx.confd | 7 +++++ main/nginx/nginx.initd | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 0 deletions(-) create mode 100644 main/nginx/APKBUILD create mode 100644 main/nginx/nginx.confd create mode 100644 main/nginx/nginx.initd diff --git a/main/nginx/APKBUILD b/main/nginx/APKBUILD new file mode 100644 index 0000000..b35beab --- /dev/null +++ b/main/nginx/APKBUILD @@ -0,0 +1,58 @@ +# Contributor: Cameron Banta +# Maintainer: Cameron Banta +pkgname=nginx +pkgver=0.8.53 +pkgrel=0 +pkgdesc="nginx [engine x] is a HTTP and reverse proxy server" +url="nginx.org" +license="Custom" +depends= +makedepends="pcre-dev openssl-dev libcrypto1.0 zlib-dev" +#install="$pkgname.pre-install $pkgname.post-install" +install= +subpackages= +source="http://nginx.org/download/$pkgname-$pkgver.tar.gz + nginx.initd + nginx.confd + $install + " + +# append extra dependencies to -dev subpackage +# remove if not used. +# depends_dev="somepackage-dev" + +_builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + cd "$_builddir" + # apply patches here +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --conf-path=/etc/$pkgname/$pkgname.conf \ + --pid-path=/var/run/$pkgname.pid \ + --lock-path=/var/run/$pkgname.lock \ + --error-log-path=/var/log/$pkgname/error.log \ + --http-log-path=/var/log/$pkgname/access.log \ + --with-http_ssl_module \ + --with-http_gzip_static_module \ + --http-client-body-temp-path=/tmp/$pkgname/client-body \ + --http-proxy-temp-path=/tmp/$pkgname/proxy \ + --http-fastcgi-temp-path=/tmp/$pkgname/fastcgi \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install + + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname +} + +md5sums="717eaea1b34e8663849f64b9aa05a9da nginx-0.8.53.tar.gz +17e4af92572333c32fed04e2e0fc9b7e nginx.initd +cbcac88f5b728b1441891947a4babbcb nginx.confd" diff --git a/main/nginx/nginx.confd b/main/nginx/nginx.confd new file mode 100644 index 0000000..486252b --- /dev/null +++ b/main/nginx/nginx.confd @@ -0,0 +1,7 @@ +# Sample conf.d file for alpine linux + +# +# Specify daemon options here. +# + +sample_opts="" diff --git a/main/nginx/nginx.initd b/main/nginx/nginx.initd new file mode 100644 index 0000000..0464f5c --- /dev/null +++ b/main/nginx/nginx.initd @@ -0,0 +1,62 @@ +#! /bin/sh + +### BEGIN INIT INFO +# Provides: nginx +# Required-Start: $all +# Required-Stop: $all +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: starts the nginx web server +# Description: starts nginx using start-stop-daemon +### END INIT INFO + +PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/nginx +NAME=nginx +DESC=nginx + +test -x $DAEMON || exit 0 + +# Include nginx defaults if available +if [ -f /etc/conf.d/nginx ] ; then + . /etc/conf.d/nginx +fi + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile /var/run/nginx.pid \ + --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/nginx.pid \ + --exec $DAEMON + echo "$NAME." + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/nginx.pid --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile \ + /var/run/nginx.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + reload) + echo -n "Reloading $DESC configuration: " + start-stop-daemon --stop --signal HUP --quiet --pidfile /var/run/nginx.pid \ + --exec $DAEMON + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 -- 1.7.3.2 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---