# $Id$ # Maintainer: Giancarlo Razzolini # Contributor: Bartłomiej Piotrowski # Contributor: Sébastien Luttringer # Contributor: Drew DeVault # Contributor: Arti Zirk # Contributor: Mark Vainomaa _davext_ver=3.0.0 _fancyindex_ver=0.4.3 _headers_more_ver=0.33 _nchan_ver=1.2.6 _pkgname=nginx pkgname=nginx-ilves pkgver=1.17.5 pkgrel=1 pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server, mainline release' arch=('x86_64') url='https://nginx.org' license=('custom') depends=('pcre' 'zlib' 'openssl' 'geoip' 'mailcap' 'libxml2') # Extra modules dependencies backup=('etc/nginx/fastcgi.conf' 'etc/nginx/fastcgi_params' 'etc/nginx/koi-win' 'etc/nginx/koi-utf' 'etc/nginx/nginx.conf' 'etc/nginx/scgi_params' 'etc/nginx/uwsgi_params' 'etc/nginx/win-utf' 'etc/logrotate.d/nginx') install=nginx.install provides=('nginx') conflicts=('nginx' 'nginx-mainline') validpgpkeys=('B0F4253373F8F6F510D42178520A9993A1C052F8') # Maxim Dounin source=("${url}/download/${_pkgname}-${pkgver}.tar.gz"{,.asc} "service" "logrotate" "ngx_davext-${_davext_ver}.tar.gz::https://github.com/arut/nginx-dav-ext-module/archive/v${_davext_ver}.tar.gz" "ngx_fancyindex-${_fancyindex_ver}.tar.gz::https://github.com/aperezdc/ngx-fancyindex/archive/v${_fancyindex_ver}.tar.gz" "ngx_headers_more-${_headers_more_ver}.tar.gz::https://github.com/openresty/headers-more-nginx-module/archive/v${_headers_more_ver}.tar.gz" "ngx_nchan-${_nchan_ver}.tar.gz::https://github.com/slact/nchan/archive/v${_nchan_ver}.tar.gz") sha256sums=('63ee35e15a75af028ffa1f995e2b9c120b59ef5f1b61a23b8a4c33c262fc10c3' 'SKIP' '6985a7c271a64b9fce5fb24afc459399643a7abf5e7f1a1cc5043c4941443892' '06ebe161af3e761f2e2e35a67c6c0af27bf61aea7cd4ba8b28372ced5e3b3175' 'd2499d94d82d4e4eac8425d799e52883131ae86a956524040ff2fd230ef9f859' '81698fb0c1ec9f906ce308c055d5d248085caf390f4b92516c1ec93f87c886d4' 'a3dcbab117a9c103bc1ea5200fc00a7b7d2af97ff7fd525f16f8ac2632e30fbf' '277f35e479f80f04f76b70549d0ec7abdf8f1658cf46538ea9b0adf3e8b1ad50') _common_flags=( --with-compat --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-pcre-jit --with-stream --with-stream_geoip_module --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads ) _mainline_flags=( ) _module_flags=( --add-module=../nginx-dav-ext-module-${_davext_ver} --add-module=../ngx-fancyindex-${_fancyindex_ver} --add-module=../headers-more-nginx-module-${_headers_more_ver} --add-module=../nchan-${_nchan_ver} ) prepare() { # Safety first for dir in "${_module_flags[@]}"; do dir="${dir/--add-module\=..\/}" test -d "${dir}" || { echo ">>> Module directory '${dir}' does not exist!" return 1 } done # Replace version string sed -i '/^#define NGINX_VER/s|"nginx/"|"'${pkgname}'/"|' "${_pkgname}-${pkgver}/src/core/nginx.h" } build() { cd "${_pkgname}-${pkgver}" ./configure \ --prefix=/etc/nginx \ --conf-path=/etc/nginx/nginx.conf \ --sbin-path=/usr/bin/nginx \ --pid-path=/run/nginx.pid \ --lock-path=/run/lock/nginx.lock \ --user=http \ --group=http \ --http-log-path=/var/log/nginx/access.log \ --error-log-path=stderr \ --http-client-body-temp-path=/var/lib/nginx/client-body \ --http-proxy-temp-path=/var/lib/nginx/proxy \ --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \ --http-scgi-temp-path=/var/lib/nginx/scgi \ --http-uwsgi-temp-path=/var/lib/nginx/uwsgi \ --with-cc-opt="${CFLAGS} ${CPPFLAGS}" \ --with-ld-opt="${LDFLAGS}" \ ${_common_flags[@]} \ ${_mainline_flags[@]} \ ${_module_flags[@]} make } package() { cd "${_pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install sed -e 's|\ "${pkgdir}"/usr/share/man/man8/nginx.8.gz for i in ftdetect indent syntax; do install -Dm644 contrib/vim/$i/nginx.vim \ "${pkgdir}/usr/share/vim/vimfiles/$i/nginx.vim" done }