diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2012-07-18 18:59:46 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2012-07-18 18:59:46 +0000 |
commit | 659dce104d17f5359ce04a5628b493abbdbc7b80 (patch) | |
tree | 47636cb38c15203c75167fc1f8ef3f314c883f64 /www-servers/nginx | |
parent | Old. (diff) | |
download | historical-659dce104d17f5359ce04a5628b493abbdbc7b80.tar.gz historical-659dce104d17f5359ce04a5628b493abbdbc7b80.tar.bz2 historical-659dce104d17f5359ce04a5628b493abbdbc7b80.zip |
version bump. fixes #403921, #404239 and #421059
Package-Manager: portage-2.2.0_alpha110/cvs/Linux x86_64
Diffstat (limited to 'www-servers/nginx')
-rw-r--r-- | www-servers/nginx/ChangeLog | 9 | ||||
-rw-r--r-- | www-servers/nginx/Manifest | 36 | ||||
-rw-r--r-- | www-servers/nginx/files/nginx.initd | 8 | ||||
-rw-r--r-- | www-servers/nginx/nginx-1.2.2.ebuild | 365 | ||||
-rw-r--r-- | www-servers/nginx/nginx-1.3.3.ebuild | 365 |
5 files changed, 757 insertions, 26 deletions
diff --git a/www-servers/nginx/ChangeLog b/www-servers/nginx/ChangeLog index 58b06aacac01..4676a8d2a394 100644 --- a/www-servers/nginx/ChangeLog +++ b/www-servers/nginx/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for www-servers/nginx # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.326 2012/06/12 13:09:23 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.327 2012/07/18 18:59:46 hollow Exp $ + +*nginx-1.3.3 (18 Jul 2012) +*nginx-1.2.2 (18 Jul 2012) + + 18 Jul 2012; Benedikt Böhm <hollow@gentoo.org> +nginx-1.2.2.ebuild, + +nginx-1.3.3.ebuild, files/nginx.initd: + version bump. fixes #403921, #404239 and #421059 12 Jun 2012; Agostino Sarubbo <ago@gentoo.org> -nginx-1.1.19.ebuild, -nginx-1.2.0.ebuild: diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest index f8f58ce3a24c..006904762daa 100644 --- a/www-servers/nginx/Manifest +++ b/www-servers/nginx/Manifest @@ -1,12 +1,11 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA512 - -AUX nginx.conf 1358 RMD160 a948df249a16be86c114d587cfa5ee570d84a356 SHA1 e9db0447a1beb326a0858cf8189328229d1d3edf SHA256 6ff6c9301ea2a4d74a335b9119d7f9dba87d4e83793cf22d837d49f061763096 -AUX nginx.initd 1937 RMD160 3429c046fc3cc0505e2c7de26226120df3c8c865 SHA1 1674343b6bde753a8d49491e3c68ebaf9be19dcc SHA256 3bf11b5ab89eb933058b57f41058fed6a611f1e32b367f1606430b9337ba782d -AUX nginx.logrotate 364 RMD160 9fdfd2ea2f49b8dba20a030d893e34779bb32364 SHA1 4ab07992fa5c64f753e3643e1b51fcab4dec6ccf SHA256 9e3e090dfd10861d5f9b279e19113ce8d05caf9f33d488f6aabf9f19ac0cf925 +AUX nginx.conf 1358 SHA256 6ff6c9301ea2a4d74a335b9119d7f9dba87d4e83793cf22d837d49f061763096 SHA512 1873c9e54ea5020160c86da3f300e3eac589c0d30cdbe3446476b5b3f5bd388da95224cfb1a020b41720c9ce55ab6bb945dcc41612d5850da0e2ae0ceeeaa587 WHIRLPOOL 7672245bd11d6ed987e13d6bfe4dbc2140cc3d2e22616c49ab7ed5f42135c96b5779e4dfd16ba9e2d82aa59d98cd56a4872d18c3774e357ef79385fc874387d2 +AUX nginx.initd 2057 SHA256 b24365bda7fb77b3bb359550b8598c4633ba32560b096f7ecda5757dc5faf761 SHA512 8e4515885a93e20ca9e7c82473b1f5b28b8554d5e0be9129dbc57b26930224ad1f2724b557314020147fb00b12c2e0a734e28f60f8e0f5d84c7aadf9ee3560c0 WHIRLPOOL 83447ba3cd4bdbdf00a817d971ab9726a6ba847c334e5185b7b17a2fadf758590ca1500dea84371022d0ce8e3aff96b37de3bbe75657b7f9dba9e7475e04f3d6 +AUX nginx.logrotate 364 SHA256 9e3e090dfd10861d5f9b279e19113ce8d05caf9f33d488f6aabf9f19ac0cf925 SHA512 bdb56d90cfa163a9b22262c77d702cfa2319c0c61e3ce2cc2a0c099681bbd6a631a2e2f442ee28802e178799c592e5dd560f3bd33bf2c86d7ecf2b40a204746c WHIRLPOOL be1b76c1d51e6e597f9b441753dda3a943c31ccfb94f02a8da6edcd5c8f22b251df3086b6029101143beef0ca9c624d3ee709aca3e307ab0c910002931c1dc08 DIST nginx-1.0.15.tar.gz 693025 RMD160 99653499916b81fb0f5842755484983606cea5ec SHA1 e506b301ea849f58f2efb499d77b819fe55eea9a SHA256 1daf3950623c90b084e7eceb104071596060aca5c721bf890549fc2990b1ebe6 DIST nginx-1.2.1.tar.gz 718161 RMD160 81c0d4011a8748f4d3f0d6cb586c977f6199f4d9 SHA1 4fb69411f6c3ebb5818005955a085e891e77b2d8 SHA256 994ad97cbf6f7045f95ea9d6d401aad1e95766671e402c48af85aba5235a2dd7 -DIST nginx-1.3.1.tar.gz 721002 RMD160 3a3d90ac77b8d2cad58f81dcfd73f3c13ed1052d SHA1 36a4147799e303a6f19cd8ff9fb52c2fc07a840d SHA256 9b30a6f67f0a9eda7db026e12d4f09656f9254cddbb66ff9c0c01d8963dc1d73 +DIST nginx-1.2.2.tar.gz 722069 SHA256 409477c7a9fba58c110a176fd7965b9db188bcf8be0e7f8a0731b8ae1e6ee880 SHA512 7e1c92ce9d90c5cb681b2ad364903b164c6a03dfad77915e21c5308bbafa3606eab481a4fc8920ee99e6a619ad6dd3e557464cf47a7b9de253cdab3666997a55 WHIRLPOOL 715c5df867a9e82e8f4bfe4713f02e554bcb43d1903c0c573eedf86a4ed045e9d21cd1ab2fa6c5d4efd98fc288e7c56230ac24fc2d2ba6cdee09f656a20fb245 +DIST nginx-1.3.1.tar.gz 721002 SHA256 9b30a6f67f0a9eda7db026e12d4f09656f9254cddbb66ff9c0c01d8963dc1d73 SHA512 64d83dd46743922e5327af45da4a5a180f269695a753ae3472c41465412f371c8cabf5b3e58d90e0f33a848b1a32636efee7bbe71630048630c1331c4eac3406 WHIRLPOOL f18c0fccef7462118aaf462c99370ecf7e0c49353bbc9902cbb8f3f01a068ec6268020746abe1fd6030e606edb230540b86146c2d1c3c371c55b5a6e79643fd6 +DIST nginx-1.3.3.tar.gz 723241 SHA256 93f4697d9db96d2d15d7d9371a7cd4569997a197a3c0c4f6c45a11bf0eaf3b92 SHA512 97ff27b5542edceda5431b86f1cc31296fc946a5ba510c38a1ebd3eb51a763f0af574af9976a57f73f04dc23a5849b5eb18dfa1604031abe2c7c30e616cd38d2 WHIRLPOOL 783bd284c9a1c813a9acc56a9e8b5d24d7bb423d83dda234fa63955cb1a7d32808e7f07d9af5d2e21192261608b6ed2ca14180034d0de5263f9cac3ba409f46b DIST nginx_http_push_module-0.692.tar.gz 29119 RMD160 9d2be16074cf28115af0f1d8f3646937cda649ad SHA1 72103084cad8f4d3d9a49a6b04cf780e4541605d SHA256 64868708071aa21dbc4c7a07d149dd6ec9108fb7eaf2aad5ad069406151f17fe DIST nginx_upload_module-2.2.0.tar.gz 25796 RMD160 5734af837be3fe8ec444a7e5e7f6707118594098 SHA1 93d6e83e613a0ce2ed057a434b344fa1b6609b47 SHA256 b1c26abe0427180602e257627b4ed21848c93cc20cefc33af084983767d65805 DIST ngx-fancyindex-0.3.1.tar.gz 13148 RMD160 d85ff1de16211c98492f612c06391e9b4150e89d SHA1 5e2c88dbddaa55137804caf632cad3cf708911cb SHA256 49328a175548a456e2e2b78d0be87df7aade60345e07be57f2337c83058da115 @@ -18,19 +17,10 @@ DIST ngx_slowfs_cache-1.6.tar.gz 10972 RMD160 e1d10851db4a55fc465665caa3f6989d14 DIST ngx_slowfs_cache-1.8.tar.gz 11408 RMD160 3f1457df569d33df81d24205f12451cbfb76e97e SHA1 6e37e81ada462189c40c5abf31a7471a9a74bca2 SHA256 3ab8aa47912a3f7a07cda0a4fbf6d2e870b9c9cbf5477014ac109001cdcb3644 DIST ngx_upload_progress-0.8.3.tar.gz 16694 RMD160 b3c8835a270cda2224f5be35f1afb818821609b3 SHA1 0edae535d1efd50524d9947acaebe3979b06fcfb SHA256 f391da7fd1a89bd65e852182b6cbc746289cd10c83b211be18e703ff3e3986ae DIST ngx_upload_progress-0.9.0.tar.gz 17020 RMD160 10ff91748a06afd81abb9fdb203f164ea369463a SHA1 93aadaf6065e1e8afd9f14b9291a66819d3aa4c0 SHA256 3fb903dab595cf6656fa0fc5743a48daffbba2f6b5c554836be630800eaad4e2 -EBUILD nginx-1.0.15.ebuild 11216 RMD160 cb6c8c3ef3c1e908e2f39cdbfe425fca130d2fb9 SHA1 66e63081ea64ec159bb92c195626be1a8830c7f3 SHA256 085ac5eddd552f713d60671df3891ade51bdfd5342aebcb58893b16ca33e0f06 -EBUILD nginx-1.2.1.ebuild 12471 RMD160 07569414f60da27503c975898f9aab16f1179f25 SHA1 e73d7d8b125170d2b92c2c12123107f4ad2239d1 SHA256 368c3bb23bd08c9ffd99e999474b493eb8bf50867420c3b47fa727e212ac2fa9 -EBUILD nginx-1.3.1.ebuild 12477 RMD160 bc9f219c3eb6efedb57384564d43dfefb98cb4e1 SHA1 bcbd8826b5ef63ada9db11c3740176b65c616481 SHA256 0327960497918025c8b35b0dc03864f6e6c6fe888dcaba3ef53e9a3b6e7ab487 -MISC ChangeLog 53457 RMD160 7da1a266b70cf45570f718c8915ea1db63334c07 SHA1 47474f3fd55a0541b814087f3310d962562df946 SHA256 7839ba3e6a5327985a425c2c378bb4f4cbb798e8e6d4654a59d7e35261895740 -MISC metadata.xml 921 RMD160 e556afdd4e5777dcb360c6c48c302212fe8b95b7 SHA1 ee5ad4e7ea8e14934193a690f3b215074d453007 SHA256 41bf5d72811a6f86b0e82af6fcbeb35eb4f62c3c94fc105a908341240da22eb1 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.17 (GNU/Linux) - -iQEcBAEBCgAGBQJP1z+IAAoJEOTDgjZ80txdiToIAK69c/Uq521KjLahgXI4kwF+ -nYbpvTe3xKhsjD9SjOEEa6o+T4cjnpCxQkzBP6F6Rt+RROOMooUK9tHLz7B/njtO -RhFQ1R8vxdDoh58OgZHlF7ZlmRRJUCbZQhCvKtLHDnfEHj2El5+jl1h+kQKWdVNu -QdXcqaB6ksodwksCwfzsh75cENlK81K/uijAPcscbON6DvepoI1ihwvZ2XBCWj7Y -MvY3QZwjUebWlT4eF0DcV00icSIzvz7YqMNt3F20Vh/Pew/QnqWa5YTEcwTJXpWa -NEfQKrlodL/Lj8rde/ZaJ04f5ATB+S5IYBOr8yyIK59v52FFbIB8iZ7Uy/voXpU= -=iT+1 ------END PGP SIGNATURE----- +EBUILD nginx-1.0.15.ebuild 11216 SHA256 085ac5eddd552f713d60671df3891ade51bdfd5342aebcb58893b16ca33e0f06 SHA512 7cb073d517ac38b6e23a835465e63bfb4419232c1ae39a31ac830948569dff2a7c852a9c5a10ccd992770b137615721d020d027f649fdeb7b86c9402a8299e2a WHIRLPOOL f6f574cff2e436c69df8c4f16822a80cd4a0c26230b35e950fd592a3502209321032f45585fef08950d5d6c5a13990b2031864fcdd8d900d855889627db46a6d +EBUILD nginx-1.2.1.ebuild 12471 SHA256 368c3bb23bd08c9ffd99e999474b493eb8bf50867420c3b47fa727e212ac2fa9 SHA512 fb0592f5eea7792a0f25fdc19a0c86d61a73e4b719cade136786e495afdaa1182d258bade6d44f5ebc2743249ae447661df3048aab39933a3e74d4543a4befdb WHIRLPOOL c8b6d5d4dccb239cd2c8c44e7c1cb8b41f14cb2427dc891670bca1b83816a171623842b569bb8d63009fb7a4a7c70b421c8045a2b0c1bca6534336009a2b4293 +EBUILD nginx-1.2.2.ebuild 12476 SHA256 40bc32e536ec78b215988da87ea9518ecb04e599018a22185f201850d56e00ef SHA512 cb306e72c36940f0e8abb6fe3a62bdbdeeaae9ad0f40b19ebb39cfd5ea0f656cf7930eaf0b93a4e7c048334b1308857fe7a7d99cbf6f1d2a9709a6bbbfad1362 WHIRLPOOL 97cac0eaba8ffd4aaef2b99fdf8ed742405239f9f97335079853f559a54311db8a890f48be99084337b6c121469af27b4f0adcbfff5f9ed3358c6883739940e9 +EBUILD nginx-1.3.1.ebuild 12477 SHA256 0327960497918025c8b35b0dc03864f6e6c6fe888dcaba3ef53e9a3b6e7ab487 SHA512 aa87a3303fa2e7254f427badd1a3cd4142fd42cde2d744ca172b4155eed11ad55e1148fc8e806ec1508743ef87fb326f12331e213d26a50a9399dd988c89891d WHIRLPOOL 25e43b16571be2375f8ae80b51181dda05d3a6d6866cd7ecdd171163b149410a822b49ee6558ceaab500eea73219864e6b88b916aea1ef9f05a3825436533539 +EBUILD nginx-1.3.3.ebuild 12476 SHA256 82bb633407b262a65493438cfbe7f44c82ba0012a5e6381a8bff9dbf085978cc SHA512 30490b78b2304187d07e799d56df058747c7810a3c7d11ceae9191ff6446b06fb4502225cab75a2d68ac08be9880de61039a105f676b0777fb56bfa2670591c2 WHIRLPOOL fab58641c6de4905f29cade8267f2c4f95af10b12ac9be2ad95990a5aeec800612008e15b5ee95d16a1e50df675c066be551d42d9b9c6de74d9a65bf88c6555e +MISC ChangeLog 53680 SHA256 681cbc8193f21e65d33884e419b169581b2bb03f02d67964bb76806f91b78d2b SHA512 1dacb6323ab8727d313062c0912051369b231aa6dad3599e8aa479b791059f5a9b97c08795f3ea50ddf9e7930d6313f39b89cdba4e22f4421f3afc7400af329e WHIRLPOOL 50c6da43ceaa2c9e1d6c4d71db604074dd7c3e6b8264fa5b73e390e13329c91a0717f8a1d83abb9e0bb0ecbd5b775d0128cc5f7c92372611d71ab63e282ffdfe +MISC metadata.xml 921 SHA256 41bf5d72811a6f86b0e82af6fcbeb35eb4f62c3c94fc105a908341240da22eb1 SHA512 15fee8c0764797cac276aaa4aa903e32c010cee7eef9fc257a82337e07d7388d10024dfad0c1fd5c09cd3e054123a8d58b82349e8ebbc438f8004a68429d1961 WHIRLPOOL bd143fb9748dc8d028bf17f8a34f54258a510898fea4cdbcaf59c814fb8f14ab43a810ddc938961d15e5fa1d44d34f64fa2fad3ec81147d135af7ca95d8e4f5f diff --git a/www-servers/nginx/files/nginx.initd b/www-servers/nginx/files/nginx.initd index ea11e08497b5..b47f09e3f03e 100644 --- a/www-servers/nginx/files/nginx.initd +++ b/www-servers/nginx/files/nginx.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/files/nginx.initd,v 1.1 2012/02/11 10:17:30 hollow Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/files/nginx.initd,v 1.2 2012/07/18 18:59:46 hollow Exp $ extra_commands="configtest" extra_started_commands="upgrade reload" @@ -15,7 +15,8 @@ nginx_config="/etc/nginx/nginx.conf" command="/usr/sbin/nginx" command_args="-c ${nginx_config}" -pidfile="/var/run/nginx.pid" +pidfile=${pidfile:-/var/run/nginx.pid} + depend() { need net @@ -76,6 +77,9 @@ upgrade() { } configtest() { + mkdir -p /var/log/nginx || return 1 + mkdir -p /var/tmp/nginx/{client,proxy,fastcgi,scgi,uwsgi} || return 1 + ebegin "Checking nginx' configuration" ${command} -c ${nginx_config} -t -q diff --git a/www-servers/nginx/nginx-1.2.2.ebuild b/www-servers/nginx/nginx-1.2.2.ebuild new file mode 100644 index 000000000000..0b0236ddccc1 --- /dev/null +++ b/www-servers/nginx/nginx-1.2.2.ebuild @@ -0,0 +1,365 @@ +# 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.2.2.ebuild,v 1.1 2012/07/18 18:59:46 hollow Exp $ + +EAPI="4" + +# Maintainer notes: +# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite +# - any http-module activates the main http-functionality and overrides USE=-http +# - keep the following requirements in mind before adding external modules: +# * alive upstream +# * sane packaging +# * builds cleanly +# * does not need a patch for nginx core +# - TODO: test the google-perftools module (included in vanilla tarball) + +# prevent perl-module from adding automagic perl DEPENDs +GENTOO_DEPEND_ON_PERL="no" + +# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) +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="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.17rc1" +HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" +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) +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_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license) +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" + +# HTTP Upload module from Valery Kholodkov +# (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_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) +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}" + +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 + 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 )" + +LICENSE="as-is BSD BSD-2 GPL-2 MIT" +SLOT="0" +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_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 xslt" +NGINX_MODULES_MAIL="imap pop3 smtp" +NGINX_MODULES_3RD=" + http_upload_progress + http_headers_more + http_passenger + http_push + http_cache_purge + http_upload + http_slowfs_cache + http_fancyindex" + +IUSE="aio debug +http +http-cache ipv6 libatomic +pcre pcre-jit selinux ssl vim-syntax" + +for mod in $NGINX_MODULES_STD; do + IUSE="${IUSE} +nginx_modules_http_${mod}" +done + +for mod in $NGINX_MODULES_OPT; do + IUSE="${IUSE} nginx_modules_http_${mod}" +done + +for mod in $NGINX_MODULES_MAIL; do + IUSE="${IUSE} nginx_modules_mail_${mod}" +done + +for mod in $NGINX_MODULES_3RD; do + IUSE="${IUSE} nginx_modules_${mod}" +done + +CDEPEND=" + pcre? ( >=dev-libs/libpcre-4.2 ) + selinux? ( sec-policy/selinux-nginx ) + ssl? ( dev-libs/openssl ) + http-cache? ( userland_GNU? ( dev-libs/openssl ) ) + nginx_modules_http_geo? ( dev-libs/geoip ) + nginx_modules_http_gzip? ( sys-libs/zlib ) + nginx_modules_http_gzip_static? ( sys-libs/zlib ) + nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] ) + 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_xslt? ( dev-libs/libxml2 dev-libs/libxslt )" +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 + einfo + einfo "Passenger support has been removed from the nginx ebuild to" + einfo "get rid of file collisions, its broken build system and" + einfo "incompatibilities between passenger 2 and 3." + einfo + einfo "Please switch to passenger-3 standalone or use the" + einfo "unicorn gem which provides a sane nginx-like architecture" + einfo "out of the box." + einfo + einfo "For more information on sane ruby deployments with" + einfo "passenger-3/unicorn go to:" + einfo + einfo "https://rvm.beginrescueend.com" + einfo + die "nginx_modules_http_passenger still in IUSE" + fi + + ebegin "Creating nginx user and group" + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} + eend $? + + if use libatomic; then + ewarn "GCC 4.1+ features built-in atomic operations." + ewarn "Using libatomic_ops is only needed if using" + ewarn "a different compiler or a GCC prior to 4.1" + fi + + if [[ -n $NGINX_ADD_MODULES ]]; then + ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" + ewarn "This nginx installation is not supported!" + ewarn "Make sure you can reproduce the bug without those modules" + ewarn "_before_ reporting bugs." + fi + + if use !http; then + ewarn "To actually disable all http-functionality you also have to disable" + ewarn "all nginx http modules." + fi +} + +src_prepare() { + 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() { + local myconf= http_enabled= mail_enabled= + + use aio && myconf+=" --with-file-aio --with-aio_module" + use debug && myconf+=" --with-debug" + 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 + if use nginx_modules_http_${mod}; then + http_enabled=1 + else + myconf+=" --without-http_${mod}_module" + fi + done + + for mod in $NGINX_MODULES_OPT; do + if use nginx_modules_http_${mod}; then + http_enabled=1 + myconf+=" --with-http_${mod}_module" + fi + done + + if use nginx_modules_http_fastcgi; then + myconf+=" --with-http_realip_module" + fi + + # 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}" + 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}" + fi + + if use nginx_modules_http_push; then + http_enabled=1 + myconf+=" --add-module=${WORKDIR}/${HTTP_PUSH_MODULE_P}" + fi + + if use nginx_modules_http_cache_purge; then + http_enabled=1 + myconf+=" --add-module=${WORKDIR}/${HTTP_CACHE_PURGE_MODULE_P}" + fi + + if use nginx_modules_http_upload; then + http_enabled=1 + myconf+=" --add-module=${WORKDIR}/${HTTP_UPLOAD_MODULE_P}" + fi + + if use nginx_modules_http_slowfs_cache; then + http_enabled=1 + 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 http || use http-cache; then + http_enabled=1 + fi + + if [ $http_enabled ]; then + use http-cache || myconf+=" --without-http-cache" + use ssl && myconf+=" --with-http_ssl_module" + else + myconf+=" --without-http --without-http-cache" + fi + + # MAIL modules + for mod in $NGINX_MODULES_MAIL; do + if use nginx_modules_mail_${mod}; then + mail_enabled=1 + else + myconf+=" --without-mail_${mod}_module" + fi + done + + if [ $mail_enabled ]; then + myconf+=" --with-mail" + use ssl && myconf+=" --with-mail_ssl_module" + fi + + # custom modules + for mod in $NGINX_ADD_MODULES; do + myconf+=" --add-module=${mod}" + done + + # https://bugs.gentoo.org/286772 + export LANG=C LC_ALL=C + tc-export CC + + if ! use prefix; then + myconf+=" --user=${PN} --group=${PN}" + fi + + ./configure \ + --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}" +} + +src_install() { + emake DESTDIR="${D}" install + cp "${FILESDIR}"/nginx.conf "${ED}"/etc/nginx/nginx.conf || die + newinitd "${FILESDIR}"/nginx.initd nginx + 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 + 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} + 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} + fi + + if use nginx_modules_http_upload; then + docinto ${HTTP_UPLOAD_MODULE_P} + dodoc "${WORKDIR}"/${HTTP_UPLOAD_MODULE_P}/{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.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 "${EROOT}"/etc/ssl/${PN}/${PN}.key ]; then + install_cert /etc/ssl/${PN}/${PN} + use prefix || chown ${PN}:${PN} "${EROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} + fi + fi +} diff --git a/www-servers/nginx/nginx-1.3.3.ebuild b/www-servers/nginx/nginx-1.3.3.ebuild new file mode 100644 index 000000000000..372ed8b1ae27 --- /dev/null +++ b/www-servers/nginx/nginx-1.3.3.ebuild @@ -0,0 +1,365 @@ +# 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.3.3.ebuild,v 1.1 2012/07/18 18:59:46 hollow Exp $ + +EAPI="4" + +# Maintainer notes: +# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite +# - any http-module activates the main http-functionality and overrides USE=-http +# - keep the following requirements in mind before adding external modules: +# * alive upstream +# * sane packaging +# * builds cleanly +# * does not need a patch for nginx core +# - TODO: test the google-perftools module (included in vanilla tarball) + +# prevent perl-module from adding automagic perl DEPENDs +GENTOO_DEPEND_ON_PERL="no" + +# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) +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="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.17rc1" +HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" +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) +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_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license) +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" + +# HTTP Upload module from Valery Kholodkov +# (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_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) +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}" + +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 + 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 )" + +LICENSE="as-is BSD BSD-2 GPL-2 MIT" +SLOT="0" +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_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 xslt" +NGINX_MODULES_MAIL="imap pop3 smtp" +NGINX_MODULES_3RD=" + http_upload_progress + http_headers_more + http_passenger + http_push + http_cache_purge + http_upload + http_slowfs_cache + http_fancyindex" + +IUSE="aio debug +http +http-cache ipv6 libatomic +pcre pcre-jit selinux ssl vim-syntax" + +for mod in $NGINX_MODULES_STD; do + IUSE="${IUSE} +nginx_modules_http_${mod}" +done + +for mod in $NGINX_MODULES_OPT; do + IUSE="${IUSE} nginx_modules_http_${mod}" +done + +for mod in $NGINX_MODULES_MAIL; do + IUSE="${IUSE} nginx_modules_mail_${mod}" +done + +for mod in $NGINX_MODULES_3RD; do + IUSE="${IUSE} nginx_modules_${mod}" +done + +CDEPEND=" + pcre? ( >=dev-libs/libpcre-4.2 ) + selinux? ( sec-policy/selinux-nginx ) + ssl? ( dev-libs/openssl ) + http-cache? ( userland_GNU? ( dev-libs/openssl ) ) + nginx_modules_http_geo? ( dev-libs/geoip ) + nginx_modules_http_gzip? ( sys-libs/zlib ) + nginx_modules_http_gzip_static? ( sys-libs/zlib ) + nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] ) + 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_xslt? ( dev-libs/libxml2 dev-libs/libxslt )" +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 + einfo + einfo "Passenger support has been removed from the nginx ebuild to" + einfo "get rid of file collisions, its broken build system and" + einfo "incompatibilities between passenger 2 and 3." + einfo + einfo "Please switch to passenger-3 standalone or use the" + einfo "unicorn gem which provides a sane nginx-like architecture" + einfo "out of the box." + einfo + einfo "For more information on sane ruby deployments with" + einfo "passenger-3/unicorn go to:" + einfo + einfo "https://rvm.beginrescueend.com" + einfo + die "nginx_modules_http_passenger still in IUSE" + fi + + ebegin "Creating nginx user and group" + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} + eend $? + + if use libatomic; then + ewarn "GCC 4.1+ features built-in atomic operations." + ewarn "Using libatomic_ops is only needed if using" + ewarn "a different compiler or a GCC prior to 4.1" + fi + + if [[ -n $NGINX_ADD_MODULES ]]; then + ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" + ewarn "This nginx installation is not supported!" + ewarn "Make sure you can reproduce the bug without those modules" + ewarn "_before_ reporting bugs." + fi + + if use !http; then + ewarn "To actually disable all http-functionality you also have to disable" + ewarn "all nginx http modules." + fi +} + +src_prepare() { + 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() { + local myconf= http_enabled= mail_enabled= + + use aio && myconf+=" --with-file-aio --with-aio_module" + use debug && myconf+=" --with-debug" + 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 + if use nginx_modules_http_${mod}; then + http_enabled=1 + else + myconf+=" --without-http_${mod}_module" + fi + done + + for mod in $NGINX_MODULES_OPT; do + if use nginx_modules_http_${mod}; then + http_enabled=1 + myconf+=" --with-http_${mod}_module" + fi + done + + if use nginx_modules_http_fastcgi; then + myconf+=" --with-http_realip_module" + fi + + # 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}" + 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}" + fi + + if use nginx_modules_http_push; then + http_enabled=1 + myconf+=" --add-module=${WORKDIR}/${HTTP_PUSH_MODULE_P}" + fi + + if use nginx_modules_http_cache_purge; then + http_enabled=1 + myconf+=" --add-module=${WORKDIR}/${HTTP_CACHE_PURGE_MODULE_P}" + fi + + if use nginx_modules_http_upload; then + http_enabled=1 + myconf+=" --add-module=${WORKDIR}/${HTTP_UPLOAD_MODULE_P}" + fi + + if use nginx_modules_http_slowfs_cache; then + http_enabled=1 + 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 http || use http-cache; then + http_enabled=1 + fi + + if [ $http_enabled ]; then + use http-cache || myconf+=" --without-http-cache" + use ssl && myconf+=" --with-http_ssl_module" + else + myconf+=" --without-http --without-http-cache" + fi + + # MAIL modules + for mod in $NGINX_MODULES_MAIL; do + if use nginx_modules_mail_${mod}; then + mail_enabled=1 + else + myconf+=" --without-mail_${mod}_module" + fi + done + + if [ $mail_enabled ]; then + myconf+=" --with-mail" + use ssl && myconf+=" --with-mail_ssl_module" + fi + + # custom modules + for mod in $NGINX_ADD_MODULES; do + myconf+=" --add-module=${mod}" + done + + # https://bugs.gentoo.org/286772 + export LANG=C LC_ALL=C + tc-export CC + + if ! use prefix; then + myconf+=" --user=${PN} --group=${PN}" + fi + + ./configure \ + --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}" +} + +src_install() { + emake DESTDIR="${D}" install + cp "${FILESDIR}"/nginx.conf "${ED}"/etc/nginx/nginx.conf || die + newinitd "${FILESDIR}"/nginx.initd nginx + 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 + 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} + 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} + fi + + if use nginx_modules_http_upload; then + docinto ${HTTP_UPLOAD_MODULE_P} + dodoc "${WORKDIR}"/${HTTP_UPLOAD_MODULE_P}/{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.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 "${EROOT}"/etc/ssl/${PN}/${PN}.key ]; then + install_cert /etc/ssl/${PN}/${PN} + use prefix || chown ${PN}:${PN} "${EROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} + fi + fi +} |