updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / nginx-unstable / PKGBUILD
blob236d534452a9e05ac0765f93849b82ff94dee67b
1 pkgname=nginx-unstable
2 _pkgname="nginx"
3 _doc_root="/srv/http/${_pkgname}"
4 _sysconf_path="etc"
5 _conf_path="${_sysconf_path}/${_pkgname}"
6 _tmp_path="/var/run/${_pkgname}"
7 _log_path="/var/log/${_pkgname}"
8 _user="http"
9 _group="http"
10 pkgver=1.1.13
11 pkgrel=1
12 pkgdesc="lightweight HTTP server and IMAP/POP3 proxy server"
13 arch=('i686' 'x86_64')
14 depends=('pcre' 'zlib' 'openssl')
15 url="http://nginx.net/"
16 license=('custom')
17 conflicts=('nginx')
18 provides=('nginx')
19 backup=("${_conf_path#/}/nginx.conf"
20         "${_conf_path#/}/koi-win"
21         "${_conf_path#/}/koi-utf"
22         "${_conf_path#/}/win-utf"
23         "${_conf_path#/}/mime.types"
24         "${_conf_path#/}/fastcgi_params"
25         "etc/logrotate.d/nginx")
26 source=("http://nginx.org/download/nginx-${pkgver}.tar.gz"
27         "nginx.sh"
28         "nginx.conf"
29         "nginx.logrotate")
30 md5sums=('3a457fc31da382ed0546bfb76fc70c13'
31          '2eedf9f56a1c5596efac0b191ffb2a89'
32          '323a91c795f509d50cff07e526cc127f'
33          'e01e6f679c5c626e909f01687a2d37d4')
35 build() {
36         local _src_dir="${srcdir}/${_pkgname}-${pkgver}"
37         local _build_dir="${_src_dir}/objs"
39         cd "${_src_dir}"
40         ./configure \
41                 --prefix="/${_conf_path}" \
42                 --conf-path="/${_conf_path}/${_pkgname}.conf" \
43                 --sbin-path="/usr/sbin/${_pkgname}" \
44                 --pid-path="${_tmp_path}/${_pkgname}.pid" \
45                 --lock-path="/var/lock/${_pkgname}.lock" \
46                 --http-client-body-temp-path="${_tmp_path}/client_body_temp" \
47                 --http-proxy-temp-path="${_tmp_path}/proxy_temp" \
48                 --http-fastcgi-temp-path="${_tmp_path}/fastcgi_temp" \
49                 --http-log-path="${_log_path}/access.log" \
50                 --error-log-path="${_log_path}/error.log" \
51                 --user="${_user}" --group="${_group}" \
52                 --with-mail --with-mail_ssl_module \
53                 --with-http_ssl_module \
54                 --with-http_stub_status_module \
55                 --with-ipv6 \
56                 --with-file-aio \
57                 --with-debug
58                 #--with-http_realip_module \
59                 #--with-http_addition_module \
60                 #--with-http_xslt_module \
61                 #--with-http_image_filter_module \
62                 #--with-http_geoip_module \
63                 #--with-http_sub_module \
64                 #--with-http_dav_module \
65                 #--with-http_flv_module \
66                 #--with-http_gzip_static_module \
67                 #--with-http_random_index_module \
68                 #--with-http_secure_link_module \
69                 #--with-http_degradation_module \
70                 #--with-http_perl_module \
71                 #--add-module=path/to/passenger/source/passenger-3.0.7/ext/nginx \
73         make
74         make DESTDIR="${pkgdir}" install
76         sed -i'' -e "s#root\s\+\w\+;#root ${_doc_root};#g" "${pkgdir}/etc/${_pkgname}/${_pkgname}.conf"
78         install -d "${pkgdir}/${_tmp_path}"
80         # move default document root outside server root
81         install -d "${pkgdir}/${_doc_root}"
82         mv "${pkgdir}/${_conf_path}/html/"* "${pkgdir}/${_doc_root}"
83         rm -rf "${pkgdir}/${_conf_path}/html"
85         install -D -m555 "${srcdir}/nginx.sh" "${pkgdir}/etc/rc.d/${_pkgname}"
86         install -D -m644 "${srcdir}/nginx.logrotate" "${pkgdir}/etc/logrotate.d/${_pkgname}"
87         install -D -m644 "${srcdir}/nginx.conf" "${pkgdir}/etc/conf.d/${_pkgname}"
88         install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
89         install -D -m644 "man/nginx.8" "${pkgdir}/usr/share/man/man8/nginx.8"