1 # $Id: PKGBUILD 27981 2010-10-01 09:31:35Z spupykin $
2 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Miroslaw Szot <mss@czlug.icis.pcz.pl>
6 _server_root=/etc/nginx
7 _conf_path=${_server_root}/conf
8 _tmp_path=/var/spool/nginx
9 _log_path=/var/log/nginx
13 pkgname=nginx-admiral0
16 pkgdesc="lightweight HTTP server and IMAP/POP3 proxy server, with upload and push modules"
17 arch=('i686' 'x86_64')
18 depends=('pcre' 'zlib' 'openssl')
21 url="http://nginx.net/"
23 backup=("${_conf_path#/}/nginx.conf" \
24 "${_conf_path#/}/koi-win" \
25 "${_conf_path#/}/koi-utf" \
26 "${_conf_path#/}/win-utf" \
27 "${_conf_path#/}/mime.types" \
28 "${_conf_path#/}/fastcgi_params" \
29 "etc/logrotate.d/nginx")
30 source=(http://sysoev.ru/nginx/nginx-${pkgver}.tar.gz \
32 http://github.com/masterzen/nginx-upload-progress-module/tarball/v0.8.1
33 http://pushmodule.slact.net/downloads/nginx_http_push_module-0.692.tar.gz)
36 local _src_dir=$srcdir/nginx-${pkgver}
37 local _build_dir=$_src_dir/objs
41 --prefix=${_server_root} \
42 --sbin-path=/usr/sbin/nginx \
43 --pid-path=/var/run/nginx.pid \
44 --lock-path=/var/lock/nginx.lock \
45 --http-client-body-temp-path=${_tmp_path}/client_body_temp \
46 --http-proxy-temp-path=${_tmp_path}/proxy_temp \
47 --http-fastcgi-temp-path=${_tmp_path}/fastcgi_temp \
48 --http-log-path=${_log_path}/access.log \
49 --error-log-path=${_log_path}/error.log \
50 --user=${_user} --group=${_group} \
51 --with-imap --with-imap_ssl_module --with-http_ssl_module \
52 --with-http_stub_status_module \
53 --with-http_dav_module \
54 --with-http_sub_module \
56 --add-module=${srcdir}/masterzen-nginx-upload-progress-module-c740674 \
57 --add-module=${srcdir}/nginx_http_push_module-0.692
60 make DESTDIR=$pkgdir install || return 1
62 install -d $pkgdir/etc/logrotate.d/
63 cat <<- EOF > $pkgdir/etc/logrotate.d/nginx
68 /bin/kill -USR1 \`cat /var/run/nginx.pid 2>/dev/null\` 2> /dev/null || true
73 sed -i -e "s/\<user\s\+\w\+;/user $_user;/g" $pkgdir/$_conf_path/nginx.conf
75 install -d $pkgdir/$_tmp_path
77 # move default document root outside server root
78 install -d $pkgdir/$_doc_root
79 mv $pkgdir/$_server_root/html/* $pkgdir/$_doc_root/
80 rm -rf $pkgdir/$_server_root/html
81 rm -f $pkgdir/$_doc_root/index.html
83 # let's create links for relative paths in config file
84 ln -s $_log_path $pkgdir/$_server_root/logs && \
85 ln -s $_doc_root $pkgdir/$_server_root/html || return 1
87 install -D -m755 $srcdir/nginx $pkgdir/etc/rc.d/nginx && \
88 install -D -m644 LICENSE $pkgdir/usr/share/licenses/nginx/LICENSE && \
89 mkdir -p $pkgdir/etc/conf.d && \
90 echo "NGINX_CONFIG=/etc/nginx/conf/nginx.conf" >$pkgdir/etc/conf.d/nginx
92 md5sums=('717eaea1b34e8663849f64b9aa05a9da'
93 '998fe7467e9abfb414cc6ae23475bea9'
94 '7095d7ea2857bc149ddc7008fb9545c4'
95 'a948638005669d159fa331a35c066fae')