diff options
Diffstat (limited to 'external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc')
-rw-r--r-- | external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc index 24c2cedf..de080a2b 100644 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc @@ -16,9 +16,12 @@ SRC_URI = " \ file://nginx-cross.patch \ file://0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch \ file://nginx.conf \ + file://default_server.site \ + file://proxy_params \ file://nginx.init \ file://nginx-volatile.conf \ file://nginx.service \ + file://nginx-fix-pidfile.patch \ " inherit siteinfo update-rc.d useradd systemd @@ -38,6 +41,7 @@ PACKAGECONFIG ??= "ssl" PACKAGECONFIG[http2] = "--with-http_v2_module,," PACKAGECONFIG[ssl] = "--with-http_ssl_module,,openssl" +PACKAGECONFIG[http-auth-request] = "--with-http_auth_request_module,," do_configure () { if [ "${SITEINFO_BITS}" = "64" ]; then @@ -86,13 +90,13 @@ do_install () { install -d ${D}${sysconfdir}/tmpfiles.d echo "d /run/${BPN} - - - -" \ > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - echo "d /${localstatedir}/log/${BPN} 0755 root root -" \ + echo "d ${localstatedir}/log/${BPN} 0755 root root -" \ >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf fi install -d ${D}${sysconfdir}/${BPN} - ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run + lnr ${D}${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run install -d ${D}${NGINX_WWWDIR} - mv ${D}/usr/html ${D}${NGINX_WWWDIR}/ + mv ${D}${exec_prefix}/html ${D}${NGINX_WWWDIR}/ chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR} install -d ${D}${sysconfdir}/init.d @@ -102,23 +106,41 @@ do_install () { install -d ${D}${sysconfdir}/nginx install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf + sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/nginx/nginx.conf sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf sed -i 's/^user.*/user ${NGINX_USER};/g' ${D}${sysconfdir}/nginx/nginx.conf + install -Dm 0644 ${WORKDIR}/default_server.site ${D}${sysconfdir}/nginx/sites-available/default_server + sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/sites-available/default_server install -d ${D}${sysconfdir}/nginx/sites-enabled + ln -s ../sites-available/default_server ${D}${sysconfdir}/nginx/sites-enabled/ + + install -m 0644 ${WORKDIR}/proxy_params ${D}${sysconfdir}/nginx/proxy_params install -d ${D}${sysconfdir}/default/volatiles install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx sed -i 's,@NGINX_USER@,${NGINX_USER},g' ${D}${sysconfdir}/default/volatiles/99_nginx + # cleanup configuration folder + rm ${D}${sysconfdir}/nginx/*.default + + # add additional configuration folders + install -d ${D}${sysconfdir}/nginx/modules-available + install -d ${D}${sysconfdir}/nginx/modules-enabled + install -d ${D}${sysconfdir}/nginx/server-conf.d + install -d ${D}${sysconfdir}/nginx/conf.d + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then install -d ${D}${systemd_unitdir}/system install -m 0644 ${WORKDIR}/nginx.service ${D}${systemd_unitdir}/system/ sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@BASE_BINDIR@,${base_bindir},g' \ ${D}${systemd_unitdir}/system/nginx.service fi + + rm -rf ${D}${localstatedir}/log/ } pkg_postinst_${PN} () { |