1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name nginx-devel |
---|
7 | set component nginx |
---|
8 | version 0.8.46 |
---|
9 | categories www mail |
---|
10 | platforms darwin |
---|
11 | maintainers westryn.net:macports openmaintainer |
---|
12 | description High-performance HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server |
---|
13 | long_description Nginx ("engine x") is a high-performance HTTP(S) server \ |
---|
14 | and reverse proxy, as well as an IMAP/POP3 proxy server. \ |
---|
15 | Nginx was written by Igor Sysoev for Rambler.ru, Russia's \ |
---|
16 | second-most visited website, where it has been running in \ |
---|
17 | production for over two and a half years. Igor has \ |
---|
18 | released the source code under a BSD-like license. \ |
---|
19 | Although still in beta, Nginx is known for its stability, \ |
---|
20 | rich feature set, simple configuration, and low resource \ |
---|
21 | consumption. |
---|
22 | homepage http://nginx.net/ |
---|
23 | master_sites http://sysoev.ru/nginx:nginx \ |
---|
24 | http://www.grid.net.ru/nginx/download/:upload_module \ |
---|
25 | http://wiki.nginx.org/images/1/10/:secure_download_module \ |
---|
26 | http://wiki.nginx.org/images/b/bb/:zip_module \ |
---|
27 | http://people.freebsd.org/~osa/:redis_module \ |
---|
28 | http://files.rubyforge.vm.bytemark.co.uk/passenger/:passenger_module |
---|
29 | distname ${component}-${version} |
---|
30 | distfiles ${component}-${version}${extract.suffix}:nginx |
---|
31 | checksums ${component}-${version}${extract.suffix} \ |
---|
32 | md5 5f4b9cd094667fd19259e01a7a1417d8 \ |
---|
33 | sha1 12a3f310cbbe560c337a91896f83695671d7a72f \ |
---|
34 | rmd160 4e852c579bfc9fd4de7a79f1949f47b82a455af3 |
---|
35 | |
---|
36 | depends_lib port:pcre port:zlib |
---|
37 | |
---|
38 | patchfiles patch-auto__install.diff patch-conf__nginx.conf.diff |
---|
39 | |
---|
40 | set nginx_confdir ${prefix}/etc/${component} |
---|
41 | set nginx_logdir ${prefix}/var/log/${component} |
---|
42 | set nginx_rundir ${prefix}/var/run/${component} |
---|
43 | |
---|
44 | set nginx_pidfile ${nginx_rundir}/${component}.pid |
---|
45 | |
---|
46 | configure.args-append \ |
---|
47 | --with-cc-opt=\"${configure.cppflags} ${configure.cflags}\" \ |
---|
48 | --with-ld-opt=\"${configure.ldflags}\" \ |
---|
49 | --conf-path=${nginx_confdir}/${component}.conf \ |
---|
50 | --error-log-path=${nginx_logdir}/error.log \ |
---|
51 | --http-log-path=${nginx_logdir}/access.log \ |
---|
52 | --pid-path=${nginx_pidfile} \ |
---|
53 | --lock-path=${nginx_rundir}/${component}.lock \ |
---|
54 | --http-client-body-temp-path=${nginx_rundir}/client_body_temp \ |
---|
55 | --http-proxy-temp-path=${nginx_rundir}/proxy_temp \ |
---|
56 | --http-fastcgi-temp-path=${nginx_rundir}/fastcgi_temp |
---|
57 | |
---|
58 | configure.universal_args-delete --disable-dependency-tracking |
---|
59 | |
---|
60 | build.target build |
---|
61 | destroot.keepdirs ${destroot}${nginx_logdir} \ |
---|
62 | ${destroot}${nginx_rundir} |
---|
63 | |
---|
64 | post-destroot { |
---|
65 | set nginx_conf ${prefix}/etc/${component}/${component}.conf |
---|
66 | # Try to cover for the fact that, in earlier revisions of this port, the |
---|
67 | # configuration file was installed live instead of an example, in which |
---|
68 | # case an upgrade will clobber any customisations that a user might have |
---|
69 | # made :( |
---|
70 | catch "exec port provides ${nginx_conf}" provides_output |
---|
71 | set nginx_conf_is_registered_to_nginx \ |
---|
72 | [regexp "${nginx_conf} is provided by: ${component}" ${provides_output}] |
---|
73 | set nginx_conf_differs \ |
---|
74 | [catch {exec cmp ${nginx_conf} ${worksrcpath}/conf/${component}.conf}] |
---|
75 | if { ${nginx_conf_is_registered_to_nginx} && ${nginx_conf_differs} } { |
---|
76 | copy ${nginx_conf} ${nginx_conf}.altered |
---|
77 | ui_msg "" |
---|
78 | ui_msg "###############################################################" |
---|
79 | ui_msg "# It appears that you have altered ${nginx_conf}," |
---|
80 | ui_msg "# and that upgrading or uninstalling your previous installation" |
---|
81 | ui_msg "# of ${component} will clobber your copy. It has been copied to" |
---|
82 | ui_msg "# ${nginx_conf}.altered for preservation when you upgrade or" |
---|
83 | ui_msg "# uninstall ${component}. This problem should not occur with future" |
---|
84 | ui_msg "# upgrades or installations of this port.\n" |
---|
85 | ui_msg "###############################################################" |
---|
86 | ui_msg "" |
---|
87 | } |
---|
88 | } |
---|
89 | |
---|
90 | startupitem.create yes |
---|
91 | startupitem.executable ${prefix}/sbin/nginx |
---|
92 | startupitem.pidfile auto ${nginx_pidfile} |
---|
93 | |
---|
94 | variant dav description {Add WebDAV support to server} { |
---|
95 | configure.args-append --with-http_dav_module |
---|
96 | } |
---|
97 | |
---|
98 | variant flv description {Add FLV (Flash Video) streaming support to server} { |
---|
99 | configure.args-append --with-http_flv_module |
---|
100 | } |
---|
101 | |
---|
102 | variant mail description {Add IMAP4/POP3 mail proxy support} { |
---|
103 | configure.args-append --with-mail |
---|
104 | } |
---|
105 | |
---|
106 | variant ssl description {Add SSL (HTTPS) support to the server, and\ |
---|
107 | also to the mail proxy if that is enabled} { |
---|
108 | depends_lib-append port:openssl |
---|
109 | configure.args-append --with-http_ssl_module |
---|
110 | if [variant_isset mail] { |
---|
111 | configure.args-append --with-mail_ssl_module |
---|
112 | } |
---|
113 | } |
---|
114 | |
---|
115 | variant status description {Add /nginx_status support to the server} { |
---|
116 | configure.args-append --with-http_stub_status_module |
---|
117 | } |
---|
118 | |
---|
119 | # This variant has been labelled "perl5" so as to allow users to easily stick |
---|
120 | # with perl 5.x once perl 6.x is released; a "perl6" variant will also be added |
---|
121 | # at that time. |
---|
122 | variant perl5 description {Add perl support to the server directly within\ |
---|
123 | nginx and call perl via SSI} { |
---|
124 | depends_run-append path:bin/perl:perl5 |
---|
125 | configure.args-append --with-http_perl_module \ |
---|
126 | --with-perl=${prefix}/bin/perl |
---|
127 | } |
---|
128 | |
---|
129 | variant realip description {Using nginx as a backend} { |
---|
130 | configure.args-append --with-http_realip_module |
---|
131 | } |
---|
132 | |
---|
133 | variant addition description {Append text to pages} { |
---|
134 | configure.args-append --with-http_addition_module |
---|
135 | } |
---|
136 | |
---|
137 | variant substitution description {Replace text in pages} { |
---|
138 | configure.args-append --with-http_sub_module |
---|
139 | } |
---|
140 | |
---|
141 | variant gzip_static description {Avoids compressing the same file each\ |
---|
142 | time it is requested} { |
---|
143 | configure.args-append --with-http_gzip_static_module |
---|
144 | } |
---|
145 | |
---|
146 | variant google_perftools description {Enable Google Performance Tools\ |
---|
147 | profiling for workers} { |
---|
148 | depends_lib-append port:google-perftools |
---|
149 | configure.args-append --with-google_perftools_module |
---|
150 | } |
---|
151 | |
---|
152 | variant upload description {Enable Valery Kholodkov's upload module\ |
---|
153 | (http://grid.net.ru/nginx/upload.en.html)} { |
---|
154 | set upload_filename nginx_upload_module |
---|
155 | set upload_version 2.0.9 |
---|
156 | set upload_distname ${upload_filename}-${upload_version} |
---|
157 | distfiles-append ${upload_distname}.tar.gz:upload_module |
---|
158 | checksums-append ${upload_distname}.tar.gz \ |
---|
159 | md5 bd8ee6011e3e24805c8ead617211a04b \ |
---|
160 | sha1 4dd932eba456a5370db806d15e8cc97acd104d55 \ |
---|
161 | rmd160 60b4107d8d4891944c78506b9b659a916b7e528f |
---|
162 | configure.args-append --add-module=${workpath}/${upload_distname} |
---|
163 | } |
---|
164 | |
---|
165 | variant secure_download description {Enable Ngx http secure download \ |
---|
166 | (http://wiki.nginx.org/NginxHttpSecureDownload)} { |
---|
167 | |
---|
168 | set secure_download_distname Ngx_http_secure_download |
---|
169 | distfiles-append ${secure_download_distname}.tar.gz:secure_download_module |
---|
170 | checksums-append ${secure_download_distname}.tar.gz \ |
---|
171 | md5 ae35f1355fd9f1aa6d54ea15eb413163 |
---|
172 | configure.args-append --add-module=${workpath}/${secure_download_distname} |
---|
173 | depends_lib-append port:mhash |
---|
174 | } |
---|
175 | |
---|
176 | variant zip description {Enable Ngx zip download module \ |
---|
177 | (http://wiki.nginx.org/NginxNgxZip)} { |
---|
178 | |
---|
179 | set zip_distname Mod_zip-1.1.5 |
---|
180 | set zip_workname mod_zip-1.1.5 |
---|
181 | distfiles-append ${zip_distname}.tar.gz:zip_module |
---|
182 | checksums-append ${zip_distname}.tar.gz \ |
---|
183 | md5 28a262696144a35aaec2e078d213509a \ |
---|
184 | sha1 2004ee81ce885aa52b9fdbb41f721ad35188b27e \ |
---|
185 | rmd160 fac8cbfa06b4b3d9d1ac80267a91b982f7c00bbb |
---|
186 | configure.args-append --add-module=${workpath}/${zip_workname} |
---|
187 | } |
---|
188 | |
---|
189 | variant redis description {Enable Ngx HTTP Redis module} { |
---|
190 | set redis_filename ngx_http_redis |
---|
191 | set redis_version 0.3.1 |
---|
192 | set redis_distname ${redis_filename}-${redis_version} |
---|
193 | distfiles-append ${redis_distname}.tar.gz:redis_module |
---|
194 | checksums-append ${redis_distname}.tar.gz \ |
---|
195 | md5 c731d6ac14b4c8a99fda2c7e89356a8f |
---|
196 | configure.args-append --add-module=${workpath}/${redis_distname} |
---|
197 | } |
---|
198 | |
---|
199 | variant passenger description {Enable Ngx passenger module} { |
---|
200 | set passenger_filename passenger |
---|
201 | set passenger_version 2.2.15 |
---|
202 | set passenger_distname ${passenger_filename}-${passenger_version} |
---|
203 | |
---|
204 | distfiles-append ${passenger_distname}.tar.gz:passenger_module |
---|
205 | checksums-append ${passenger_distname}.tar.gz \ |
---|
206 | md5 a156bb47e79b00d063d08fc5715dec0c \ |
---|
207 | sha1 dbb2f3346061872a43efc554990d8993172c8ff9 \ |
---|
208 | rmd160 52d0eb505d6c19e45ccc0dac8d1e675aed505c14 |
---|
209 | configure.args-append --add-module=${workpath}/${passenger_distname}/ext/nginx |
---|
210 | } |
---|
211 | |
---|