2012-07-11 21:03:43 +00:00
|
|
|
# Template file for 'nginx'
|
|
|
|
pkgname=nginx
|
2015-04-22 05:38:01 +00:00
|
|
|
version=1.8.0
|
2015-04-27 14:06:43 +00:00
|
|
|
revision=2
|
2015-03-27 09:50:40 +00:00
|
|
|
makedepends="pcre-devel libressl-devel $(vopt_if geoip geoip-devel)"
|
2014-07-26 14:44:06 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
# fake configure run on host
|
|
|
|
hostmakedepends=$makedepends
|
|
|
|
fi
|
2014-01-01 15:10:11 +00:00
|
|
|
conf_files="
|
|
|
|
/etc/nginx/fastcgi.conf
|
|
|
|
/etc/nginx/fastcgi_params
|
|
|
|
/etc/nginx/koi-win
|
|
|
|
/etc/nginx/koi-utf
|
|
|
|
/etc/nginx/mime.types
|
|
|
|
/etc/nginx/nginx.conf
|
|
|
|
/etc/nginx/scgi_params
|
|
|
|
/etc/nginx/uwsgi_params
|
|
|
|
/etc/nginx/win-utf"
|
|
|
|
system_accounts="nginx"
|
|
|
|
nginx_homedir="/var/tmp/nginx"
|
|
|
|
make_dirs="
|
|
|
|
/var/log/nginx 0750 root root
|
|
|
|
/var/tmp 1777 root root
|
2015-04-27 14:06:43 +00:00
|
|
|
/var/tmp/nginx 0750 nginx root"
|
2013-02-14 04:48:10 +00:00
|
|
|
short_desc="A high performance web and reverse proxy server"
|
2015-04-10 07:16:30 +00:00
|
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
2012-07-11 21:03:43 +00:00
|
|
|
license="Simplified BSD"
|
|
|
|
homepage="http://nginx.org"
|
|
|
|
distfiles="http://nginx.org/download/nginx-$version.tar.gz"
|
2015-04-22 05:38:01 +00:00
|
|
|
checksum=23cca1239990c818d8f6da118320c4979aadf5386deda691b1b7c2c96b9df3d5
|
2014-08-06 09:31:26 +00:00
|
|
|
|
2015-03-08 08:00:20 +00:00
|
|
|
build_options="systemd geoip"
|
|
|
|
build_options_default="geoip"
|
2012-07-11 21:03:43 +00:00
|
|
|
|
|
|
|
do_configure() {
|
|
|
|
local cfgdir=/etc/nginx
|
|
|
|
local tmpdir=/var/tmp/nginx
|
|
|
|
|
2014-07-26 14:44:06 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
unset CC CPP LD CFLAGS CPPFLAGS LDFLAGS
|
|
|
|
fi
|
|
|
|
|
2012-07-11 21:03:43 +00:00
|
|
|
./configure --prefix=${cfgdir} \
|
|
|
|
--conf-path=${cfgdir}/nginx.conf \
|
|
|
|
--sbin-path=/usr/sbin/nginx \
|
|
|
|
--pid-path=/run/nginx.pid \
|
|
|
|
--lock-path=/var/lock/nginx.lock \
|
|
|
|
--user=nginx --group=nginx \
|
|
|
|
--http-log-path=/var/log/nginx/access.log \
|
|
|
|
--error-log-path=/var/log/nginx/error.log \
|
|
|
|
--http-client-body-temp-path=${tmpdir}/client-body \
|
|
|
|
--http-proxy-temp-path=${tmpdir}/proxy \
|
|
|
|
--http-fastcgi-temp-path=${tmpdir}/fastcgi \
|
|
|
|
--http-scgi-temp-path=${tmpdir}/scgi \
|
|
|
|
--http-uwsgi-temp-path=${tmpdir}/uwsgi \
|
|
|
|
--with-imap --with-imap_ssl_module \
|
|
|
|
--with-ipv6 --with-pcre-jit \
|
|
|
|
--with-file-aio \
|
2013-05-07 14:27:07 +00:00
|
|
|
--with-http_gunzip_module \
|
|
|
|
--with-http_spdy_module \
|
2012-07-11 21:03:43 +00:00
|
|
|
--with-http_dav_module \
|
|
|
|
--with-http_gzip_static_module \
|
|
|
|
--with-http_realip_module \
|
|
|
|
--with-http_ssl_module \
|
2015-03-08 08:00:20 +00:00
|
|
|
--with-http_stub_status_module \
|
|
|
|
$(vopt_with geoip http_geoip_module)
|
2014-07-26 14:44:06 +00:00
|
|
|
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
arm*) cp ${FILESDIR}/ngx_auto_config.h.armv6l objs/ngx_auto_config.h;;
|
|
|
|
esac
|
|
|
|
fi
|
2012-07-11 21:03:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
2014-07-26 14:44:06 +00:00
|
|
|
make ${makejobs} CC="${CC}" LD="${LD}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
|
2012-07-11 21:03:43 +00:00
|
|
|
}
|
|
|
|
do_install() {
|
|
|
|
make DESTDIR=$DESTDIR install
|
|
|
|
|
|
|
|
sed -e 's|\<user\s\+\w\+;|user html;|g' \
|
|
|
|
-e '44s|html|/usr/share/nginx/html|' \
|
|
|
|
-e '54s|html|/usr/share/nginx/html|' \
|
|
|
|
-i $DESTDIR/etc/nginx/nginx.conf
|
|
|
|
rm $DESTDIR/etc/nginx/*.default
|
|
|
|
|
|
|
|
vmkdir usr/share/nginx
|
|
|
|
mv $DESTDIR/etc/nginx/html/ $DESTDIR/usr/share/nginx
|
|
|
|
|
2014-10-13 14:36:42 +00:00
|
|
|
vlicense LICENSE
|
|
|
|
vsv nginx
|
|
|
|
|
2014-08-06 09:31:26 +00:00
|
|
|
if [ "$build_option_systemd" ]; then
|
|
|
|
vinstall ${FILESDIR}/nginx.service 644 usr/lib/systemd/system
|
|
|
|
fi
|
2012-07-11 21:03:43 +00:00
|
|
|
}
|