3 _doc_root="/srv/http/${_pkgname}"
5 _conf_path="${_sysconf_path}/${_pkgname}"
6 _tmp_path="/var/run/${_pkgname}"
7 _log_path="/var/log/${_pkgname}"
12 pkgdesc="lightweight HTTP server and IMAP/POP3 proxy server"
13 arch=('i686' 'x86_64')
14 depends=('pcre' 'zlib' 'openssl')
15 url="http://nginx.net/"
19 backup=("${_conf_path#/}/nginx.conf"
20 "${_conf_path#/}/koi-win"
21 "${_conf_path#/}/koi-utf"
22 "${_conf_path#/}/win-utf"
23 "${_conf_path#/}/mime.types"
24 "${_conf_path#/}/fastcgi_params"
25 "etc/logrotate.d/nginx")
29 md5sums=('70b39280671d3cee700bea3883852d32'
30 '323a91c795f509d50cff07e526cc127f'
31 'e01e6f679c5c626e909f01687a2d37d4')
33 _svntrunk=svn://svn.nginx.org/nginx/trunk/
39 if [ -d $_svnmod/.svn ]; then
40 (cd $_svnmod && svn up -r $pkgver)
42 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
45 msg "SVN checkout done or server timeout"
46 msg "Starting make..."
48 rm -rf "$srcdir/$_svnmod-build"
49 cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
50 cd "$srcdir/$_svnmod-build"
59 --prefix="/${_conf_path}" \
60 --conf-path="/${_conf_path}/${_pkgname}.conf" \
61 --sbin-path="/usr/sbin/${_pkgname}" \
62 --pid-path="${_tmp_path}/${_pkgname}.pid" \
63 --lock-path="/var/lock/${_pkgname}.lock" \
64 --http-client-body-temp-path="${_tmp_path}/client_body_temp" \
65 --http-proxy-temp-path="${_tmp_path}/proxy_temp" \
66 --http-fastcgi-temp-path="${_tmp_path}/fastcgi_temp" \
67 --http-log-path="${_log_path}/access.log" \
68 --error-log-path="${_log_path}/error.log" \
69 --user="${_user}" --group="${_group}" \
70 --with-mail --with-mail_ssl_module \
71 --with-http_ssl_module \
72 --with-http_stub_status_module \
76 #--with-http_realip_module \
77 #--with-http_addition_module \
78 #--with-http_xslt_module \
79 #--with-http_image_filter_module \
80 #--with-http_geoip_module \
81 #--with-http_sub_module \
82 #--with-http_dav_module \
83 #--with-http_flv_module \
84 #--with-http_gzip_static_module \
85 #--with-http_random_index_module \
86 #--with-http_secure_link_module \
87 #--with-http_degradation_module \
88 #--with-http_perl_module \
89 #--add-module=path/to/passenger/source/passenger-3.0.6/ext/nginx \
97 cd "$srcdir/$_svnmod-build"
98 make DESTDIR="${pkgdir}" install
100 sed -i'' -e "s#root\s\+\w\+;#root ${_doc_root};#g" "${pkgdir}/etc/${_pkgname}/${_pkgname}.conf"
102 install -d "${pkgdir}/${_tmp_path}"
104 # move default document root outside server root
105 install -d "${pkgdir}/${_doc_root}"
106 mv "${pkgdir}/${_conf_path}/html/"* "${pkgdir}/${_doc_root}"
107 rm -rf "${pkgdir}/${_conf_path}/html"
109 install -D -m555 "${srcdir}/nginx.sh" "${pkgdir}/etc/rc.d/${_pkgname}"
110 install -D -m644 "${srcdir}/nginx.logrotate" "${pkgdir}/etc/logrotate.d/${_pkgname}"
111 install -D -m644 "${srcdir}/nginx.conf" "${pkgdir}/etc/conf.d/${_pkgname}"
112 install -D -m644 "docs/text/LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
113 install -D -m644 "man/nginx.8" "${pkgdir}/usr/share/man/man8/nginx.8"