# Maintainer: Alexander Kuznecov _pkgname="nginx" _user="http" _group="http" _doc_root="/usr/share/${_pkgname}/html" _sysconf_path="etc" _conf_path="${_sysconf_path}/${_pkgname}" _tmp_path="/var/spool/${_pkgname}" _pid_path="/run" _lock_path="/var/lock" _log_path="/var/log/${_pkgname}" ### 3d party modules: _libre_ver="2.5.3" _libre_dirname="ngx_libressl" _cachepurge_ver="2.3" _cachepurge_dirname="ngx_cachepurge" _slowfscache_ver="1.10" _slowfscache_dirname="ngx_slowfscache" _echo_ver="v0.60" _echo_dirname="ngx_echo" _headersmore_ver="v0.32" _headersmore_dirname="ngx_headersmore" _uploadprogress_ver="v0.9.2" _uploadprogress_dirname="ngx_uploadprogress" _upstreamfair_hash="a18b4099fbd458111983200e098b6f0c8efed4bc" _upstreamfair_dirname="ngx_upstreamfair" _fancyindex_ver="v0.4.1" _fancyindex_dirname="ngx_fancyindex" _authpam_ver="1.5.1" _authpam_dirname="ngx_authpam" _pagespeed_ver="1.12.34.2" _pagespeed_dirname="ngx_pagespeed" _rtmp_ver="v1.1.11" _rtmp_dirname="ngx_rtmp" _davext_ver="v0.0.3" _davext_dirname="ngx_davext" _naxsi_ver="0.55.3" _naxsi_dirname="ngx_naxsi" _accesskey_ver="2.0.4" _accesskey_dirname="ngx_accesskey" _upsync_ver="1.0.0" _upsync_dirname="ngx_upsync_module" _upsync_stream_ver="1.0.0" _upsync_stream_dirname="ngx_stream_upsync_module" _vts_ver="0.1.14" _vts_dirname="ngx_vts_module" _upstream_jdomain_hash="9cec4199308f6eebaca39a2814083336d699dc0c" _upstream_jdomain_dirname="ngx_upstream_jdomain" pkgname=nginx-spica pkgver=1.13.0 pkgrel=1 pkgdesc="Development version of lightweight HTTP server and IMAP/POP3 proxy server with standard, additional and 3d party modules" arch=('i686' 'x86_64') depends=('pcre' 'zlib' 'openssl' 'pam' 'gperftools' 'libatomic_ops' 'hardening-wrapper' 'geoip' 'geoip-database' 'gd' 'libxslt') makedepends=( 'libxslt' 'gd' 'git' ) url="http://nginx.org" license=('custom') conflicts=('nginx' 'nginx-libressl' 'nginx-unstable' 'nginx-svn' 'nginx-devel' 'nginx-custom' 'nginx-full') provides=('nginx') backup=("${_conf_path}/nginx.conf" "${_conf_path}/koi-win" "${_conf_path}/koi-utf" "${_conf_path}/win-utf" "${_conf_path}/mime.types" "${_conf_path}/fastcgi.conf" "${_conf_path}/fastcgi_params" "${_conf_path}/scgi_params" "${_conf_path}/uwsgi_params" "etc/logrotate.d/nginx") _user=http _group=http source=("nginx.sh" "nginx.conf" "nginx.logrotate" "nginx.service" "http://nginx.org/download/nginx-$pkgver.tar.gz" "${_fancyindex_dirname}.tar.gz::https://github.com/aperezdc/ngx-fancyindex/archive/${_fancyindex_ver}.tar.gz" "${_cachepurge_dirname}.tar.gz::http://labs.frickle.com/files/ngx_cache_purge-${_cachepurge_ver}.tar.gz" "${_slowfscache_dirname}.tar.gz::http://labs.frickle.com/files/ngx_slowfs_cache-${_slowfscache_ver}.tar.gz" "${_uploadprogress_dirname}.source::https://github.com/masterzen/nginx-upload-progress-module/tarball/${_uploadprogress_ver}" "${_headersmore_dirname}.source::https://github.com/agentzh/headers-more-nginx-module/tarball/${_headersmore_ver}" "${_echo_dirname}.source::https://github.com/agentzh/echo-nginx-module/tarball/${_echo_ver}" "${_upstreamfair_dirname}.source::https://github.com/gnosek/nginx-upstream-fair/tarball/${_upstreamfair_hash}" "${_authpam_dirname}.tar.gz::https://github.com/stogh/ngx_http_auth_pam_module/archive/v${_authpam_ver}.tar.gz" "${_pagespeed_dirname}.zip::https://github.com/pagespeed/ngx_pagespeed/archive/v${_pagespeed_ver}-beta.zip" "psol.tar.gz::https://dl.google.com/dl/page-speed/psol/${_pagespeed_ver}-x64.tar.gz" "${_rtmp_dirname}.zip::https://github.com/arut/nginx-rtmp-module/archive/${_rtmp_ver}.zip" "${_davext_dirname}.tar.gz::https://github.com/arut/nginx-dav-ext-module/archive/${_davext_ver}.tar.gz" "${_naxsi_dirname}.tar.gz::https://github.com/nbs-system/naxsi/archive/${_naxsi_ver}.tar.gz" "${_accesskey_dirname}.tar.gz::https://github.com/Martchus/nginx-accesskey/archive/v${_accesskey_ver}.tar.gz" "${_libre_dirname}-${_libre_ver}.tar.gz::http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${_libre_ver}.tar.gz" "${_upsync_dirname}-${_upsync_ver}.tar.gz::https://github.com/weibocom/nginx-upsync-module/archive/v${_upsync_ver}.tar.gz" "${_upsync_stream_dirname}-${_upsync_stream_ver}.tar.gz::https://github.com/xiaokai-wang/nginx-stream-upsync-module/archive/v${_upsync_stream_ver}.tar.gz" "${_vts_dirname}-${_vts_ver}.tar.gz::https://github.com/vozlt/nginx-module-vts/archive/v${_vts_ver}.tar.gz" "${_upstream_jdomain_dirname}.source::https://github.com/wdaike/ngx_upstream_jdomain/tarball/${_upstream_jdomain_hash}" ) sha512sums=('a396d52457d22fb68cf5abe3faa09cca97d31b9b354b2e44ce6af02d695e2eb790093cf28c68db0c017b1194d46212a98042d297a1d5929fd5c5b8a1ed5f4bd3' '0ea04699103f775305f2f19bcf111eca9dfe75d3372ab2e3f487efed21a6d6eb7a95504eeb832ea5fb10feaaf97566e7764f04def5bbd167b09a0e7f54735304' '953f898fb3f5347dd39c9ad6397c15365ca3450308f969d7f4f1d62728c1c05d20bacecd4b77e43e83d8afb57c62632bce6b1e54a1960529ae0cc2026ffcb58a' 'ee22b310e0ac511d91b7b1925c61935e3513f6a5966bfad2e331eec1c0f0aaa725f79524e99f153a61f75cf3067ee07e7c57b8fa80196ed4c8d47cdcb0b4e69d' '54745876db546cc4d42ef048159bf6f9584278989f03e7e3451597eacbaad7713f9bf9bf93fc540a1be13380281d499f4aa4f27dcdfd3e860bc1203c9cde314b' 'ce0043ad4a2b638c5d99244d6caaa65ad142cea78884084a9aeca5a9593c68dbe508c9e4dd85dc5722eb63ef386612bffc48d4b6fc1487df244fbcb7a73bffe1' '50a31dbf2216a6fae74a186af56dec4600cf55777e76a10ac0075f609e7737135aab063a64f2590dddcd0369ebebd4a523027f3d9ebcca74f7b4355be1c5dcc0' 'fbc9609a8d6913aeefe535f206b9e53477503f131934ead2ae5a6169e395af2f5fb54778704824d5eeb22a4ef40a11ebbcde580db62a631f70edcc2cfc06b15d' 'b503d168e963b20b2790b9f9478026091e9e87f091f9e74295ca94e61797f7c21622234fb08f8c46c3accbcee9f45f0c5d422f9bc7d3bbc2cc02110cd5658583' '048b6c891f262802455149b6bda52fcd9e9cd5c1b92dc61095fea7f09ecfc56df9a47659634e7a9788fa3723e368ff534041277a41a35d6e43e0eea83e9a3171' '3dd029ed552a8cea395fd15ed0982e9447555b5e3c57eea7437661f8f436925b6d271dab245cd0d45f8b21a01e24583add9f636cbdd58bc64e29a2b781749c41' '843f2037fca792a215daf3ab33ca5bb1ffc159a0bfb3f54f1d7c5e992ec394bc5d41a01f01b4a9ede02bab795b1d1f8f06dc88ae1a1d60480fc10a5cfc51a6a1' '973b94874d8a58c0df0ac2d31571eafc1e80b11179cba33ec88421a826207fbf7e99b0387e135a1ca48d82daacb78f19a4c21d3a27b49b16dc86b4748bb72261' '0fcaac68f9f8e5724a47d49b724a9b4993b7056d22e6807e7d1587f3f4f0d2c55ff35502219c6d86c466ec2fdde594d465e09fe276472f954fb002e41c469774' '8b607d221088f6de5f6f1de039a81ca5be7e9b5c41420b03ec8fb7ece86e6d4c80638fab26ca33b7eb1bb625ea1136beee470cac6faa59f1283bde574d1ae72a' '744f45ed02b50654bfb6e21a36768d0c6d2bdfd03ca755dc18bd86e5d0fa55cf3d603ad01c4ecaafb6bcdc04fd5b507e6e30cd463af22d7764a6fa19a411eb34' '4763b1c5e417248d80acfacf20bfc5ba3e06675ff08e37703867daef99a400980b536941e4955c259432905bd11ab998bc2e2489a50350413c7bf37e18eafb74' '9e8f41a5cd1342cc9b8aa334a603842d14a256aab1f4a21205bb1278aecbb0c49e39c889d8113a5b41aad2efeaa2ed9f11cba6929173f50add91f54c4c59c8a0' '4b046ee81f15075a5b02837864dd76efe3bf0339261c9dd3c91a3d5214d71fe664c6d4dc4cfa292e3f9d9555764eb7de467ad3f2fdea485a4e7a5725cc39e709' 'e5ba2abb8a0835a025d2777d9c0e8e95813777af8167e322d8e5ae20485c32b628ced77141b156fd3619b65a5afae1a5bc90a7252166a9a54f7e3d23388b3bd0' 'e7b1bd0f8f658a7705b1da0a48c40531f00e8eddc4bbf6930638e5d98f144cbb2dfa244c9a23a1a553c8a5001a0cbe74d7f7853edbd394d495678efc2c9ecb82' '719a2f95b0b283e0f5cd73eb6c14da1d50e1926d7f5f137cf04895cf065e139cfdb39216bcc1848b52f4107707865427e8a80c0888eaa4ad1aa1528335615292' '3c462009867cfb1ededcdfe6122145124d4e47e86f55d618b46aa352a8ab2afe60b63189fcd00d536a7e0197cde2aee5baa64a2d9e591020f1db3365a795a123' '2c3bcb4eff48388b498d81433c34ce0a5355153a7297309c6bd6f951c936689466932fd73ac4681c58d727d78cdf103401b6539ef92b55c1084b4ff8daa0be5e' ) build() { local _src_dir="${srcdir}/${_pkgname}-${pkgver}" mv libressl-* ${_libre_dirname} mv ngx-fancyindex-* ${_fancyindex_dirname} mv ngx_cache_purge-* ${_cachepurge_dirname} mv ngx_slowfs_cache-* ${_slowfscache_dirname} mv openresty-headers-more-nginx-module-* ${_headersmore_dirname} # mv openresty-echo-nginx-module-* ${_echo_dirname} # mv masterzen-nginx-upload-progress-module-* ${_uploadprogress_dirname} # mv gnosek-nginx-upstream-fair-* ${_upstreamfair_dirname} # mv ngx_http_auth_pam_module-${_authpam_ver} ${_authpam_dirname} mv ngx_http_auth_pam_module-${_authpam_ver} ${_authpam_dirname} mv ngx_pagespeed-* ${_pagespeed_dirname} mv psol ${_pagespeed_dirname}/ # mv nginx-rtmp-module* ${_rtmp_dirname} # mv nginx-dav-ext-module* ${_davext_dirname} mv naxsi* ${_naxsi_dirname} # mv nginx-accesskey* ${_accesskey_dirname} mv nginx-upsync-module* ${_upsync_dirname} # mv nginx-stream-upsync-module* ${_upsync_stream_dirname} mv nginx-module-vts* ${_vts_dirname} mv wdaike-ngx_upstream_jdomain* ${_upstream_jdomain_dirname} cd "${_pagespeed_dirname}" cd $_src_dir ./configure \ --prefix="/${_conf_path}" \ --conf-path="/${_conf_path}/nginx.conf" \ --sbin-path="/usr/bin/${_pkgname}" \ --pid-path="${_pid_path}/${_pkgname}.pid" \ --lock-path=${_pid_path}/${_pkgname}.lock \ --http-client-body-temp-path=${_tmp_path}/client_body_temp \ --http-proxy-temp-path=${_tmp_path}/proxy_temp \ --http-fastcgi-temp-path=${_tmp_path}/fastcgi_temp \ --http-uwsgi-temp-path=${_tmp_path}/uwsgi_temp \ --http-scgi-temp-path=${_tmp_path}scgi_temp \ --http-log-path=${_log_path}/access.log \ --error-log-path=${_log_path}/error.log \ --user=${_user} \ --group=${_group} \ --with-ipv6 \ --with-openssl=../${_libre_dirname}/ \ --add-module=../${_naxsi_dirname}/naxsi_src/ \ --with-threads \ --with-stream \ --with-pcre-jit \ --with-file-aio \ --with-http_ssl_module \ --with-http_stub_status_module \ --with-http_gzip_static_module \ --with-http_realip_module \ --with-http_addition_module \ --with-http_xslt_module \ --with-http_image_filter_module \ --with-http_sub_module \ --with-http_flv_module \ --with-http_mp4_module \ --with-http_random_index_module \ --with-http_secure_link_module \ --with-http_perl_module \ --with-http_degradation_module \ --with-http_geoip_module \ --with-http_v2_module \ --with-http_gunzip_module \ --with-http_auth_request_module \ --with-libatomic \ --without-mail_pop3_module \ --without-mail_imap_module \ --without-mail_smtp_module \ --with-stream_ssl_module \ --with-google_perftools_module \ --add-module=../${_cachepurge_dirname} \ --add-module=../${_headersmore_dirname} \ --add-module=../${_slowfscache_dirname} \ --add-module=../${_fancyindex_dirname} \ --add-module=../${_authpam_dirname} \ --add-module=../${_upsync_dirname} \ --add-module=../${_vts_dirname} \ --add-module=../${_upstream_jdomain_dirname} \ --add-module=../${_pagespeed_dirname} \ # --add-module=../${_upstreamfair_dirname} \ # --add-module=../${_accesskey_dirname} \ # --with-http_dav_module \ # --add-module=../${_uploadprogress_dirname} \ # --add-module=../${_rtmp_dirname} \ # --add-module=../${_davext_dirname} \ # --add-module=../${_echo_dirname} \ # --add-module=../${_upsync_stream_dirname} \ make -j8 } package() { cd "${srcdir}/${_pkgname}-${pkgver}" make DESTDIR="$pkgdir/" install sed -e "s|\