diff options
author | Yuriy Ustushenko <yoreek@yahoo.com> | 2012-12-06 09:03:55 +0700 |
---|---|---|
committer | Yuriy Ustushenko <yoreek@yahoo.com> | 2012-12-06 09:03:55 +0700 |
commit | ffec0509acd5b0a4f814e680cb69038f6c42d509 (patch) | |
tree | 88c7c1bb76e37ee9f48dbe50d13cbd9935ac1c89 | |
parent | new ebuild for 1.1.19 version (diff) | |
download | yoreek-ffec0509acd5b0a4f814e680cb69038f6c42d509.tar.gz yoreek-ffec0509acd5b0a4f814e680cb69038f6c42d509.tar.bz2 yoreek-ffec0509acd5b0a4f814e680cb69038f6c42d509.zip |
added new versions
-rw-r--r-- | www-servers/nginx/metadata.xml | 23 | ||||
-rw-r--r-- | www-servers/nginx/nginx-1.0.15-r2.ebuild (renamed from www-servers/nginx/nginx-1.0.15-r1.ebuild) | 6 | ||||
-rw-r--r-- | www-servers/nginx/nginx-1.2.1-r1.ebuild (renamed from www-servers/nginx/nginx-1.0.14-r3.ebuild) | 111 | ||||
-rw-r--r-- | www-servers/nginx/nginx-1.2.5-r1.ebuild (renamed from www-servers/nginx/nginx-1.0.14-r1.ebuild) | 191 | ||||
-rw-r--r-- | www-servers/nginx/nginx-1.3.8-r1.ebuild (renamed from www-servers/nginx/nginx-1.0.14-r2.ebuild) | 191 |
5 files changed, 342 insertions, 180 deletions
diff --git a/www-servers/nginx/metadata.xml b/www-servers/nginx/metadata.xml new file mode 100644 index 0000000..c42faaa --- /dev/null +++ b/www-servers/nginx/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>hollow@gentoo.org</email> + <name>Benedikt Böhm</name> + </maintainer> + <maintainer> + <email>dev-zero@gentoo.org</email> + <name>Tiziano Müller</name> + </maintainer> + <use> + <flag name='aio'>Enables file AIO support</flag> + <flag name='http'>Enable HTTP core support</flag> + <flag name='http-cache'>Enable HTTP cache support</flag> + <flag name='libatomic'>Use libatomic instead of builtin atomic operations</flag> + <flag name='pcre-jit'>Enable JIT for pcre</flag> + <flag name='ssl'>Enable HTTPS module for http. Enable SSL/TLS support for POP3/IMAP/SMTP for mail.</flag> + </use> + <upstream> + <changelog>http://nginx.org/en/CHANGES</changelog> + </upstream> +</pkgmetadata> diff --git a/www-servers/nginx/nginx-1.0.15-r1.ebuild b/www-servers/nginx/nginx-1.0.15-r2.ebuild index b1ab2b3..9c0e515 100644 --- a/www-servers/nginx/nginx-1.0.15-r1.ebuild +++ b/www-servers/nginx/nginx-1.0.15-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.0.15.ebuild,v 1.2 2012/04/14 11:42:50 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.0.15.ebuild,v 1.4 2012/06/06 08:30:35 patrick Exp $ EAPI="4" @@ -56,7 +56,7 @@ HTTP_XSLTPROC_MODULE_P="ngx_xsltproc-${HTTP_XSLTPROC_MODULE_PV}" HTTP_XSLTPROC_MODULE_SHA1="86da76a" HTTP_XSLTPROC_MODULE_URI="https://github.com/yoreek/nginx-xsltproc-module/tarball/v${HTTP_XSLTPROC_MODULE_PV}" -inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic +inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic user DESCRIPTION="Robust, small and high performance http and reverse proxy server" HOMEPAGE="http://nginx.org" @@ -71,7 +71,7 @@ SRC_URI="http://nginx.org/download/${P}.tar.gz LICENSE="as-is BSD BSD-2 GPL-2 MIT" SLOT="0" -KEYWORDS="amd64 ~ppc ~x86 ~x86-fbsd" +KEYWORDS="amd64 ~ppc x86 ~x86-fbsd" NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi diff --git a/www-servers/nginx/nginx-1.0.14-r3.ebuild b/www-servers/nginx/nginx-1.2.1-r1.ebuild index 0d90235..8d3dd02 100644 --- a/www-servers/nginx/nginx-1.0.14-r3.ebuild +++ b/www-servers/nginx/nginx-1.2.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.0.14.ebuild,v 1.2 2012/03/15 18:15:57 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.2.1.ebuild,v 1.5 2012/07/30 06:29:23 hollow Exp $ EAPI="4" @@ -18,15 +18,15 @@ EAPI="4" GENTOO_DEPEND_ON_PERL="no" # http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) -HTTP_UPLOAD_PROGRESS_MODULE_PV="0.8.3" +HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.0" HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" -HTTP_UPLOAD_PROGRESS_MODULE_SHA1="c7c663f" +HTTP_UPLOAD_PROGRESS_MODULE_SHA1="a788dea" HTTP_UPLOAD_PROGRESS_MODULE_URI="http://github.com/masterzen/nginx-upload-progress-module/tarball/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}" # http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license) -HTTP_HEADERS_MORE_MODULE_PV="0.15" +HTTP_HEADERS_MORE_MODULE_PV="0.17rc1" HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" -HTTP_HEADERS_MORE_MODULE_SHA1="137855d" +HTTP_HEADERS_MORE_MODULE_SHA1="3580526" HTTP_HEADERS_MORE_MODULE_URI="http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV}" # http_push (http://pushmodule.slact.net/, MIT license) @@ -35,7 +35,7 @@ HTTP_PUSH_MODULE_P="nginx_http_push_module-${HTTP_PUSH_MODULE_PV}" HTTP_PUSH_MODULE_URI="http://pushmodule.slact.net/downloads/${HTTP_PUSH_MODULE_P}.tar.gz" # http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license) -HTTP_CACHE_PURGE_MODULE_PV="1.4" +HTTP_CACHE_PURGE_MODULE_PV="1.5" HTTP_CACHE_PURGE_MODULE_P="ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/${HTTP_CACHE_PURGE_MODULE_P}.tar.gz" @@ -46,17 +46,25 @@ HTTP_UPLOAD_MODULE_P="nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}" HTTP_UPLOAD_MODULE_URI="http://www.grid.net.ru/nginx/download/${HTTP_UPLOAD_MODULE_P}.tar.gz" # http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) -HTTP_SLOWFS_CACHE_MODULE_PV="1.6" +HTTP_SLOWFS_CACHE_MODULE_PV="1.8" HTTP_SLOWFS_CACHE_MODULE_P="ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz" +# http_fancyindex_module (http://wiki.nginx.org/NgxFancyIndex, BSD license) +HTTP_FANCYINDEX_MODULE_PV="0.3.1" +HTTP_FANCYINDEX_MODULE_PN="ngx-fancyindex" +# gitorious names the tarbell oddly, hence PNPN +HTTP_FANCYINDEX_MODULE_PNPN="ngx-fancyindex-ngx-fancyindex" +HTTP_FANCYINDEX_MODULE_P="${HTTP_FANCYINDEX_MODULE_PN}-${HTTP_FANCYINDEX_MODULE_PV}" +HTTP_FANCYINDEX_MODULE_URI="http://gitorious.org/${HTTP_FANCYINDEX_MODULE_PN}/${HTTP_FANCYINDEX_MODULE_PN}/archive-tarball/v${HTTP_FANCYINDEX_MODULE_PV}" + # http_xsltproc (http://github.com/yoreek/nginx-xsltproc-module/, BSD license) HTTP_XSLTPROC_MODULE_PV="0.10" HTTP_XSLTPROC_MODULE_P="ngx_xsltproc-${HTTP_XSLTPROC_MODULE_PV}" HTTP_XSLTPROC_MODULE_SHA1="86da76a" HTTP_XSLTPROC_MODULE_URI="https://github.com/yoreek/nginx-xsltproc-module/tarball/v${HTTP_XSLTPROC_MODULE_PV}" -inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic +inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic user DESCRIPTION="Robust, small and high performance http and reverse proxy server" HOMEPAGE="http://nginx.org" @@ -67,11 +75,12 @@ SRC_URI="http://nginx.org/download/${P}.tar.gz nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} ) nginx_modules_http_upload? ( ${HTTP_UPLOAD_MODULE_URI} ) nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} ) + nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) nginx_modules_http_xsltproc? ( ${HTTP_XSLTPROC_MODULE_URI} -> ${HTTP_XSLTPROC_MODULE_P}.tar.gz )" LICENSE="as-is BSD BSD-2 GPL-2 MIT" SLOT="0" -KEYWORDS="amd64 ~ppc x86 ~x86-fbsd" +KEYWORDS="amd64 ~ppc x86 ~x86-fbsd ~amd64-linux ~x86-linux" NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi @@ -87,9 +96,10 @@ NGINX_MODULES_3RD=" http_cache_purge http_upload http_slowfs_cache + http_fancyindex http_xsltproc" -IUSE="aio debug +http +http-cache ipv6 libatomic +pcre ssl vim-syntax +nginx_modules_http_xsltproc" +IUSE="aio debug +http +http-cache ipv6 libatomic +pcre pcre-jit selinux ssl vim-syntax +nginx_modules_http_xsltproc" for mod in $NGINX_MODULES_STD; do IUSE="${IUSE} +nginx_modules_http_${mod}" @@ -109,6 +119,8 @@ done CDEPEND=" pcre? ( >=dev-libs/libpcre-4.2 ) + pcre-jit? ( >=dev-libs/libpcre-8.20[jit] ) + selinux? ( sec-policy/selinux-nginx ) ssl? ( dev-libs/openssl ) http-cache? ( userland_GNU? ( dev-libs/openssl ) ) nginx_modules_http_geo? ( dev-libs/geoip ) @@ -124,6 +136,7 @@ DEPEND="${CDEPEND} arm? ( dev-libs/libatomic_ops ) libatomic? ( dev-libs/libatomic_ops )" PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" +REQUIRED_USE="pcre-jit? ( pcre )" pkg_setup() { if use nginx_modules_http_passenger; then @@ -169,7 +182,11 @@ pkg_setup() { } src_prepare() { - sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make + find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die + # We have config protection, don't rename etc files + sed -i 's:.default::' auto/install || die + # remove useless files + sed -i -e '/koi-/d' -e '/win-/d' auto/install || die } src_configure() { @@ -180,6 +197,7 @@ src_configure() { use ipv6 && myconf+=" --with-ipv6" use libatomic && myconf+=" --with-libatomic" use pcre && myconf+=" --with-pcre" + use pcre-jit && myconf+=" --with-pcre-jit" # HTTP modules for mod in $NGINX_MODULES_STD; do @@ -232,6 +250,11 @@ src_configure() { myconf+=" --add-module=${WORKDIR}/${HTTP_SLOWFS_CACHE_MODULE_P}" fi + if use nginx_modules_http_fancyindex; then + http_enabled=1 + myconf+=" --add-module=${WORKDIR}/${HTTP_FANCYINDEX_MODULE_PNPN}" + fi + if use nginx_modules_http_xsltproc; then http_enabled=1 myconf+=" --add-module=${WORKDIR}/yoreek-nginx-xsltproc-module-${HTTP_XSLTPROC_MODULE_SHA1}" @@ -271,55 +294,52 @@ src_configure() { export LANG=C LC_ALL=C tc-export CC + if ! use prefix; then + myconf+=" --user=${PN} --group=${PN}" + fi + ./configure \ - --prefix=/usr \ - --sbin-path=/usr/sbin/nginx \ - --conf-path=/etc/${PN}/${PN}.conf \ - --error-log-path=/var/log/${PN}/error_log \ - --pid-path=/var/run/${PN}.pid \ - --lock-path=/var/lock/nginx.lock \ - --user=${PN} --group=${PN} \ - --with-cc-opt="-I${ROOT}usr/include" \ - --with-ld-opt="-L${ROOT}usr/lib" \ - --http-log-path=/var/log/${PN}/access_log \ - --http-client-body-temp-path=/var/tmp/${PN}/client \ - --http-proxy-temp-path=/var/tmp/${PN}/proxy \ - --http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \ - --http-scgi-temp-path=/var/tmp/${PN}/scgi \ - --http-uwsgi-temp-path=/var/tmp/${PN}/uwsgi \ + --prefix="${EPREFIX}"/usr \ + --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \ + --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \ + --pid-path="${EPREFIX}"/var/run/${PN}.pid \ + --lock-path="${EPREFIX}"/var/lock/nginx.lock \ + --with-cc-opt="-I${EROOT}usr/include" \ + --with-ld-opt="-L${EROOT}usr/lib" \ + --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \ + --http-client-body-temp-path="${EPREFIX}"/var/tmp/${PN}/client \ + --http-proxy-temp-path="${EPREFIX}"/var/tmp/${PN}/proxy \ + --http-fastcgi-temp-path="${EPREFIX}"/var/tmp/${PN}/fastcgi \ + --http-scgi-temp-path="${EPREFIX}"/var/tmp/${PN}/scgi \ + --http-uwsgi-temp-path="${EPREFIX}"/var/tmp/${PN}/uwsgi \ ${myconf} || die "configure failed" } src_compile() { # https://bugs.gentoo.org/286772 export LANG=C LC_ALL=C - emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" || die "emake failed" + emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" } src_install() { - keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi} - keepdir /var/www/localhost/htdocs - - dosbin objs/nginx + emake DESTDIR="${D}" install + cp "${FILESDIR}"/nginx.conf "${ED}"/etc/nginx/nginx.conf || die newinitd "${FILESDIR}"/nginx.initd nginx - - cp "${FILESDIR}"/nginx.conf conf/nginx.conf - rm conf/win-utf conf/koi-win conf/koi-utf - - dodir /etc/${PN} - insinto /etc/${PN} - doins conf/* - doman man/nginx.8 dodoc CHANGES* README + # Keepdir because these are hardcoded above + keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi} + keepdir /var/www/localhost/htdocs + mv "${ED}"/usr/html "${ED}"/var/www/localhost/htdocs || die + # logrotate insinto /etc/logrotate.d newins "${FILESDIR}"/nginx.logrotate nginx if use nginx_modules_http_perl; then cd "${S}"/objs/src/http/modules/perl/ - einstall DESTDIR="${D}" INSTALLDIRS=vendor || die "failed to install perl stuff" + einstall DESTDIR="${D}" INSTALLDIRS=vendor fixlocalpod fi @@ -340,15 +360,20 @@ src_install() { if use nginx_modules_http_slowfs_cache; then docinto ${HTTP_SLOWFS_CACHE_MODULE_P} - dodoc "${WORKDIR}"/${HTTP_SLOWFS_CACHE_MODULE_P}/{CHANGES,README} + dodoc "${WORKDIR}"/${HTTP_SLOWFS_CACHE_MODULE_P}/{CHANGES,README.md} + fi + + if use nginx_modules_http_fancyindex; then + docinto ${HTTP_FANCYINDEX_MODULE_P} + dodoc "${WORKDIR}"/${HTTP_FANCYINDEX_MODULE_PNPN}/README.rst fi } pkg_postinst() { if use ssl; then - if [ ! -f "${ROOT}"/etc/ssl/${PN}/${PN}.key ]; then + if [ ! -f "${EROOT}"/etc/ssl/${PN}/${PN}.key ]; then install_cert /etc/ssl/${PN}/${PN} - chown ${PN}:${PN} "${ROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} + use prefix || chown ${PN}:${PN} "${EROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} fi fi } diff --git a/www-servers/nginx/nginx-1.0.14-r1.ebuild b/www-servers/nginx/nginx-1.2.5-r1.ebuild index de1ae76..46c81c1 100644 --- a/www-servers/nginx/nginx-1.0.14-r1.ebuild +++ b/www-servers/nginx/nginx-1.2.5-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.0.14.ebuild,v 1.2 2012/03/15 18:15:57 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.2.5.ebuild,v 1.3 2012/11/26 13:05:02 ago Exp $ EAPI="4" @@ -17,64 +17,92 @@ EAPI="4" # prevent perl-module from adding automagic perl DEPENDs GENTOO_DEPEND_ON_PERL="no" +# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license) +DEVEL_KIT_MODULE_PV="0.2.17" +DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" +DEVEL_KIT_MODULE_SHA1="bc97eea" +DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/tarball/v${DEVEL_KIT_MODULE_PV}" +DEVEL_KIT_MODULE_WD="${WORKDIR}/simpl-ngx_devel_kit-${DEVEL_KIT_MODULE_SHA1}" + # http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) -HTTP_UPLOAD_PROGRESS_MODULE_PV="0.8.3" -HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" -HTTP_UPLOAD_PROGRESS_MODULE_SHA1="c7c663f" +HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.0" +HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" +HTTP_UPLOAD_PROGRESS_MODULE_SHA1="a788dea" HTTP_UPLOAD_PROGRESS_MODULE_URI="http://github.com/masterzen/nginx-upload-progress-module/tarball/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}" +HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/masterzen-nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_SHA1}" # http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license) -HTTP_HEADERS_MORE_MODULE_PV="0.15" +HTTP_HEADERS_MORE_MODULE_PV="0.17" HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" -HTTP_HEADERS_MORE_MODULE_SHA1="137855d" +HTTP_HEADERS_MORE_MODULE_SHA1="b7c8cfc" HTTP_HEADERS_MORE_MODULE_URI="http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV}" +HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/agentzh-headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_SHA1}" # http_push (http://pushmodule.slact.net/, MIT license) HTTP_PUSH_MODULE_PV="0.692" -HTTP_PUSH_MODULE_P="nginx_http_push_module-${HTTP_PUSH_MODULE_PV}" -HTTP_PUSH_MODULE_URI="http://pushmodule.slact.net/downloads/${HTTP_PUSH_MODULE_P}.tar.gz" +HTTP_PUSH_MODULE_P="ngx_http_push-${HTTP_PUSH_MODULE_PV}" +HTTP_PUSH_MODULE_URI="http://pushmodule.slact.net/downloads/nginx_http_push_module-${HTTP_PUSH_MODULE_PV}.tar.gz" +HTTP_PUSH_MODULE_WD="${WORKDIR}/nginx_http_push_module-${HTTP_PUSH_MODULE_PV}" # http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license) -HTTP_CACHE_PURGE_MODULE_PV="1.4" -HTTP_CACHE_PURGE_MODULE_P="ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" -HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/${HTTP_CACHE_PURGE_MODULE_P}.tar.gz" +HTTP_CACHE_PURGE_MODULE_PV="1.6" +HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" +HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz" +HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" -# HTTP Upload module from Valery Kholodkov -# (http://www.grid.net.ru/nginx/upload.en.html, BSD license) +# http_upload (http://www.grid.net.ru/nginx/upload.en.html, BSD license) HTTP_UPLOAD_MODULE_PV="2.2.0" -HTTP_UPLOAD_MODULE_P="nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}" -HTTP_UPLOAD_MODULE_URI="http://www.grid.net.ru/nginx/download/${HTTP_UPLOAD_MODULE_P}.tar.gz" +HTTP_UPLOAD_MODULE_P="ngx_http_upload-${HTTP_UPLOAD_MODULE_PV}" +HTTP_UPLOAD_MODULE_URI="http://www.grid.net.ru/nginx/download/nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}.tar.gz" +HTTP_UPLOAD_MODULE_WD="${WORKDIR}/nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}" # http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) -HTTP_SLOWFS_CACHE_MODULE_PV="1.6" -HTTP_SLOWFS_CACHE_MODULE_P="ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" -HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz" +HTTP_SLOWFS_CACHE_MODULE_PV="1.9" +HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" +HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz" +HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" + +# http_fancyindex (http://wiki.nginx.org/NgxFancyIndex, BSD license) +HTTP_FANCYINDEX_MODULE_PV="0.3.1" +HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" +HTTP_FANCYINDEX_MODULE_URI="http://gitorious.org/ngx-fancyindex/ngx-fancyindex/archive-tarball/v${HTTP_FANCYINDEX_MODULE_PV}" +HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-ngx-fancyindex" + +# http_lua (https://github.com/chaoslawful/lua-nginx-module, BSD license) +HTTP_LUA_MODULE_PV="0.5.10" +HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}" +HTTP_LUA_MODULE_SHA1="db0bebe" +HTTP_LUA_MODULE_URI="https://github.com/chaoslawful/lua-nginx-module/tarball/v${HTTP_LUA_MODULE_PV}" +HTTP_LUA_MODULE_WD="${WORKDIR}/chaoslawful-lua-nginx-module-${HTTP_LUA_MODULE_SHA1}" # http_xsltproc (http://github.com/yoreek/nginx-xsltproc-module/, BSD license) -HTTP_XSLTPROC_MODULE_PV="0.8" +HTTP_XSLTPROC_MODULE_PV="0.10" HTTP_XSLTPROC_MODULE_P="ngx_xsltproc-${HTTP_XSLTPROC_MODULE_PV}" -HTTP_XSLTPROC_MODULE_SHA1="2cacd6c" +HTTP_XSLTPROC_MODULE_SHA1="86da76a" HTTP_XSLTPROC_MODULE_URI="https://github.com/yoreek/nginx-xsltproc-module/tarball/v${HTTP_XSLTPROC_MODULE_PV}" -inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic +inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic user DESCRIPTION="Robust, small and high performance http and reverse proxy server" HOMEPAGE="http://nginx.org" SRC_URI="http://nginx.org/download/${P}.tar.gz + ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) nginx_modules_http_push? ( ${HTTP_PUSH_MODULE_URI} ) nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} ) nginx_modules_http_upload? ( ${HTTP_UPLOAD_MODULE_URI} ) nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} ) + nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) + nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz ) nginx_modules_http_xsltproc? ( ${HTTP_XSLTPROC_MODULE_URI} -> ${HTTP_XSLTPROC_MODULE_P}.tar.gz )" LICENSE="as-is BSD BSD-2 GPL-2 MIT" SLOT="0" -KEYWORDS="amd64 ~ppc x86 ~x86-fbsd" +KEYWORDS="amd64 ~ppc x86 ~x86-fbsd ~amd64-linux ~x86-linux" NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi -geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi +geo gzip limit_req limit_conn map memcached proxy referer rewrite scgi ssi split_clients upstream_ip_hash userid uwsgi" NGINX_MODULES_OPT="addition dav degradation flv geoip gzip_static image_filter mp4 perl random_index realip secure_link stub_status sub" @@ -87,9 +115,11 @@ NGINX_MODULES_3RD=" http_cache_purge http_upload http_slowfs_cache + http_fancyindex + http_lua http_xsltproc" -IUSE="aio debug +http +http-cache ipv6 libatomic +pcre ssl vim-syntax +nginx_modules_http_xsltproc" +IUSE="aio debug +http +http-cache ipv6 libatomic +pcre pcre-jit selinux ssl vim-syntax +nginx_modules_http_xsltproc" for mod in $NGINX_MODULES_STD; do IUSE="${IUSE} +nginx_modules_http_${mod}" @@ -109,6 +139,8 @@ done CDEPEND=" pcre? ( >=dev-libs/libpcre-4.2 ) + pcre-jit? ( >=dev-libs/libpcre-8.20[jit] ) + selinux? ( sec-policy/selinux-nginx ) ssl? ( dev-libs/openssl ) http-cache? ( userland_GNU? ( dev-libs/openssl ) ) nginx_modules_http_geo? ( dev-libs/geoip ) @@ -118,12 +150,14 @@ CDEPEND=" nginx_modules_http_perl? ( >=dev-lang/perl-5.8 ) nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 ) nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl ) ) - nginx_modules_http_xsltproc? ( dev-libs/libxml2 dev-libs/libxslt dev-libs/icu )" + nginx_modules_http_lua? ( || ( dev-lang/lua dev-lang/luajit ) ) + nginx_modules_http_xsltproc? ( dev-libs/libxml2 dev-libs/libxslt dev-libs/icu dev-libs/libmemcached )" RDEPEND="${CDEPEND}" DEPEND="${CDEPEND} arm? ( dev-libs/libatomic_ops ) libatomic? ( dev-libs/libatomic_ops )" PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" +REQUIRED_USE="pcre-jit? ( pcre )" pkg_setup() { if use nginx_modules_http_passenger; then @@ -169,7 +203,11 @@ pkg_setup() { } src_prepare() { - sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make + find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die + # We have config protection, don't rename etc files + sed -i 's:.default::' auto/install || die + # remove useless files + sed -i -e '/koi-/d' -e '/win-/d' auto/install || die } src_configure() { @@ -180,6 +218,7 @@ src_configure() { use ipv6 && myconf+=" --with-ipv6" use libatomic && myconf+=" --with-libatomic" use pcre && myconf+=" --with-pcre" + use pcre-jit && myconf+=" --with-pcre-jit" # HTTP modules for mod in $NGINX_MODULES_STD; do @@ -204,32 +243,43 @@ src_configure() { # third-party modules if use nginx_modules_http_upload_progress; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/masterzen-nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_SHA1}" + myconf+=" --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD}" fi if use nginx_modules_http_headers_more; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/agentzh-headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_SHA1}" + myconf+=" --add-module=${HTTP_HEADERS_MORE_MODULE_WD}" fi if use nginx_modules_http_push; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/${HTTP_PUSH_MODULE_P}" + myconf+=" --add-module=${HTTP_PUSH_MODULE_WD}" fi if use nginx_modules_http_cache_purge; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/${HTTP_CACHE_PURGE_MODULE_P}" + myconf+=" --add-module=${HTTP_CACHE_PURGE_MODULE_WD}" fi if use nginx_modules_http_upload; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/${HTTP_UPLOAD_MODULE_P}" + myconf+=" --add-module=${HTTP_UPLOAD_MODULE_WD}" fi if use nginx_modules_http_slowfs_cache; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/${HTTP_SLOWFS_CACHE_MODULE_P}" + myconf+=" --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD}" + fi + + if use nginx_modules_http_fancyindex; then + http_enabled=1 + myconf+=" --add-module=${HTTP_FANCYINDEX_MODULE_WD}" + fi + + if use nginx_modules_http_lua; then + http_enabled=1 + myconf+=" --add-module=${DEVEL_KIT_MODULE_WD}" + myconf+=" --add-module=${HTTP_LUA_MODULE_WD}" fi if use nginx_modules_http_xsltproc; then @@ -271,84 +321,91 @@ src_configure() { export LANG=C LC_ALL=C tc-export CC + if ! use prefix; then + myconf+=" --user=${PN} --group=${PN}" + fi + ./configure \ - --prefix=/usr \ - --sbin-path=/usr/sbin/nginx \ - --conf-path=/etc/${PN}/${PN}.conf \ - --error-log-path=/var/log/${PN}/error_log \ - --pid-path=/var/run/${PN}.pid \ - --lock-path=/var/lock/nginx.lock \ - --user=${PN} --group=${PN} \ - --with-cc-opt="-I${ROOT}usr/include" \ - --with-ld-opt="-L${ROOT}usr/lib" \ - --http-log-path=/var/log/${PN}/access_log \ - --http-client-body-temp-path=/var/tmp/${PN}/client \ - --http-proxy-temp-path=/var/tmp/${PN}/proxy \ - --http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \ - --http-scgi-temp-path=/var/tmp/${PN}/scgi \ - --http-uwsgi-temp-path=/var/tmp/${PN}/uwsgi \ + --prefix="${EPREFIX}"/usr \ + --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \ + --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \ + --pid-path="${EPREFIX}"/var/run/${PN}.pid \ + --lock-path="${EPREFIX}"/var/lock/nginx.lock \ + --with-cc-opt="-I${EROOT}usr/include" \ + --with-ld-opt="-L${EROOT}usr/lib" \ + --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \ + --http-client-body-temp-path="${EPREFIX}"/var/tmp/${PN}/client \ + --http-proxy-temp-path="${EPREFIX}"/var/tmp/${PN}/proxy \ + --http-fastcgi-temp-path="${EPREFIX}"/var/tmp/${PN}/fastcgi \ + --http-scgi-temp-path="${EPREFIX}"/var/tmp/${PN}/scgi \ + --http-uwsgi-temp-path="${EPREFIX}"/var/tmp/${PN}/uwsgi \ ${myconf} || die "configure failed" } src_compile() { # https://bugs.gentoo.org/286772 export LANG=C LC_ALL=C - emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" || die "emake failed" + emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" } src_install() { - keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi} - keepdir /var/www/localhost/htdocs - - dosbin objs/nginx + emake DESTDIR="${D}" install + cp "${FILESDIR}"/nginx.conf "${ED}"/etc/nginx/nginx.conf || die newinitd "${FILESDIR}"/nginx.initd nginx - - cp "${FILESDIR}"/nginx.conf conf/nginx.conf - rm conf/win-utf conf/koi-win conf/koi-utf - - dodir /etc/${PN} - insinto /etc/${PN} - doins conf/* - doman man/nginx.8 dodoc CHANGES* README + # Keepdir because these are hardcoded above + keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi} + keepdir /var/www/localhost/htdocs + mv "${ED}"/usr/html "${ED}"/var/www/localhost/htdocs || die + # logrotate insinto /etc/logrotate.d newins "${FILESDIR}"/nginx.logrotate nginx if use nginx_modules_http_perl; then cd "${S}"/objs/src/http/modules/perl/ - einstall DESTDIR="${D}" INSTALLDIRS=vendor || die "failed to install perl stuff" + einstall DESTDIR="${D}" INSTALLDIRS=vendor fixlocalpod fi if use nginx_modules_http_push; then docinto ${HTTP_PUSH_MODULE_P} - dodoc "${WORKDIR}"/${HTTP_PUSH_MODULE_P}/{changelog.txt,protocol.txt,README} + dodoc "${HTTP_PUSH_MODULE_WD}"/{changelog.txt,protocol.txt,README} fi if use nginx_modules_http_cache_purge; then docinto ${HTTP_CACHE_PURGE_MODULE_P} - dodoc "${WORKDIR}"/${HTTP_CACHE_PURGE_MODULE_P}/{CHANGES,README.md,TODO.md} + dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md} fi if use nginx_modules_http_upload; then docinto ${HTTP_UPLOAD_MODULE_P} - dodoc "${WORKDIR}"/${HTTP_UPLOAD_MODULE_P}/{Changelog,README} + dodoc "${HTTP_UPLOAD_MODULE_WD}"/{Changelog,README} fi if use nginx_modules_http_slowfs_cache; then docinto ${HTTP_SLOWFS_CACHE_MODULE_P} - dodoc "${WORKDIR}"/${HTTP_SLOWFS_CACHE_MODULE_P}/{CHANGES,README} + dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md} + fi + + if use nginx_modules_http_fancyindex; then + docinto ${HTTP_FANCYINDEX_MODULE_P} + dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst + fi + + if use nginx_modules_http_lua; then + docinto ${HTTP_LUA_MODULE_P} + dodoc "${HTTP_LUA_MODULE_WD}"/{Changes,README.markdown} fi } pkg_postinst() { if use ssl; then - if [ ! -f "${ROOT}"/etc/ssl/${PN}/${PN}.key ]; then + if [ ! -f "${EROOT}"/etc/ssl/${PN}/${PN}.key ]; then install_cert /etc/ssl/${PN}/${PN} - chown ${PN}:${PN} "${ROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} + use prefix || chown ${PN}:${PN} "${EROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} fi fi } diff --git a/www-servers/nginx/nginx-1.0.14-r2.ebuild b/www-servers/nginx/nginx-1.3.8-r1.ebuild index 43ddd9f..b377ea9 100644 --- a/www-servers/nginx/nginx-1.0.14-r2.ebuild +++ b/www-servers/nginx/nginx-1.3.8-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.0.14.ebuild,v 1.2 2012/03/15 18:15:57 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.3.8.ebuild,v 1.1 2012/11/16 07:13:38 patrick Exp $ EAPI="4" @@ -17,64 +17,92 @@ EAPI="4" # prevent perl-module from adding automagic perl DEPENDs GENTOO_DEPEND_ON_PERL="no" +# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license) +DEVEL_KIT_MODULE_PV="0.2.17" +DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" +DEVEL_KIT_MODULE_SHA1="bc97eea" +DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/tarball/v${DEVEL_KIT_MODULE_PV}" +DEVEL_KIT_MODULE_WD="${WORKDIR}/simpl-ngx_devel_kit-${DEVEL_KIT_MODULE_SHA1}" + # http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) -HTTP_UPLOAD_PROGRESS_MODULE_PV="0.8.3" -HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" -HTTP_UPLOAD_PROGRESS_MODULE_SHA1="c7c663f" +HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.0" +HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" +HTTP_UPLOAD_PROGRESS_MODULE_SHA1="a788dea" HTTP_UPLOAD_PROGRESS_MODULE_URI="http://github.com/masterzen/nginx-upload-progress-module/tarball/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}" +HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/masterzen-nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_SHA1}" # http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license) -HTTP_HEADERS_MORE_MODULE_PV="0.15" +HTTP_HEADERS_MORE_MODULE_PV="0.17" HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" -HTTP_HEADERS_MORE_MODULE_SHA1="137855d" +HTTP_HEADERS_MORE_MODULE_SHA1="b7c8cfc" HTTP_HEADERS_MORE_MODULE_URI="http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV}" +HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/agentzh-headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_SHA1}" # http_push (http://pushmodule.slact.net/, MIT license) HTTP_PUSH_MODULE_PV="0.692" -HTTP_PUSH_MODULE_P="nginx_http_push_module-${HTTP_PUSH_MODULE_PV}" -HTTP_PUSH_MODULE_URI="http://pushmodule.slact.net/downloads/${HTTP_PUSH_MODULE_P}.tar.gz" +HTTP_PUSH_MODULE_P="ngx_http_push-${HTTP_PUSH_MODULE_PV}" +HTTP_PUSH_MODULE_URI="http://pushmodule.slact.net/downloads/nginx_http_push_module-${HTTP_PUSH_MODULE_PV}.tar.gz" +HTTP_PUSH_MODULE_WD="${WORKDIR}/nginx_http_push_module-${HTTP_PUSH_MODULE_PV}" # http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license) -HTTP_CACHE_PURGE_MODULE_PV="1.4" -HTTP_CACHE_PURGE_MODULE_P="ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" -HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/${HTTP_CACHE_PURGE_MODULE_P}.tar.gz" +HTTP_CACHE_PURGE_MODULE_PV="1.6" +HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" +HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz" +HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" -# HTTP Upload module from Valery Kholodkov -# (http://www.grid.net.ru/nginx/upload.en.html, BSD license) +# http_upload (http://www.grid.net.ru/nginx/upload.en.html, BSD license) HTTP_UPLOAD_MODULE_PV="2.2.0" -HTTP_UPLOAD_MODULE_P="nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}" -HTTP_UPLOAD_MODULE_URI="http://www.grid.net.ru/nginx/download/${HTTP_UPLOAD_MODULE_P}.tar.gz" +HTTP_UPLOAD_MODULE_P="ngx_http_upload-${HTTP_UPLOAD_MODULE_PV}" +HTTP_UPLOAD_MODULE_URI="http://www.grid.net.ru/nginx/download/nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}.tar.gz" +HTTP_UPLOAD_MODULE_WD="${WORKDIR}/nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}" # http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) -HTTP_SLOWFS_CACHE_MODULE_PV="1.6" -HTTP_SLOWFS_CACHE_MODULE_P="ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" -HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz" +HTTP_SLOWFS_CACHE_MODULE_PV="1.9" +HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" +HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz" +HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" + +# http_fancyindex (http://wiki.nginx.org/NgxFancyIndex, BSD license) +HTTP_FANCYINDEX_MODULE_PV="0.3.1" +HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" +HTTP_FANCYINDEX_MODULE_URI="http://gitorious.org/ngx-fancyindex/ngx-fancyindex/archive-tarball/v${HTTP_FANCYINDEX_MODULE_PV}" +HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-ngx-fancyindex" + +# http_lua (https://github.com/chaoslawful/lua-nginx-module, BSD license) +HTTP_LUA_MODULE_PV="0.5.10" +HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}" +HTTP_LUA_MODULE_SHA1="db0bebe" +HTTP_LUA_MODULE_URI="https://github.com/chaoslawful/lua-nginx-module/tarball/v${HTTP_LUA_MODULE_PV}" +HTTP_LUA_MODULE_WD="${WORKDIR}/chaoslawful-lua-nginx-module-${HTTP_LUA_MODULE_SHA1}" # http_xsltproc (http://github.com/yoreek/nginx-xsltproc-module/, BSD license) -HTTP_XSLTPROC_MODULE_PV="0.9" +HTTP_XSLTPROC_MODULE_PV="0.10" HTTP_XSLTPROC_MODULE_P="ngx_xsltproc-${HTTP_XSLTPROC_MODULE_PV}" -HTTP_XSLTPROC_MODULE_SHA1="1052ea0" +HTTP_XSLTPROC_MODULE_SHA1="86da76a" HTTP_XSLTPROC_MODULE_URI="https://github.com/yoreek/nginx-xsltproc-module/tarball/v${HTTP_XSLTPROC_MODULE_PV}" -inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic +inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic user DESCRIPTION="Robust, small and high performance http and reverse proxy server" HOMEPAGE="http://nginx.org" SRC_URI="http://nginx.org/download/${P}.tar.gz + ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) nginx_modules_http_push? ( ${HTTP_PUSH_MODULE_URI} ) nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} ) nginx_modules_http_upload? ( ${HTTP_UPLOAD_MODULE_URI} ) nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} ) + nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) + nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz ) nginx_modules_http_xsltproc? ( ${HTTP_XSLTPROC_MODULE_URI} -> ${HTTP_XSLTPROC_MODULE_P}.tar.gz )" LICENSE="as-is BSD BSD-2 GPL-2 MIT" SLOT="0" -KEYWORDS="amd64 ~ppc x86 ~x86-fbsd" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi -geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi +geo gzip limit_req limit_conn map memcached proxy referer rewrite scgi ssi split_clients upstream_ip_hash userid uwsgi" NGINX_MODULES_OPT="addition dav degradation flv geoip gzip_static image_filter mp4 perl random_index realip secure_link stub_status sub" @@ -87,9 +115,11 @@ NGINX_MODULES_3RD=" http_cache_purge http_upload http_slowfs_cache + http_fancyindex + http_lua http_xsltproc" -IUSE="aio debug +http +http-cache ipv6 libatomic +pcre ssl vim-syntax +nginx_modules_http_xsltproc" +IUSE="aio debug +http +http-cache ipv6 libatomic +pcre pcre-jit selinux ssl vim-syntax +nginx_modules_http_xsltproc" for mod in $NGINX_MODULES_STD; do IUSE="${IUSE} +nginx_modules_http_${mod}" @@ -109,6 +139,8 @@ done CDEPEND=" pcre? ( >=dev-libs/libpcre-4.2 ) + pcre-jit? ( >=dev-libs/libpcre-8.20[jit] ) + selinux? ( sec-policy/selinux-nginx ) ssl? ( dev-libs/openssl ) http-cache? ( userland_GNU? ( dev-libs/openssl ) ) nginx_modules_http_geo? ( dev-libs/geoip ) @@ -118,12 +150,14 @@ CDEPEND=" nginx_modules_http_perl? ( >=dev-lang/perl-5.8 ) nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 ) nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl ) ) - nginx_modules_http_xsltproc? ( dev-libs/libxml2 dev-libs/libxslt dev-libs/icu )" + nginx_modules_http_lua? ( || ( dev-lang/lua dev-lang/luajit ) ) + nginx_modules_http_xsltproc? ( dev-libs/libxml2 dev-libs/libxslt dev-libs/icu dev-libs/libmemcached )" RDEPEND="${CDEPEND}" DEPEND="${CDEPEND} arm? ( dev-libs/libatomic_ops ) libatomic? ( dev-libs/libatomic_ops )" PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" +REQUIRED_USE="pcre-jit? ( pcre )" pkg_setup() { if use nginx_modules_http_passenger; then @@ -169,7 +203,11 @@ pkg_setup() { } src_prepare() { - sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make + find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die + # We have config protection, don't rename etc files + sed -i 's:.default::' auto/install || die + # remove useless files + sed -i -e '/koi-/d' -e '/win-/d' auto/install || die } src_configure() { @@ -180,6 +218,7 @@ src_configure() { use ipv6 && myconf+=" --with-ipv6" use libatomic && myconf+=" --with-libatomic" use pcre && myconf+=" --with-pcre" + use pcre-jit && myconf+=" --with-pcre-jit" # HTTP modules for mod in $NGINX_MODULES_STD; do @@ -204,32 +243,43 @@ src_configure() { # third-party modules if use nginx_modules_http_upload_progress; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/masterzen-nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_SHA1}" + myconf+=" --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD}" fi if use nginx_modules_http_headers_more; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/agentzh-headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_SHA1}" + myconf+=" --add-module=${HTTP_HEADERS_MORE_MODULE_WD}" fi if use nginx_modules_http_push; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/${HTTP_PUSH_MODULE_P}" + myconf+=" --add-module=${HTTP_PUSH_MODULE_WD}" fi if use nginx_modules_http_cache_purge; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/${HTTP_CACHE_PURGE_MODULE_P}" + myconf+=" --add-module=${HTTP_CACHE_PURGE_MODULE_WD}" fi if use nginx_modules_http_upload; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/${HTTP_UPLOAD_MODULE_P}" + myconf+=" --add-module=${HTTP_UPLOAD_MODULE_WD}" fi if use nginx_modules_http_slowfs_cache; then http_enabled=1 - myconf+=" --add-module=${WORKDIR}/${HTTP_SLOWFS_CACHE_MODULE_P}" + myconf+=" --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD}" + fi + + if use nginx_modules_http_fancyindex; then + http_enabled=1 + myconf+=" --add-module=${HTTP_FANCYINDEX_MODULE_WD}" + fi + + if use nginx_modules_http_lua; then + http_enabled=1 + myconf+=" --add-module=${DEVEL_KIT_MODULE_WD}" + myconf+=" --add-module=${HTTP_LUA_MODULE_WD}" fi if use nginx_modules_http_xsltproc; then @@ -271,84 +321,91 @@ src_configure() { export LANG=C LC_ALL=C tc-export CC + if ! use prefix; then + myconf+=" --user=${PN} --group=${PN}" + fi + ./configure \ - --prefix=/usr \ - --sbin-path=/usr/sbin/nginx \ - --conf-path=/etc/${PN}/${PN}.conf \ - --error-log-path=/var/log/${PN}/error_log \ - --pid-path=/var/run/${PN}.pid \ - --lock-path=/var/lock/nginx.lock \ - --user=${PN} --group=${PN} \ - --with-cc-opt="-I${ROOT}usr/include" \ - --with-ld-opt="-L${ROOT}usr/lib" \ - --http-log-path=/var/log/${PN}/access_log \ - --http-client-body-temp-path=/var/tmp/${PN}/client \ - --http-proxy-temp-path=/var/tmp/${PN}/proxy \ - --http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \ - --http-scgi-temp-path=/var/tmp/${PN}/scgi \ - --http-uwsgi-temp-path=/var/tmp/${PN}/uwsgi \ + --prefix="${EPREFIX}"/usr \ + --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \ + --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \ + --pid-path="${EPREFIX}"/var/run/${PN}.pid \ + --lock-path="${EPREFIX}"/var/lock/nginx.lock \ + --with-cc-opt="-I${EROOT}usr/include" \ + --with-ld-opt="-L${EROOT}usr/lib" \ + --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \ + --http-client-body-temp-path="${EPREFIX}"/var/tmp/${PN}/client \ + --http-proxy-temp-path="${EPREFIX}"/var/tmp/${PN}/proxy \ + --http-fastcgi-temp-path="${EPREFIX}"/var/tmp/${PN}/fastcgi \ + --http-scgi-temp-path="${EPREFIX}"/var/tmp/${PN}/scgi \ + --http-uwsgi-temp-path="${EPREFIX}"/var/tmp/${PN}/uwsgi \ ${myconf} || die "configure failed" } src_compile() { # https://bugs.gentoo.org/286772 export LANG=C LC_ALL=C - emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" || die "emake failed" + emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" } src_install() { - keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi} - keepdir /var/www/localhost/htdocs - - dosbin objs/nginx + emake DESTDIR="${D}" install + cp "${FILESDIR}"/nginx.conf "${ED}"/etc/nginx/nginx.conf || die newinitd "${FILESDIR}"/nginx.initd nginx - - cp "${FILESDIR}"/nginx.conf conf/nginx.conf - rm conf/win-utf conf/koi-win conf/koi-utf - - dodir /etc/${PN} - insinto /etc/${PN} - doins conf/* - doman man/nginx.8 dodoc CHANGES* README + # Keepdir because these are hardcoded above + keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi} + keepdir /var/www/localhost/htdocs + mv "${ED}"/usr/html "${ED}"/var/www/localhost/htdocs || die + # logrotate insinto /etc/logrotate.d newins "${FILESDIR}"/nginx.logrotate nginx if use nginx_modules_http_perl; then cd "${S}"/objs/src/http/modules/perl/ - einstall DESTDIR="${D}" INSTALLDIRS=vendor || die "failed to install perl stuff" + einstall DESTDIR="${D}" INSTALLDIRS=vendor fixlocalpod fi if use nginx_modules_http_push; then docinto ${HTTP_PUSH_MODULE_P} - dodoc "${WORKDIR}"/${HTTP_PUSH_MODULE_P}/{changelog.txt,protocol.txt,README} + dodoc "${HTTP_PUSH_MODULE_WD}"/{changelog.txt,protocol.txt,README} fi if use nginx_modules_http_cache_purge; then docinto ${HTTP_CACHE_PURGE_MODULE_P} - dodoc "${WORKDIR}"/${HTTP_CACHE_PURGE_MODULE_P}/{CHANGES,README.md,TODO.md} + dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md} fi if use nginx_modules_http_upload; then docinto ${HTTP_UPLOAD_MODULE_P} - dodoc "${WORKDIR}"/${HTTP_UPLOAD_MODULE_P}/{Changelog,README} + dodoc "${HTTP_UPLOAD_MODULE_WD}"/{Changelog,README} fi if use nginx_modules_http_slowfs_cache; then docinto ${HTTP_SLOWFS_CACHE_MODULE_P} - dodoc "${WORKDIR}"/${HTTP_SLOWFS_CACHE_MODULE_P}/{CHANGES,README} + dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md} + fi + + if use nginx_modules_http_fancyindex; then + docinto ${HTTP_FANCYINDEX_MODULE_P} + dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst + fi + + if use nginx_modules_http_lua; then + docinto ${HTTP_LUA_MODULE_P} + dodoc "${HTTP_LUA_MODULE_WD}"/{Changes,README.markdown} fi } pkg_postinst() { if use ssl; then - if [ ! -f "${ROOT}"/etc/ssl/${PN}/${PN}.key ]; then + if [ ! -f "${EROOT}"/etc/ssl/${PN}/${PN}.key ]; then install_cert /etc/ssl/${PN}/${PN} - chown ${PN}:${PN} "${ROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} + use prefix || chown ${PN}:${PN} "${EROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} fi fi } |