summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/nginx/nginx_1.9.10.bb
diff options
context:
space:
mode:
authorPascal Bach <pascal.bach@siemens.com>2016-02-04 16:03:14 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2016-02-15 10:21:35 +0100
commit095293496fd151f770733c8efbe0a74cb16a0c78 (patch)
treeb9fc38643d1d3d935b10a11a8140245a129e00e1 /meta-webserver/recipes-httpd/nginx/nginx_1.9.10.bb
parentf67d121f9f2bde198887da01e3673a18d0249a5c (diff)
downloadmeta-openembedded-095293496fd151f770733c8efbe0a74cb16a0c78.tar.gz
nginx: update to 1.9.10
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-webserver/recipes-httpd/nginx/nginx_1.9.10.bb')
-rw-r--r--meta-webserver/recipes-httpd/nginx/nginx_1.9.10.bb138
1 files changed, 138 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.10.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.9.10.bb
new file mode 100644
index 000000000..5d63d417f
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.9.10.bb
@@ -0,0 +1,138 @@
1SUMMARY = "HTTP and reverse proxy server"
2
3DESCRIPTION = "Nginx is a web server and a reverse proxy server for \
4HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high \
5concurrency, performance and low memory usage."
6
7HOMEPAGE = "http://nginx.org/"
8LICENSE = "BSD-2-Clause"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=0bb58ed0dfd4f5dbece3b52aba79f023"
10SECTION = "net"
11
12DEPENDS = "libpcre gzip openssl"
13
14SRC_URI = " \
15 http://nginx.org/download/nginx-${PV}.tar.gz \
16 file://nginx-cross.patch \
17 file://nginx.conf \
18 file://nginx.init \
19 file://nginx-volatile.conf \
20 file://nginx.service \
21"
22SRC_URI[md5sum] = "64cc970988356a5e0fc4fcd1ab84fe57"
23SRC_URI[sha256sum] = "fb14d76844cab0a5a0880768be28965e74f9956790f618c454ef6098e26631d9"
24
25inherit update-rc.d useradd
26
27CFLAGS_append = " -fPIE -pie"
28CXXFLAGS_append = " -fPIE -pie"
29
30NGINX_WWWDIR ?= "${localstatedir}/www/localhost"
31NGINX_USER ?= "www"
32
33EXTRA_OECONF = ""
34
35do_configure () {
36 if [ "${SITEINFO_BITS}" = "64" ]; then
37 PTRSIZE=8
38 else
39 PTRSIZE=4
40 fi
41
42 echo $CFLAGS
43 echo $LDFLAGS
44
45 ./configure \
46 --crossbuild=Linux:${TUNE_ARCH} \
47 --with-endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
48 --with-int=4 \
49 --with-long=${PTRSIZE} \
50 --with-long-long=8 \
51 --with-ptr-size=${PTRSIZE} \
52 --with-sig-atomic-t=${PTRSIZE} \
53 --with-size-t=${PTRSIZE} \
54 --with-off-t=${PTRSIZE} \
55 --with-time-t=${PTRSIZE} \
56 --with-sys-nerr=132 \
57 --conf-path=${sysconfdir}/nginx/nginx.conf \
58 --http-log-path=${localstatedir}/log/nginx/access.log \
59 --error-log-path=${localstatedir}/log/nginx/error.log \
60 --pid-path=/run/nginx/nginx.pid \
61 --prefix=${prefix} \
62 --with-http_ssl_module \
63 --with-http_gzip_static_module \
64 ${EXTRA_OECONF}
65}
66
67do_install () {
68 oe_runmake 'DESTDIR=${D}' install
69 rm -fr ${D}${localstatedir}/run ${D}/run
70 if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
71 install -d ${D}${sysconfdir}/tmpfiles.d
72 echo "d /run/${BPN} - - - -" \
73 > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
74 fi
75 install -d ${D}${sysconfdir}/${BPN}
76 ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
77 install -d ${D}${NGINX_WWWDIR}
78 mv ${D}/usr/html ${D}${NGINX_WWWDIR}/
79 chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR}
80
81 install -d ${D}${sysconfdir}/init.d
82 install -m 0755 ${WORKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx
83 sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${sysconfdir}/init.d/nginx
84 sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/init.d/nginx
85
86 install -d ${D}${sysconfdir}/nginx
87 install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf
88 sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf
89 install -d ${D}${sysconfdir}/nginx/sites-enabled
90
91 install -d ${D}${sysconfdir}/default/volatiles
92 install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx
93 sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx
94
95 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
96 install -d ${D}${systemd_unitdir}/system
97 install -m 0644 ${WORKDIR}/nginx.service ${D}${systemd_unitdir}/system/
98 sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
99 -e 's,@LOCALSTATEDIR@,${localstatedir},g' \
100 -e 's,@BASEBINDIR@,${base_bindir},g' \
101 ${D}${systemd_unitdir}/system/nginx.service
102 fi
103}
104
105pkg_postinst_${PN} () {
106 if [ -z "$D" ]; then
107 if type systemd-tmpfiles >/dev/null; then
108 systemd-tmpfiles --create
109 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
110 ${sysconfdir}/init.d/populate-volatile.sh update
111 fi
112 fi
113}
114
115FILES_${PN} += "${localstatedir}/ \
116 ${systemd_unitdir}/system/nginx.service \
117 "
118
119CONFFILES_${PN} = "${sysconfdir}/nginx/nginx.conf \
120 ${sysconfdir}/nginx/fastcgi.conf\
121 ${sysconfdir}/nginx/fastcgi_params \
122 ${sysconfdir}/nginx/koi-utf \
123 ${sysconfdir}/nginx/koi-win \
124 ${sysconfdir}/nginx/mime.types \
125 ${sysconfdir}/nginx/scgi_params \
126 ${sysconfdir}/nginx/uwsgi_params \
127 ${sysconfdir}/nginx/win-utf \
128"
129
130INITSCRIPT_NAME = "nginx"
131INITSCRIPT_PARAMS = "defaults 92 20"
132
133USERADD_PACKAGES = "${PN}"
134USERADD_PARAM_${PN} = " \
135 --system --no-create-home \
136 --home ${NGINX_WWWDIR} \
137 --groups www-data \
138 --user-group ${NGINX_USER}"