causten | 508f7b5 | 2017-09-26 11:08:47 -0500 | [diff] [blame] | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 2 | |
| 3 | inherit systemd |
| 4 | inherit obmc-phosphor-systemd |
| 5 | |
| 6 | SRC_URI += " \ |
| 7 | file://nginx.conf \ |
| 8 | file://nginx.service \ |
| 9 | file://gen-cert.sh \ |
| 10 | " |
| 11 | |
Brad Bishop | f6d19e0 | 2018-12-11 10:47:34 -0500 | [diff] [blame] | 12 | RDEPENDS_${PN} += " \ |
Brad Bishop | a590649 | 2018-12-13 14:10:38 -0500 | [diff] [blame] | 13 | openssl-bin \ |
Brad Bishop | f6d19e0 | 2018-12-11 10:47:34 -0500 | [diff] [blame] | 14 | ${VIRTUAL-RUNTIME_base-utils} \ |
| 15 | " |
| 16 | |
Deepak Kodihalli | 723539f | 2018-07-30 03:41:43 -0500 | [diff] [blame] | 17 | EXTRA_OECONF =+ " --without-select_module --with-http_gunzip_module" |
causten | 508f7b5 | 2017-09-26 11:08:47 -0500 | [diff] [blame] | 18 | |
| 19 | SSLCERTPATH = "/etc/ssl/certs/nginx/" |
| 20 | |
| 21 | |
| 22 | do_install_append() { |
| 23 | |
| 24 | install -m 644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx |
| 25 | install -m 0755 ${WORKDIR}/gen-cert.sh ${D}${sbindir}/gen-cert.sh |
| 26 | |
| 27 | install -d ${D}${SSLCERTPATH} |
| 28 | chown -R www:www-data ${D}${SSLCERTPATH} |
| 29 | |
| 30 | |
| 31 | echo SSLCERTPATH |
| 32 | echo ${SSLCERTPATH} |
| 33 | sed -i 's,@CERTPATH@,${SSLCERTPATH},g' ${D}${sysconfdir}/nginx/nginx.conf |
| 34 | } |
| 35 | |
| 36 | FILES_${PN} += " ${SSLCERTPATH} " |
| 37 | |
| 38 | SYSTEMD_SERVICE_${PN} += " nginx.service" |