2017-06-20 12:40:01 +03:00
|
|
|
# $Id$
|
|
|
|
# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
|
|
|
|
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
2017-01-19 17:48:24 +02:00
|
|
|
# Contributor: Sébastien Luttringer
|
|
|
|
# Contributor: Drew DeVault
|
|
|
|
# Contributor: Arti Zirk <arti.zirk@gmail.com>
|
2018-12-25 17:53:19 +02:00
|
|
|
# Contributor: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
2017-01-19 17:48:24 +02:00
|
|
|
|
2018-12-25 17:53:19 +02:00
|
|
|
_davext_ver=3.0.0
|
|
|
|
_fancyindex_ver=0.4.3
|
|
|
|
_headers_more_ver=0.33
|
|
|
|
_nchan_ver=1.2.3
|
|
|
|
|
|
|
|
_pkgname=nginx
|
2017-01-19 17:48:24 +02:00
|
|
|
pkgname=nginx-ilves
|
2018-12-29 01:56:11 +02:00
|
|
|
pkgver=1.15.8
|
2017-04-14 16:51:33 +03:00
|
|
|
pkgrel=1
|
2017-01-19 17:48:24 +02:00
|
|
|
pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server, mainline release'
|
2018-12-25 17:53:19 +02:00
|
|
|
arch=('x86_64')
|
2017-01-19 17:48:24 +02:00
|
|
|
url='https://nginx.org'
|
|
|
|
license=('custom')
|
2018-12-25 17:53:19 +02:00
|
|
|
depends=('pcre' 'zlib' 'openssl' 'geoip' 'mailcap'
|
|
|
|
'libxml2') # Extra modules dependencies
|
2017-01-19 17:48:24 +02:00
|
|
|
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 <mdounin@mdounin.ru>
|
2018-12-25 17:53:19 +02:00
|
|
|
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")
|
2018-12-29 01:56:11 +02:00
|
|
|
sha256sums=('a8bdafbca87eb99813ae4fcac1ad0875bf725ce19eb265d28268c309b2b40787'
|
2018-12-25 17:53:19 +02:00
|
|
|
'SKIP'
|
|
|
|
'65f5af0f27ce3c5263d99d70a57fd3b0cb62aa99df786205029e68563e41e1ee'
|
|
|
|
'06ebe161af3e761f2e2e35a67c6c0af27bf61aea7cd4ba8b28372ced5e3b3175'
|
|
|
|
'd2499d94d82d4e4eac8425d799e52883131ae86a956524040ff2fd230ef9f859'
|
|
|
|
'81698fb0c1ec9f906ce308c055d5d248085caf390f4b92516c1ec93f87c886d4'
|
|
|
|
'a3dcbab117a9c103bc1ea5200fc00a7b7d2af97ff7fd525f16f8ac2632e30fbf'
|
|
|
|
'ea44d9f33115db4737abe611e63e3f734fa18cb11d998354b093a40eb7a8e6be')
|
2017-01-19 17:48:24 +02:00
|
|
|
|
|
|
|
_common_flags=(
|
2018-12-25 17:53:19 +02:00
|
|
|
--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
|
2017-01-19 17:48:24 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
_mainline_flags=(
|
2018-12-25 17:53:19 +02:00
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
_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}
|
2017-01-19 17:48:24 +02:00
|
|
|
)
|
|
|
|
|
2018-12-25 17:53:19 +02:00
|
|
|
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
|
2018-12-25 18:02:37 +02:00
|
|
|
|
|
|
|
# Replace version string
|
|
|
|
sed -i '/^#define NGINX_VER/s|"nginx/"|"'${pkgname}'/"|' "${_pkgname}-${pkgver}/src/core/nginx.h"
|
2018-12-25 17:53:19 +02:00
|
|
|
}
|
|
|
|
|
2017-01-19 17:48:24 +02:00
|
|
|
build() {
|
2018-12-25 17:53:19 +02:00
|
|
|
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
|
2017-01-19 17:48:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2018-12-25 17:53:19 +02:00
|
|
|
cd "${_pkgname}-${pkgver}"
|
|
|
|
|
|
|
|
make DESTDIR="${pkgdir}" install
|
2017-01-19 17:48:24 +02:00
|
|
|
|
|
|
|
sed -e 's|\<user\s\+\w\+;|user html;|g' \
|
|
|
|
-e '44s|html|/usr/share/nginx/html|' \
|
|
|
|
-e '54s|html|/usr/share/nginx/html|' \
|
2018-12-25 17:53:19 +02:00
|
|
|
-i "${pkgdir}"/etc/nginx/nginx.conf
|
2017-01-19 17:48:24 +02:00
|
|
|
|
2018-12-25 17:53:19 +02:00
|
|
|
rm "${pkgdir}"/etc/nginx/*.default
|
|
|
|
rm "${pkgdir}"/etc/nginx/mime.types # in mailcap
|
2017-01-19 17:48:24 +02:00
|
|
|
|
2018-12-25 17:53:19 +02:00
|
|
|
install -d "${pkgdir}"/var/lib/nginx
|
|
|
|
install -dm700 "${pkgdir}"/var/lib/nginx/proxy
|
2017-01-19 17:48:24 +02:00
|
|
|
|
2018-12-25 17:53:19 +02:00
|
|
|
chmod 755 "${pkgdir}"/var/log/nginx
|
|
|
|
chown root:root "${pkgdir}"/var/log/nginx
|
2017-01-19 17:48:24 +02:00
|
|
|
|
2018-12-25 17:53:19 +02:00
|
|
|
install -d "${pkgdir}"/usr/share/nginx
|
|
|
|
mv "${pkgdir}"/etc/nginx/html/ "${pkgdir}"/usr/share/nginx
|
2017-01-19 17:48:24 +02:00
|
|
|
|
2018-12-25 17:53:19 +02:00
|
|
|
install -Dm644 ../logrotate "${pkgdir}"/etc/logrotate.d/nginx
|
|
|
|
install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/nginx.service
|
|
|
|
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${_pkgname}/LICENSE
|
2017-01-19 17:48:24 +02:00
|
|
|
|
2018-12-25 17:53:19 +02:00
|
|
|
rmdir "${pkgdir}"/run
|
2017-01-19 17:48:24 +02:00
|
|
|
|
2018-12-25 17:53:19 +02:00
|
|
|
install -d "${pkgdir}"/usr/share/man/man8/
|
|
|
|
gzip -9c man/nginx.8 > "${pkgdir}"/usr/share/man/man8/nginx.8.gz
|
2017-01-19 17:48:24 +02:00
|
|
|
|
|
|
|
for i in ftdetect indent syntax; do
|
2017-04-14 16:51:33 +03:00
|
|
|
install -Dm644 contrib/vim/$i/nginx.vim \
|
2018-12-25 17:53:19 +02:00
|
|
|
"${pkgdir}/usr/share/vim/vimfiles/$i/nginx.vim"
|
2017-01-19 17:48:24 +02:00
|
|
|
done
|
|
|
|
}
|