[oe-commits] [meta-openembedded] 14/18: nginx: split parts out of the recipe into nginx.inc

git at git.openembedded.org git at git.openembedded.org
Mon Mar 14 11:26:23 UTC 2016


martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit a25e353e36477e458cba8d140f28060d7ed939a8
Author: Pascal Bach <pascal.bach at siemens.com>
AuthorDate: Mon Mar 14 11:23:12 2016 +0100

    nginx: split parts out of the recipe into nginx.inc
    
    nginx has two maintained branches.
    - stable: is the long term maintained branch where only bugfixes occur
    - mainline: is the branch where new features get added
    
    This change is in preparation to support these two branches.
    
    Signed-off-by: Pascal Bach <pascal.bach at siemens.com>
---
 .../nginx/{nginx_1.9.12.bb => nginx.inc}           |   2 -
 meta-webserver/recipes-httpd/nginx/nginx_1.9.12.bb | 135 +--------------------
 2 files changed, 1 insertion(+), 136 deletions(-)

diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.12.bb b/meta-webserver/recipes-httpd/nginx/nginx.inc
similarity index 96%
copy from meta-webserver/recipes-httpd/nginx/nginx_1.9.12.bb
copy to meta-webserver/recipes-httpd/nginx/nginx.inc
index d18f82b..53e3235 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.9.12.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -19,8 +19,6 @@ SRC_URI = " \
 	file://nginx-volatile.conf \
 	file://nginx.service \
 "
-SRC_URI[md5sum] = "0afe4a7e589a0de43b7b54aa055a4351"
-SRC_URI[sha256sum] = "1af2eb956910ed4b11aaf525a81bc37e135907e7127948f9179f5410337da042"
 
 inherit update-rc.d useradd
 
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.12.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.9.12.bb
index d18f82b..821a28c 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.9.12.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.9.12.bb
@@ -1,139 +1,6 @@
-SUMMARY = "HTTP and reverse proxy server"
+require nginx.inc
 
-DESCRIPTION = "Nginx is a web server and a reverse proxy server for \
-HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high  \
-concurrency, performance and low memory usage."
-
-HOMEPAGE = "http://nginx.org/"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0bb58ed0dfd4f5dbece3b52aba79f023"
-SECTION = "net"
-
-DEPENDS = "libpcre gzip openssl"
-
-SRC_URI = " \
-	http://nginx.org/download/nginx-${PV}.tar.gz \
-	file://nginx-cross.patch \
-	file://nginx.conf \
-	file://nginx.init \
-	file://nginx-volatile.conf \
-	file://nginx.service \
-"
 SRC_URI[md5sum] = "0afe4a7e589a0de43b7b54aa055a4351"
 SRC_URI[sha256sum] = "1af2eb956910ed4b11aaf525a81bc37e135907e7127948f9179f5410337da042"
 
-inherit update-rc.d useradd
-
-CFLAGS_append = " -fPIE -pie"
-CXXFLAGS_append = " -fPIE -pie"
-
-NGINX_WWWDIR ?= "${localstatedir}/www/localhost"
-NGINX_USER   ?= "www"
-
-EXTRA_OECONF = ""
 DISABLE_STATIC = ""
-
-do_configure () {
-	if [ "${SITEINFO_BITS}" = "64" ]; then
-		PTRSIZE=8
-	else
-		PTRSIZE=4
-	fi
-
-	echo $CFLAGS
-	echo $LDFLAGS
-
-	./configure \
-	--crossbuild=Linux:${TUNE_ARCH} \
-	--with-endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
-	--with-int=4 \
-	--with-long=${PTRSIZE} \
-	--with-long-long=8 \
-	--with-ptr-size=${PTRSIZE} \
-	--with-sig-atomic-t=${PTRSIZE} \
-	--with-size-t=${PTRSIZE} \
-	--with-off-t=${PTRSIZE} \
-	--with-time-t=${PTRSIZE} \
-	--with-sys-nerr=132 \
-	--conf-path=${sysconfdir}/nginx/nginx.conf \
-	--http-log-path=${localstatedir}/log/nginx/access.log \
-	--error-log-path=${localstatedir}/log/nginx/error.log \
-	--pid-path=/run/nginx/nginx.pid \
-	--prefix=${prefix} \
-	--with-http_ssl_module \
-	--with-http_gzip_static_module \
-	${EXTRA_OECONF}
-}
-
-do_install () {
-	oe_runmake 'DESTDIR=${D}' install
-	rm -fr ${D}${localstatedir}/run ${D}/run
-	if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-		install -d ${D}${sysconfdir}/tmpfiles.d
-		echo "d /run/${BPN} - - - -" \
-		     > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
-	fi
-	install -d ${D}${sysconfdir}/${BPN}
-	ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
-	install -d ${D}${NGINX_WWWDIR}
-	mv ${D}/usr/html ${D}${NGINX_WWWDIR}/
-	chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR}
-
-	install -d ${D}${sysconfdir}/init.d
-	install -m 0755 ${WORKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx
-	sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${sysconfdir}/init.d/nginx
-	sed -i 's,/etc/,${sysconfdir}/,g'  ${D}${sysconfdir}/init.d/nginx
-
-	install -d ${D}${sysconfdir}/nginx
-	install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf
-	sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf
-	install -d ${D}${sysconfdir}/nginx/sites-enabled
-
-	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
-
-        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, at SYSCONFDIR@,${sysconfdir},g' \
-                    -e 's, at LOCALSTATEDIR@,${localstatedir},g' \
-                    -e 's, at BASEBINDIR@,${base_bindir},g' \
-                    ${D}${systemd_unitdir}/system/nginx.service
-        fi
-}
-
-pkg_postinst_${PN} () {
-	if [ -z "$D" ]; then
-		if type systemd-tmpfiles >/dev/null; then
-			systemd-tmpfiles --create
-		elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
-			${sysconfdir}/init.d/populate-volatile.sh update
-		fi
-	fi
-}
-
-FILES_${PN} += "${localstatedir}/ \
-                ${systemd_unitdir}/system/nginx.service \
-                "
-
-CONFFILES_${PN} = "${sysconfdir}/nginx/nginx.conf \
-		${sysconfdir}/nginx/fastcgi.conf\
-		${sysconfdir}/nginx/fastcgi_params \
-		${sysconfdir}/nginx/koi-utf \
-		${sysconfdir}/nginx/koi-win \
-		${sysconfdir}/nginx/mime.types \
-		${sysconfdir}/nginx/scgi_params \
-		${sysconfdir}/nginx/uwsgi_params \
-		${sysconfdir}/nginx/win-utf \
-"
-
-INITSCRIPT_NAME = "nginx"
-INITSCRIPT_PARAMS = "defaults 92 20"
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = " \
-    --system --no-create-home \
-    --home ${NGINX_WWWDIR} \
-    --groups www-data \
-    --user-group ${NGINX_USER}"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list