Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/nginx/
Date: Thu, 03 Mar 2016 07:44:46
Message-Id: 1456878746.8e6af817cbe843501cf4c99dbb9b911aa5ce163e.monsieurp@gentoo
1 commit: 8e6af817cbe843501cf4c99dbb9b911aa5ce163e
2 Author: Thomas D <whissi <AT> whissi <DOT> de>
3 AuthorDate: Wed Mar 2 00:32:26 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 2 00:32:26 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e6af817
7
8 www-servers/nginx: Bump to v1.9.12 (#574342)
9
10 Changes:
11 - Bumped to EAPI=6
12
13 - nginx_modules_http_fancyindex bumped to v0.3.6
14
15 - nginx_modules_http_lua bumped to v0.10.1rc1
16
17 - nginx_modules_http_auth_ldap bumped to 8517bb05ecc896b54429ca5e95137b0a386bd41a
18
19 Bug: https://bugs.gentoo.org/show_bug.cgi?id=574342
20
21 Package-Manager: portage-2.2.27
22
23 www-servers/nginx/Manifest | 4 +
24 www-servers/nginx/nginx-1.9.12.ebuild | 758 ++++++++++++++++++++++++++++++++++
25 2 files changed, 762 insertions(+)
26
27 diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest
28 index 87bb5d0..3888afd 100644
29 --- a/www-servers/nginx/Manifest
30 +++ b/www-servers/nginx/Manifest
31 @@ -1,6 +1,8 @@
32 DIST modsecurity-2.9.0.tar.gz 4246467 SHA256 e2bbf789966c1f80094d88d9085a81bde082b2054f8e38e0db571ca49208f434 SHA512 1af04f29bf23c51d03cdd3795c530f88b523a645aa02d776a6b23dcbc31decec7cd574919e5c7c7cf82684df2774062de5e465bddbbaf4c01a442c6d49401d3d WHIRLPOOL 1167ba6048a3ca05dcdabf03c67ae12720cca0cec74547fc223ee92ff76b6d5131785fa77b5f16da180e56590c851c192eaf02817b798e4d6f41fa6bfb2735a6
33 DIST nginx-1.8.1.tar.gz 833473 SHA256 8f4b3c630966c044ec72715754334d1fdf741caa1d5795fb4646c27d09f797b7 SHA512 546eba1749af0034cb8b924d2432be2f0e82a75c545aa929391ef7234103c3f29376235a2ef1363b120e1825cda15aeb085a05f9ce3596c88466e112e82aa882 WHIRLPOOL cd399083fb14bdb3498f1cd91a1cb59a73d37f323ce7c2a32500c9443f654cb5449137708cf149a0126aedb77abec9d1eb3dce3121f0b378d7d70e8eb18062af
34 DIST nginx-1.9.10.tar.gz 889267 SHA256 fb14d76844cab0a5a0880768be28965e74f9956790f618c454ef6098e26631d9 SHA512 60a736afe98e46abeb572c938702b09b0098164584bf8b5c1978c2b83269b6c2b99a60b7c8c9482230c26eebaeeb684f3aa7db52af4d7a3c18434542730873e0 WHIRLPOOL 8f285f6d4c4f7e312791d7dc6fc072dbb1207315fcb7facac0ce958389473641de2f2c2cd03cfd11c0df3a16abd84522bb150090b561a46752e8b6317363fbeb
35 +DIST nginx-1.9.12.tar.gz 899183 SHA256 1af2eb956910ed4b11aaf525a81bc37e135907e7127948f9179f5410337da042 SHA512 b5f4cae48c85cdc9a95006b6a321834de9d18981cb1a25670c9fc948d86b9a8906d25a1ca174626eb418b0afdb3f2e1df3cbb6f5a48bd781e39e2470a4d52520 WHIRLPOOL 0b6300528ae1c29e4f7647cdbe0ea6254b1bccbdcd7f0185b2bff25409aba093c089e5fa3c1a828e2cf7f55fa6d9d2f8b818f85014f37ccbf335a71cb2e93e32
36 +DIST nginx-auth-ldap-8517bb05ecc896b54429ca5e95137b0a386bd41a.tar.gz 16950 SHA256 2f0b1a65847ea1da801a99b654f132e1c814d2fa49a43a324d8fc4ce6327935f SHA512 65b0aec3a4b28625ef93d166f659d63b9ef7d971dea78b09987eaa02f632bf5b8f6c9afdb6ef444afa466dba7ff67180cad27e138e6818c2ba80bc804f140ca6 WHIRLPOOL 9ef896fa3501415e2c7022448783626af256c6c3878fcca5d6cc042a9789937147eb4c3743f92002ab8d09e4ce828532b9ae321dc284ef2560801da98153d146
37 DIST nginx-auth-ldap-d0f2f829f708792ee97a9241c9c6ffd33c47c7c1.tar.gz 16349 SHA256 7c1628d7e6ebb3a41ec916334014b74acc32dd09a0830752a2d03be0be3223c8 SHA512 2929f2b1170eef0ede4888beb8d5c0d0d45095fc1a3358dbe81b55bfc7468e53b981b1784a5fb9257a5888645d5fc3ae4fab950e6b4525f6dd0bb4d96076f0f6 WHIRLPOOL 626d88396af16373622532a349a2f21418191ad4073bb4b56980cbc5f219e40cee8786f5233ced2d7c5de698537d5337698ecc4a49181c960fbd0ac4a4ab14be
38 DIST nginx_http_sticky_module_ng-1.2.5.tar.bz2 124072 SHA256 f975c033eb3c342f7247f6524774bbb727aaf630ed984576dbafe5de7a790c58 SHA512 d6ae723f739efb2f0548461931b1c395801684759962beda08067111426b1c9787ceaede91b0e984c023108fd17864c53c53925506f7e8e25ec8d2fc065585f6 WHIRLPOOL 1013c6a51f5989c8131392b3d9704d42c99f9727a673f6205878d0b7dfd265bb6042c1d30089603c9b38e339d48302e6873e77fe380b7e8edba25b71e9e84ba6
39 DIST nginx_http_sticky_module_ng-1.2.6.tar.bz2 124089 SHA256 e47b9fd435d7a5a3200f945a9745aaa7b9446495bda76df48f211129f88d6b26 SHA512 2632b04c94f523aa7c9726db182cba11d83e642c2db5798274e67fbef30de95d02e4e95cbfb98bc429d4244d630b5d9617405b43f728ae0117a5c134940c0ded WHIRLPOOL 1b754c02f834c6b4d4930e9c46b8c5accb6c9663718fb9296c92d79bc33206e66e49e4234ca4db9a5afcd42fa23273bdf0e675aa7b38927c4e46a85318c189eb
40 @@ -11,10 +13,12 @@ DIST ngx_http_dav_ext-0.0.3.tar.gz 6260 SHA256 d428a0236c933779cb40ac8c91afb19d5
41 DIST ngx_http_echo-0.57.tar.gz 65073 SHA256 8467237ca0fae74ca7a32fbd34fc6044df307098415d48068214c9c235695a07 SHA512 c89780eca9267c9984a022a4dbd9ebf603dbd5c323bfea5ea7898ca9fc0a744388ce7520e7a9799aeabd6573f8e71ee595fe9998fa54e5d5c412b21031edd31d WHIRLPOOL e481b6f57a6ff48706fa7e281f31f15a5522c29b98620559cebe8412207d5595497cdce9156e7762cceff6369e9f678d5a81bf3c83fb2e8c5d8786622f1c27b8
42 DIST ngx_http_echo-0.58.tar.gz 64779 SHA256 190fe3977dd1910e82059f30f9baae3da2ee6e6fb50f18c9bc2605a19dbb9626 SHA512 03bca117b2a7f9fa78450d24b2a25fcf19528a37d842dbd740e9ccf0f3ad6652d9927757f1317441438ec1e474211e2b4c84829015a51c5e25ca9f2dbd3809a0 WHIRLPOOL 0c3623f881cd127d1f3450f6e46456d98501d9d21f5292ec6bae877fa3020adbaae2dbb83f105c8c7eb0273fedd927753238d2399385721167680200c8b51a15
43 DIST ngx_http_fancyindex-0.3.5.tar.gz 14837 SHA256 e0998e83be58bc5787fa9243a76a9d21de3cd01088d3cf63177ba88a562634a1 SHA512 ddb4ab3e8e47e1c49680db3e9f648f7cd582c07f963204105118e61432fa1e80c3f1bce69ed689db383011a9c155184bcc7e931eeae20bbd7cbdb5d4eb35a0a8 WHIRLPOOL a45db854d75f05a59c6f5e67c652850b5410162e7852abda20bb6720d29cc716f25ce7ea93ef52f9ff3f11d6d3a744c1fa4c7a6270fc1bd6d42f6743accb8e73
44 +DIST ngx_http_fancyindex-0.3.6.tar.gz 17252 SHA256 e73f1f0444f8c53601b51da8684b174c5ffd3b4ed6eb7956dd57f8b95485b68f SHA512 ca2de16eef7d5e94104f44f180ebd98674c5799409d70d95fd6359512861efaa95d5242a9eb661363bcc5110032965f326e735a2b8fcfaaf29381023fd11a76e WHIRLPOOL 68c089a11a39685e3cb934c12daf12bd4c7176da6d17a26d4ec18f5bb44c480695e622c732925255c10af4bf819aa52da0dcf457ca40bffdc8a6673a10440823
45 DIST ngx_http_headers_more-0.26.tar.gz 28028 SHA256 d6bdc51f9e778a3b23e41a51cae542c1467a1e5e55c1329a7ffc454be084fb6f SHA512 842927de67d28f3cff596607f209d1004b6d49f1d45b861758405ed6fe6f7aab76ad63530ccdfff1c1947db1190dd65dee0a29f50026bfa7a39a9a051561cf88 WHIRLPOOL 0dc37c36717be40a07112388d913d20bc99d76f90604da618d5547f24d93c636c14c2cca18191ff5916b40ec0113da648cfc07e1c00b1853f2b15ce056d5f3d7
46 DIST ngx_http_headers_more-0.28.tar.gz 26948 SHA256 67e5ca6cd9472938333c4530ab8c8b8bc9fe910a8cb237e5e5f1853e14725580 SHA512 ed39930ddb416ab3510c3649f296e55474584bf1e9c9855c2330c0ec04d208865d242f54c55dbac79a4871803197fd930c20396a3b70f0f5fb009318d3c12254 WHIRLPOOL 7c0455c6ac15a033e62126ff8bb246d3d0315a2b18c095bdb0867669daa2387a5dfa4fdfbf038b8392ac4ee42c671a49ac742bd28352b2f5fbcf6fee423df1a2
47 DIST ngx_http_headers_more-0.29.tar.gz 27144 SHA256 0a5f3003b5851373b03c542723eb5e7da44a01bf4c4c5f20b4de53f355a28d33 SHA512 50a45922f8d2d54fca345bf47df71035362a6868b86872528f2414386c15cdcdb5466ea2c0b7c7303dc85084f94ee05e7411da8836cde3cd549c576431c7ef14 WHIRLPOOL bfc3261b6b0a4add707069383ae1241b2bad02099c86985b87cdc595a49eb3eea0c5295d912f536c01110f7954f6738870ad72f1230a202824b5bc00293c7ddd
48 DIST ngx_http_lua-0.10.0.tar.gz 569372 SHA256 cf31c64b107a54999fdf8b68e8b8d52d88a3c95d9307417f049c32c5687ed780 SHA512 8d1b07a040368e236a3473c5e9ed7aac6867743c08b57ffe7c708806ccee87e6dfca5412f37753f2576ca7a518acbd06fa0fd573c75e864c6bcfbed160f7221e WHIRLPOOL ec541230caf172802fb200fe11a185879a5c533cd41c3e3ba56b441aa4f82e2101f27156e8a17cda97960cc6ffa8814dc1005e7f1f8e4f7f86f0b847ed25220a
49 +DIST ngx_http_lua-0.10.1rc1.tar.gz 574793 SHA256 7b741a45ba8c66972fc7261cd191bdc89179ad9cebbc5af59c899c56811b8838 SHA512 6d9ab941bd89b6a4effb6ccec8aca7058ae4d0f1baa712616222f2fc7d60d78c76c33113a04c5ef71d28cfe55b6247720bd902726f8e93ed64ae50a84f653c0f WHIRLPOOL c494bec5318590f2c1e9e2ed06d4e2d15eb88d6feecb1208a1f968f466309742445c5316bdfbc4170aa5468f654399657799f3ae8a85248a8daa8a0b0ddd0cdd
50 DIST ngx_http_lua-0.9.15.tar.gz 520190 SHA256 659fe4c201f4a4ae1007fa029cef472aaa837bf0904babb6158f83b86536c5b7 SHA512 1d809f873ced8e50422298bb4b730b8e7aaf442c11570cbe892fd73a414ff4f6d6eca7be8b2d2dbf57a136136b17d80596ee2f2f195dcb59776e78df5a94ae92 WHIRLPOOL caf128254f99d674eb370779c6e41c0b459be1c5a2baac7df1ff3498a38349bd2c140594eea3eb29c468a366e265421f90363886be73db0b3484cc6f386cb563
51 DIST ngx_http_lua-0.9.19.tar.gz 542445 SHA256 2b41d4d2627fda76946f194aae6c2b4d89bb59afd792d397c6b481ee82c10eb4 SHA512 9467742c4f5ac164fd33263990bbc5719069a7549413486586406e007156719de77e95944db8201deb2f3e7fc4ce9aa4ada027f89f0e421117dc29018b2fed1c WHIRLPOOL 9853ee88a491fd3844975a8c920032e76f36ed8d7d34033f3a744acb7ed8116fd45efb75a37c918edb912d3c5d203f5c83111ec82b5ab8acdad13632e47df1e8
52 DIST ngx_http_naxsi-0.53-2.tar.gz 165690 SHA256 3eadff1d91995beae41b92733ade28091c2075a24ae37058f4d6aa90b0f4b660 SHA512 ada592f5e7f80a6d549cc435ee8720df01a788dc88cf27a7d55521bb7e4c66fa11b9ec28216aff7e13c70a5faf12cb745bd398b8a782ed4dea1eecd04b07e24c WHIRLPOOL c5b736dbe9bd66daf7e023f176a08f78225b61990781d7ad5a55d0f35391df7e05bf1b2623a6227e0355cf0204ef9eac1b9fa03aa62b3c0d6eac515f1213f270
53
54 diff --git a/www-servers/nginx/nginx-1.9.12.ebuild b/www-servers/nginx/nginx-1.9.12.ebuild
55 new file mode 100644
56 index 0000000..83a0713
57 --- /dev/null
58 +++ b/www-servers/nginx/nginx-1.9.12.ebuild
59 @@ -0,0 +1,758 @@
60 +# Copyright 1999-2016 Gentoo Foundation
61 +# Distributed under the terms of the GNU General Public License v2
62 +# $Id$
63 +
64 +EAPI=6
65 +
66 +# Maintainer notes:
67 +# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite
68 +# - any http-module activates the main http-functionality and overrides USE=-http
69 +# - keep the following requirements in mind before adding external modules:
70 +# * alive upstream
71 +# * sane packaging
72 +# * builds cleanly
73 +# * does not need a patch for nginx core
74 +# - TODO: test the google-perftools module (included in vanilla tarball)
75 +
76 +# prevent perl-module from adding automagic perl DEPENDs
77 +GENTOO_DEPEND_ON_PERL="no"
78 +
79 +# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license)
80 +DEVEL_KIT_MODULE_PV="0.2.19"
81 +DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1"
82 +DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz"
83 +DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}"
84 +
85 +# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license)
86 +HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.1"
87 +HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}-r1"
88 +HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}.tar.gz"
89 +HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
90 +
91 +# http_headers_more (https://github.com/agentzh/headers-more-nginx-module, BSD license)
92 +HTTP_HEADERS_MORE_MODULE_PV="0.29"
93 +HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}"
94 +HTTP_HEADERS_MORE_MODULE_URI="https://github.com/agentzh/headers-more-nginx-module/archive/v${HTTP_HEADERS_MORE_MODULE_PV}.tar.gz"
95 +HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_PV}"
96 +
97 +# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license)
98 +HTTP_CACHE_PURGE_MODULE_PV="2.3"
99 +HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
100 +HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz"
101 +HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
102 +
103 +# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license)
104 +HTTP_SLOWFS_CACHE_MODULE_PV="1.10"
105 +HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
106 +HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz"
107 +HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
108 +
109 +# http_fancyindex (https://github.com/aperezdc/ngx-fancyindex, BSD license)
110 +HTTP_FANCYINDEX_MODULE_PV="0.3.6"
111 +HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
112 +HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz"
113 +HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
114 +
115 +# http_lua (https://github.com/openresty/lua-nginx-module, BSD license)
116 +HTTP_LUA_MODULE_PV="0.10.1rc1"
117 +HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}"
118 +HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz"
119 +HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}"
120 +
121 +# http_auth_pam (https://github.com/stogh/ngx_http_auth_pam_module/, http://web.iti.upv.es/~sto/nginx/, BSD-2 license)
122 +HTTP_AUTH_PAM_MODULE_PV="1.4"
123 +HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}"
124 +HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz"
125 +HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}"
126 +
127 +# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license)
128 +HTTP_UPSTREAM_CHECK_MODULE_PV="0.3.0"
129 +HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}"
130 +HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz"
131 +HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-${HTTP_UPSTREAM_CHECK_MODULE_PV}"
132 +
133 +# http_metrics (https://github.com/zenops/ngx_metrics, BSD license)
134 +HTTP_METRICS_MODULE_PV="0.1.1"
135 +HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}"
136 +HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz"
137 +HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}"
138 +
139 +# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+)
140 +HTTP_NAXSI_MODULE_PV="0.54"
141 +HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}"
142 +HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz"
143 +HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src"
144 +
145 +# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license)
146 +RTMP_MODULE_PV="1.1.7"
147 +RTMP_MODULE_P="ngx_rtmp-${RTMP_MODULE_PV}"
148 +RTMP_MODULE_URI="https://github.com/arut/nginx-rtmp-module/archive/v${RTMP_MODULE_PV}.tar.gz"
149 +RTMP_MODULE_WD="${WORKDIR}/nginx-rtmp-module-${RTMP_MODULE_PV}"
150 +
151 +# nginx-dav-ext-module (https://github.com/arut/nginx-dav-ext-module, BSD license)
152 +HTTP_DAV_EXT_MODULE_PV="0.0.3"
153 +HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}"
154 +HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz"
155 +HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}"
156 +
157 +# echo-nginx-module (https://github.com/agentzh/echo-nginx-module, BSD license)
158 +HTTP_ECHO_MODULE_PV="0.58"
159 +HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}"
160 +HTTP_ECHO_MODULE_URI="https://github.com/agentzh/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz"
161 +HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}"
162 +
163 +# mod_security for nginx (https://modsecurity.org/, Apache-2.0)
164 +# keep the MODULE_P here consistent with upstream to avoid tarball duplication
165 +HTTP_SECURITY_MODULE_PV="2.9.0"
166 +HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}"
167 +HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz"
168 +HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}"
169 +
170 +# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3)
171 +HTTP_PUSH_STREAM_MODULE_PV="0.5.1"
172 +HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}"
173 +HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz"
174 +HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}"
175 +
176 +# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2)
177 +HTTP_STICKY_MODULE_PV="1.2.6"
178 +HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}"
179 +HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2"
180 +HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-c78b7dd79d0d"
181 +
182 +# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2)
183 +HTTP_MOGILEFS_MODULE_PV="1.0.4"
184 +HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
185 +HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz"
186 +HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
187 +
188 +# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2)
189 +HTTP_MEMC_MODULE_PV="0.16"
190 +HTTP_MEMC_MODULE_P="ngx_memc_module-${HTTP_MEMC_MODULE_PV}"
191 +HTTP_MEMC_MODULE_URI="https://github.com/openresty/memc-nginx-module/archive/v${HTTP_MEMC_MODULE_PV}.tar.gz"
192 +HTTP_MEMC_MODULE_WD="${WORKDIR}/memc-nginx-module-${HTTP_MEMC_MODULE_PV}"
193 +
194 +# nginx-ldap-auth-module (https://github.com/kvspb/nginx-auth-ldap, BSD-2)
195 +HTTP_LDAP_MODULE_PV="8517bb05ecc896b54429ca5e95137b0a386bd41a"
196 +HTTP_LDAP_MODULE_P="nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
197 +HTTP_LDAP_MODULE_URI="https://github.com/kvspb/nginx-auth-ldap/archive/${HTTP_LDAP_MODULE_PV}.tar.gz"
198 +HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
199 +
200 +inherit ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
201 +
202 +DESCRIPTION="Robust, small and high performance http and reverse proxy server"
203 +HOMEPAGE="http://nginx.org"
204 +SRC_URI="http://nginx.org/download/${P}.tar.gz
205 + ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz
206 + nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
207 + nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
208 + nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
209 + nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )
210 + nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz )
211 + nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz )
212 + nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz )
213 + nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz )
214 + nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz )
215 + nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz )
216 + rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz )
217 + nginx_modules_http_dav_ext? ( ${HTTP_DAV_EXT_MODULE_URI} -> ${HTTP_DAV_EXT_MODULE_P}.tar.gz )
218 + nginx_modules_http_echo? ( ${HTTP_ECHO_MODULE_URI} -> ${HTTP_ECHO_MODULE_P}.tar.gz )
219 + nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz )
220 + nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz )
221 + nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 )
222 + nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )
223 + nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz )
224 + nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz )"
225 +
226 +LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+
227 + nginx_modules_http_security? ( Apache-2.0 )
228 + nginx_modules_http_push_stream? ( GPL-3 )"
229 +
230 +SLOT="mainline"
231 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
232 +
233 +NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif
234 + fastcgi geo gzip limit_req limit_conn map memcached proxy referer
235 + rewrite scgi ssi split_clients upstream_ip_hash userid uwsgi"
236 +NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip
237 + gzip_static image_filter mp4 perl random_index realip secure_link
238 + slice stub_status sub xslt"
239 +NGINX_MODULES_STREAM="access limit_conn upstream"
240 +NGINX_MODULES_MAIL="imap pop3 smtp"
241 +NGINX_MODULES_3RD="
242 + http_upload_progress
243 + http_headers_more
244 + http_cache_purge
245 + http_slowfs_cache
246 + http_fancyindex
247 + http_lua
248 + http_auth_pam
249 + http_upstream_check
250 + http_metrics
251 + http_naxsi
252 + http_dav_ext
253 + http_echo
254 + http_security
255 + http_push_stream
256 + http_sticky
257 + http_ajp
258 + http_mogilefs
259 + http_memc
260 + http_auth_ldap"
261 +
262 +IUSE="aio debug +http +http2 +http-cache ipv6 libatomic libressl luajit +pcre
263 + pcre-jit rtmp selinux ssl threads userland_GNU vim-syntax"
264 +
265 +for mod in $NGINX_MODULES_STD; do
266 + IUSE="${IUSE} +nginx_modules_http_${mod}"
267 +done
268 +
269 +for mod in $NGINX_MODULES_OPT; do
270 + IUSE="${IUSE} nginx_modules_http_${mod}"
271 +done
272 +
273 +for mod in $NGINX_MODULES_STREAM; do
274 + IUSE="${IUSE} nginx_modules_stream_${mod}"
275 +done
276 +
277 +for mod in $NGINX_MODULES_MAIL; do
278 + IUSE="${IUSE} nginx_modules_mail_${mod}"
279 +done
280 +
281 +for mod in $NGINX_MODULES_3RD; do
282 + IUSE="${IUSE} nginx_modules_${mod}"
283 +done
284 +
285 +# Add so we can warn users updating about config changes
286 +# @TODO: jbergstroem: remove on next release series
287 +IUSE="${IUSE} nginx_modules_http_spdy"
288 +
289 +CDEPEND="
290 + pcre? ( >=dev-libs/libpcre-4.2 )
291 + pcre-jit? ( >=dev-libs/libpcre-8.20[jit] )
292 + ssl? (
293 + !libressl? ( dev-libs/openssl:0= )
294 + libressl? ( dev-libs/libressl:= )
295 + )
296 + http2? (
297 + !libressl? ( >=dev-libs/openssl-1.0.1c:0= )
298 + libressl? ( dev-libs/libressl:= )
299 + )
300 + http-cache? (
301 + userland_GNU? (
302 + !libressl? ( dev-libs/openssl:0= )
303 + libressl? ( dev-libs/libressl:= )
304 + )
305 + )
306 + nginx_modules_http_geoip? ( dev-libs/geoip )
307 + nginx_modules_http_gunzip? ( sys-libs/zlib )
308 + nginx_modules_http_gzip? ( sys-libs/zlib )
309 + nginx_modules_http_gzip_static? ( sys-libs/zlib )
310 + nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] )
311 + nginx_modules_http_perl? ( >=dev-lang/perl-5.8 )
312 + nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 )
313 + nginx_modules_http_secure_link? (
314 + userland_GNU? (
315 + !libressl? ( dev-libs/openssl:0= )
316 + libressl? ( dev-libs/libressl:= )
317 + )
318 + )
319 + nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )
320 + nginx_modules_http_lua? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) )
321 + nginx_modules_http_auth_pam? ( virtual/pam )
322 + nginx_modules_http_metrics? ( dev-libs/yajl )
323 + nginx_modules_http_dav_ext? ( dev-libs/expat )
324 + nginx_modules_http_security? ( >=dev-libs/libxml2-2.7.8 dev-libs/apr-util www-servers/apache )
325 + nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] )"
326 +RDEPEND="${CDEPEND}
327 + selinux? ( sec-policy/selinux-nginx )
328 + !www-servers/nginx:0"
329 +DEPEND="${CDEPEND}
330 + arm? ( dev-libs/libatomic_ops )
331 + libatomic? ( dev-libs/libatomic_ops )"
332 +PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
333 +
334 +REQUIRED_USE="pcre-jit? ( pcre )
335 + nginx_modules_http_lua? ( nginx_modules_http_rewrite )
336 + nginx_modules_http_naxsi? ( pcre )
337 + nginx_modules_http_dav_ext? ( nginx_modules_http_dav )
338 + nginx_modules_http_metrics? ( nginx_modules_http_stub_status )
339 + nginx_modules_http_security? ( pcre )
340 + nginx_modules_http_push_stream? ( ssl )"
341 +
342 +pkg_setup() {
343 + NGINX_HOME="/var/lib/nginx"
344 + NGINX_HOME_TMP="${NGINX_HOME}/tmp"
345 +
346 + ebegin "Creating nginx user and group"
347 + enewgroup ${PN}
348 + enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN}
349 + eend $?
350 +
351 + if use libatomic; then
352 + ewarn "GCC 4.1+ features built-in atomic operations."
353 + ewarn "Using libatomic_ops is only needed if using"
354 + ewarn "a different compiler or a GCC prior to 4.1"
355 + fi
356 +
357 + if [[ -n $NGINX_ADD_MODULES ]]; then
358 + ewarn "You are building custom modules via \$NGINX_ADD_MODULES!"
359 + ewarn "This nginx installation is not supported!"
360 + ewarn "Make sure you can reproduce the bug without those modules"
361 + ewarn "_before_ reporting bugs."
362 + fi
363 +
364 + if use !http; then
365 + ewarn "To actually disable all http-functionality you also have to disable"
366 + ewarn "all nginx http modules."
367 + fi
368 +
369 + if use nginx_modules_http_ajp; then
370 + eerror "The AJP module currently doesn't build for nginx >1.8."
371 + eerror "It will be reintroduced with the 1.9 series when proven stable."
372 + eerror "Either disable it or stick with nginx 1.7.x."
373 + die "AJP module not supported"
374 + fi
375 +
376 + if use nginx_modules_http_mogilefs && use threads; then
377 + eerror "mogilefs won't compile with threads support."
378 + eerror "Please disable either flag and try again."
379 + die "Can't compile mogilefs with threads support"
380 + fi
381 +}
382 +
383 +src_prepare() {
384 + eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch"
385 +
386 + if use nginx_modules_http_upstream_check; then
387 + eapply -p0 "${FILESDIR}/check-1.9.2".patch
388 + fi
389 +
390 + if use nginx_modules_http_lua; then
391 + sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die
392 + fi
393 +
394 + find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die
395 + # We have config protection, don't rename etc files
396 + sed -i 's:.default::' auto/install || die
397 + # remove useless files
398 + sed -i -e '/koi-/d' -e '/win-/d' auto/install || die
399 +
400 + # don't install to /etc/nginx/ if not in use
401 + local module
402 + for module in fastcgi scgi uwsgi ; do
403 + if ! use nginx_modules_http_${module}; then
404 + sed -i -e "/${module}/d" auto/install || die
405 + fi
406 + done
407 +
408 + eapply_user
409 +}
410 +
411 +src_configure() {
412 + # mod_security needs to generate nginx/modsecurity/config before including it
413 + if use nginx_modules_http_security; then
414 + cd "${HTTP_SECURITY_MODULE_WD}"
415 + if use luajit ; then
416 + sed -i \
417 + -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
418 + configure || die
419 + fi
420 + ./configure \
421 + --enable-standalone-module \
422 + $(use_enable pcre-jit) \
423 + $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security"
424 + fi
425 +
426 + cd "${S}"
427 +
428 + local myconf=() http_enabled= mail_enabled= stream_enabled=
429 +
430 + use aio && myconf+=( --with-file-aio )
431 + use debug && myconf+=( --with-debug )
432 + use http2 && myconf+=( --with-http_v2_module )
433 + use ipv6 && myconf+=( --with-ipv6 )
434 + use libatomic && myconf+=( --with-libatomic )
435 + use pcre && myconf+=( --with-pcre )
436 + use pcre-jit && myconf+=( --with-pcre-jit )
437 + use threads && myconf+=( --with-threads )
438 +
439 + # HTTP modules
440 + for mod in $NGINX_MODULES_STD; do
441 + if use nginx_modules_http_${mod}; then
442 + http_enabled=1
443 + else
444 + myconf+=( --without-http_${mod}_module )
445 + fi
446 + done
447 +
448 + for mod in $NGINX_MODULES_OPT; do
449 + if use nginx_modules_http_${mod}; then
450 + http_enabled=1
451 + myconf+=( --with-http_${mod}_module )
452 + fi
453 + done
454 +
455 + if use nginx_modules_http_fastcgi; then
456 + myconf+=( --with-http_realip_module )
457 + fi
458 +
459 + # third-party modules
460 + if use nginx_modules_http_upload_progress; then
461 + http_enabled=1
462 + myconf+=( --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} )
463 + fi
464 +
465 + if use nginx_modules_http_headers_more; then
466 + http_enabled=1
467 + myconf+=( --add-module=${HTTP_HEADERS_MORE_MODULE_WD} )
468 + fi
469 +
470 + if use nginx_modules_http_cache_purge; then
471 + http_enabled=1
472 + myconf+=( --add-module=${HTTP_CACHE_PURGE_MODULE_WD} )
473 + fi
474 +
475 + if use nginx_modules_http_slowfs_cache; then
476 + http_enabled=1
477 + myconf+=( --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD} )
478 + fi
479 +
480 + if use nginx_modules_http_fancyindex; then
481 + http_enabled=1
482 + myconf+=( --add-module=${HTTP_FANCYINDEX_MODULE_WD} )
483 + fi
484 +
485 + if use nginx_modules_http_lua; then
486 + http_enabled=1
487 + if use luajit; then
488 + export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
489 + export LUAJIT_INC=$(pkg-config --variable includedir luajit)
490 + else
491 + export LUA_LIB=$(pkg-config --variable libdir lua)
492 + export LUA_INC=$(pkg-config --variable includedir lua)
493 + fi
494 + myconf+=( --add-module=${DEVEL_KIT_MODULE_WD} )
495 + myconf+=( --add-module=${HTTP_LUA_MODULE_WD} )
496 + fi
497 +
498 + if use nginx_modules_http_auth_pam; then
499 + http_enabled=1
500 + myconf+=( --add-module=${HTTP_AUTH_PAM_MODULE_WD} )
501 + fi
502 +
503 + if use nginx_modules_http_upstream_check; then
504 + http_enabled=1
505 + myconf+=( --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD} )
506 + fi
507 +
508 + if use nginx_modules_http_metrics; then
509 + http_enabled=1
510 + myconf+=( --add-module=${HTTP_METRICS_MODULE_WD} )
511 + fi
512 +
513 + if use nginx_modules_http_naxsi ; then
514 + http_enabled=1
515 + myconf+=( --add-module=${HTTP_NAXSI_MODULE_WD} )
516 + fi
517 +
518 + if use rtmp ; then
519 + http_enabled=1
520 + myconf+=( --add-module=${RTMP_MODULE_WD} )
521 + fi
522 +
523 + if use nginx_modules_http_dav_ext ; then
524 + http_enabled=1
525 + myconf+=( --add-module=${HTTP_DAV_EXT_MODULE_WD} )
526 + fi
527 +
528 + if use nginx_modules_http_echo ; then
529 + http_enabled=1
530 + myconf+=( --add-module=${HTTP_ECHO_MODULE_WD} )
531 + fi
532 +
533 + if use nginx_modules_http_security ; then
534 + http_enabled=1
535 + myconf+=( --add-module=${HTTP_SECURITY_MODULE_WD}/nginx/modsecurity )
536 + fi
537 +
538 + if use nginx_modules_http_push_stream ; then
539 + http_enabled=1
540 + myconf+=( --add-module=${HTTP_PUSH_STREAM_MODULE_WD} )
541 + fi
542 +
543 + if use nginx_modules_http_sticky ; then
544 + http_enabled=1
545 + myconf+=( --add-module=${HTTP_STICKY_MODULE_WD} )
546 + fi
547 +
548 + if use nginx_modules_http_mogilefs ; then
549 + http_enabled=1
550 + myconf+=( --add-module=${HTTP_MOGILEFS_MODULE_WD} )
551 + fi
552 +
553 + if use nginx_modules_http_memc ; then
554 + http_enabled=1
555 + myconf+=( --add-module=${HTTP_MEMC_MODULE_WD} )
556 + fi
557 +
558 + if use nginx_modules_http_auth_ldap; then
559 + http_enabled=1
560 + myconf+=( --add-module=${HTTP_LDAP_MODULE_WD} )
561 + fi
562 +
563 + if use http || use http-cache || use http2; then
564 + http_enabled=1
565 + fi
566 +
567 + if [ $http_enabled ]; then
568 + use http-cache || myconf+=( --without-http-cache )
569 + use ssl && myconf+=( --with-http_ssl_module )
570 + else
571 + myconf+=( --without-http --without-http-cache )
572 + fi
573 +
574 + # Stream modules
575 + for mod in $NGINX_MODULES_STREAM; do
576 + if use nginx_modules_stream_${mod}; then
577 + stream_enabled=1
578 + else
579 + # Treat stream upstream slightly differently
580 + if ! use nginx_modules_stream_upstream; then
581 + myconf+=( --without-stream_upstream_hash_module )
582 + myconf+=( --without-stream_upstream_least_conn_module )
583 + myconf+=( --without-stream_upstream_zone_module )
584 + else
585 + myconf+=( --without-stream_${stream}_module )
586 + fi
587 + fi
588 + done
589 +
590 + if [ $stream_enabled ]; then
591 + myconf+=( --with-stream )
592 + use ssl && myconf+=( --with-stream_ssl_module )
593 + fi
594 +
595 + # MAIL modules
596 + for mod in $NGINX_MODULES_MAIL; do
597 + if use nginx_modules_mail_${mod}; then
598 + mail_enabled=1
599 + else
600 + myconf+=( --without-mail_${mod}_module )
601 + fi
602 + done
603 +
604 + if [ $mail_enabled ]; then
605 + myconf+=( --with-mail )
606 + use ssl && myconf+=( --with-mail_ssl_module )
607 + fi
608 +
609 + # custom modules
610 + for mod in $NGINX_ADD_MODULES; do
611 + myconf+=( --add-module=${mod} )
612 + done
613 +
614 + # https://bugs.gentoo.org/286772
615 + export LANG=C LC_ALL=C
616 + tc-export CC
617 +
618 + if ! use prefix; then
619 + myconf+=( --user=${PN}" "--group=${PN} )
620 + fi
621 +
622 + ./configure \
623 + --prefix="${EPREFIX}"/usr \
624 + --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \
625 + --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \
626 + --pid-path="${EPREFIX}"/run/${PN}.pid \
627 + --lock-path="${EPREFIX}"/run/lock/${PN}.lock \
628 + --with-cc-opt="-I${EROOT}usr/include" \
629 + --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \
630 + --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \
631 + --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \
632 + --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \
633 + --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \
634 + --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \
635 + --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \
636 + "${myconf[@]}" || die "configure failed"
637 +
638 + # A purely cosmetic change that makes nginx -V more readable. This can be
639 + # good if people outside the gentoo community would troubleshoot and
640 + # question the users setup.
641 + sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die
642 +}
643 +
644 +src_compile() {
645 + use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}"
646 +
647 + # https://bugs.gentoo.org/286772
648 + export LANG=C LC_ALL=C
649 + emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}"
650 +}
651 +
652 +src_install() {
653 + emake DESTDIR="${D%/}" install
654 +
655 + cp "${FILESDIR}"/nginx.conf-r2 "${ED}"etc/nginx/nginx.conf || die
656 +
657 + newinitd "${FILESDIR}"/nginx.initd-r2 nginx
658 +
659 + systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service
660 +
661 + doman man/nginx.8
662 + dodoc CHANGES* README
663 +
664 + # just keepdir. do not copy the default htdocs files (bug #449136)
665 + keepdir /var/www/localhost
666 + rm -rf "${D}"usr/html || die
667 +
668 + # set up a list of directories to keep
669 + local keepdir_list="${NGINX_HOME_TMP}"/client
670 + local module
671 + for module in proxy fastcgi scgi uwsgi; do
672 + use nginx_modules_http_${module} && keepdir_list+=" ${NGINX_HOME_TMP}/${module}"
673 + done
674 +
675 + keepdir /var/log/nginx ${keepdir_list}
676 +
677 + # this solves a problem with SELinux where nginx doesn't see the directories
678 + # as root and tries to create them as nginx
679 + fperms 0750 "${NGINX_HOME_TMP}"
680 + fowners ${PN}:0 "${NGINX_HOME_TMP}"
681 +
682 + fperms 0700 /var/log/nginx ${keepdir_list}
683 + fowners ${PN}:${PN} /var/log/nginx ${keepdir_list}
684 +
685 + # logrotate
686 + insinto /etc/logrotate.d
687 + newins "${FILESDIR}"/nginx.logrotate-r1 nginx
688 +
689 + if use nginx_modules_http_perl; then
690 + cd "${S}"/objs/src/http/modules/perl/
691 + emake DESTDIR="${D}" INSTALLDIRS=vendor
692 + perl_delete_localpod
693 + fi
694 +
695 + if use nginx_modules_http_cache_purge; then
696 + docinto ${HTTP_CACHE_PURGE_MODULE_P}
697 + dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md}
698 + fi
699 +
700 + if use nginx_modules_http_slowfs_cache; then
701 + docinto ${HTTP_SLOWFS_CACHE_MODULE_P}
702 + dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md}
703 + fi
704 +
705 + if use nginx_modules_http_fancyindex; then
706 + docinto ${HTTP_FANCYINDEX_MODULE_P}
707 + dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst
708 + fi
709 +
710 + if use nginx_modules_http_lua; then
711 + docinto ${HTTP_LUA_MODULE_P}
712 + dodoc "${HTTP_LUA_MODULE_WD}"/{Changes,README.markdown}
713 + fi
714 +
715 + if use nginx_modules_http_auth_pam; then
716 + docinto ${HTTP_AUTH_PAM_MODULE_P}
717 + dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog}
718 + fi
719 +
720 + if use nginx_modules_http_upstream_check; then
721 + docinto ${HTTP_UPSTREAM_CHECK_MODULE_P}
722 + dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES}
723 + fi
724 +
725 + if use nginx_modules_http_naxsi; then
726 + insinto /etc/nginx
727 + doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules
728 + fi
729 +
730 + if use rtmp; then
731 + docinto ${RTMP_MODULE_P}
732 + dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl}
733 + fi
734 +
735 + if use nginx_modules_http_dav_ext; then
736 + docinto ${HTTP_DAV_EXT_MODULE_P}
737 + dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README
738 + fi
739 +
740 + if use nginx_modules_http_echo; then
741 + docinto ${HTTP_ECHO_MODULE_P}
742 + dodoc "${HTTP_ECHO_MODULE_WD}"/{README.markdown,doc/HttpEchoModule.wiki}
743 + fi
744 +
745 + if use nginx_modules_http_security; then
746 + docinto ${HTTP_SECURITY_MODULE_P}
747 + dodoc "${HTTP_SECURITY_MODULE_WD}"/{CHANGES,README.TXT,authors.txt}
748 + fi
749 +
750 + if use nginx_modules_http_push_stream; then
751 + docinto ${HTTP_PUSH_STREAM_MODULE_P}
752 + dodoc "${HTTP_PUSH_STREAM_MODULE_WD}"/{AUTHORS,CHANGELOG.textile,README.textile}
753 + fi
754 +
755 + if use nginx_modules_http_sticky; then
756 + docinto ${HTTP_STICKY_MODULE_P}
757 + dodoc "${HTTP_STICKY_MODULE_WD}"/{README.md,Changelog.txt,docs/sticky.pdf}
758 + fi
759 +
760 + if use nginx_modules_http_memc; then
761 + docinto ${HTTP_MEMC_MODULE_P}
762 + dodoc "${HTTP_MEMC_MODULE_WD}"/README.markdown
763 + fi
764 +
765 + if use nginx_modules_http_auth_ldap; then
766 + docinto ${HTTP_LDAP_MODULE_P}
767 + dodoc "${HTTP_LDAP_MODULE_WD}"/example.conf
768 + fi
769 +}
770 +
771 +pkg_postinst() {
772 + if use ssl; then
773 + if [ ! -f "${EROOT}"etc/ssl/${PN}/${PN}.key ]; then
774 + install_cert /etc/ssl/${PN}/${PN}
775 + use prefix || chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
776 + fi
777 + fi
778 +
779 + if use nginx_modules_http_spdy; then
780 + ewarn "In nginx 1.9.5 the spdy module was superseded by http2."
781 + ewarn "Update your configs and package.use accordingly."
782 + fi
783 +
784 + if use nginx_modules_http_lua && use http2; then
785 + ewarn "Lua 3rd party module author warns against using ${P} with"
786 + ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see http://git.io/OldLsg"
787 + fi
788 +
789 + # This is the proper fix for bug #458726/#469094, resp. CVE-2013-0337 for
790 + # existing installations
791 + local fix_perms=0
792 +
793 + for rv in ${REPLACING_VERSIONS} ; do
794 + version_compare ${rv} 1.4.1-r2
795 + [[ $? -eq 1 ]] && fix_perms=1
796 + done
797 +
798 + if [[ $fix_perms -eq 1 ]] ; then
799 + ewarn "To fix a security bug (CVE-2013-0337, bug #458726) had the following"
800 + ewarn "directories the world-readable bit removed (if set):"
801 + ewarn " ${EPREFIX}/var/log/nginx"
802 + ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}"
803 + ewarn "Check if this is correct for your setup before restarting nginx!"
804 + ewarn "This is a one-time change and will not happen on subsequent updates."
805 + ewarn "Furthermore nginx' temp directories got moved to ${NGINX_HOME_TMP}"
806 + chmod -f o-rwx "${EPREFIX}"/var/log/nginx "${EPREFIX}${NGINX_HOME_TMP}"/{,client,proxy,fastcgi,scgi,uwsgi}
807 + fi
808 +
809 + # If the nginx user can't change into or read the dir, display a warning.
810 + # If su is not available we display the warning nevertheless since we can't check properly
811 + su -s /bin/sh -c 'cd /var/log/nginx/ && ls' nginx >&/dev/null
812 + if [ $? -ne 0 ] ; then
813 + ewarn "Please make sure that the nginx user or group has at least"
814 + ewarn "'rx' permissions on /var/log/nginx (default on a fresh install)"
815 + ewarn "Otherwise you end up with empty log files after a logrotate."
816 + fi
817 +}