1 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
2 # Contributor: Miroslaw Szot <mss@czlug.icis.pcz.pl>
3 # Contributor: Piotr Rogoża <rogoza dot piotr at gmail dot com>
9 pkgdesc="lightweight HTTP server and IMAP/POP3 proxy server - development version"
10 arch=('i686' 'x86_64')
25 optdepends=('passenger')
26 url="http://nginx.org"
28 conflicts=('nginx' 'nginx-unstable' 'nginx-svn')
30 options=('!emptydirs')
31 backup=("etc/nginx/conf/fastcgi.conf"
32 "etc/nginx/conf/fastcgi_params"
33 "etc/nginx/conf/koi-win"
34 "etc/nginx/conf/koi-utf"
35 "etc/nginx/conf/mime.types"
36 "etc/nginx/conf/nginx.conf"
37 "etc/nginx/conf/scgi_params"
38 "etc/nginx/conf/uwsgi_params"
39 "etc/nginx/conf/win-utf"
40 "etc/logrotate.d/nginx"
42 source=(http://nginx.org/download/${_pkgname}-$pkgver.tar.gz
45 _doc_root=/usr/share/nginx/http
46 _server_root=/etc/nginx
47 _conf_path=${_server_root}/conf
48 _tmp_path=/var/spool/nginx
49 _log_path=/var/log/nginx
54 cd $srcdir/${_pkgname}-${pkgver}
58 --prefix=${_server_root} \
59 --sbin-path=/usr/sbin/nginx \
60 --pid-path=/var/run/nginx.pid \
61 --lock-path=/var/lock/nginx.lock \
62 --http-client-body-temp-path=${_tmp_path}/client_body_temp \
63 --http-proxy-temp-path=${_tmp_path}/proxy_temp \
64 --http-fastcgi-temp-path=${_tmp_path}/fastcgi_temp \
65 --http-log-path=${_log_path}/access.log \
66 --error-log-path=${_log_path}/error.log \
67 --user=${_user} --group=${_group} \
69 --with-imap_ssl_module \
70 --with-http_ssl_module \
71 --with-http_stub_status_module \
72 --with-http_dav_module \
73 --with-http_gzip_static_module \
75 --add-module=/usr/lib/passenger/ext/nginx \
76 --http-scgi-temp-path=${_tmp_path} \
77 --http-uwsgi-temp-path=${_tmp_path} \
79 --with-select_module \
82 --with-http_realip_module \
83 --with-http_addition_module \
84 --with-http_xslt_module \
85 --with-http_image_filter_module \
86 --with-http_geoip_module \
87 --with-http_sub_module \
88 --with-http_flv_module \
89 --with-http_mp4_module \
90 --with-http_random_index_module \
91 --with-http_secure_link_module \
92 --with-http_perl_module \
93 --with-http_degradation_module \
95 --with-mail_ssl_module \
96 --with-cpp_test_module
97 # --with-google_perftools_module \
103 cd "$srcdir/nginx-${pkgver}"
104 make DESTDIR="$pkgdir" install
106 install -d "$pkgdir"/etc/logrotate.d/
107 cat <<EOF > $pkgdir/etc/logrotate.d/nginx
112 /bin/kill -USR1 \`cat /var/run/nginx.pid 2>/dev/null\` 2> /dev/null || true
117 sed -i -e "s/\<user\s\+\w\+;/user $_user;/g" $pkgdir/$_conf_path/nginx.conf
119 install -d $pkgdir/$_tmp_path
121 # move default document root outside server root
122 install -d $pkgdir/$_doc_root
123 mv $pkgdir/$_server_root/html/* $pkgdir/$_doc_root/
124 rm -rf $pkgdir/$_server_root/html
125 rm -f $pkgdir/$_doc_root/index.html
127 # let's create links for relative paths in config file
128 ln -s $_log_path $pkgdir/$_server_root/logs
129 ln -s $_doc_root $pkgdir/$_server_root/html
131 install -D -m755 $srcdir/nginx $pkgdir/etc/rc.d/nginx
132 install -D -m644 LICENSE $pkgdir/usr/share/licenses/nginx/LICENSE
133 mkdir -p $pkgdir/etc/conf.d
134 echo "NGINX_CONFIG=/etc/nginx/conf/nginx.conf" >$pkgdir/etc/conf.d/nginx
135 rm -rf $pkgdir/var/run
136 install -d $pkgdir/usr/share/man/man8
137 gzip man/${_pkgname}.8 -c > ${pkgdir}/usr/share/man/man8/${_pkgname}.8.gz
139 md5sums=('2a98411773c87a98e92c5aa68f322338'
140 '0e8032d3ba26c3276e8c7c30588d375f')